diff --git a/.github/buildroot-upstream b/.github/buildroot-upstream new file mode 100644 index 00000000000..6ded27a03f9 --- /dev/null +++ b/.github/buildroot-upstream @@ -0,0 +1 @@ +upstream/2020.08.x diff --git a/.github/workflows/buildroot-e2e.yml b/.github/workflows/buildroot-e2e.yml new file mode 100644 index 00000000000..5d4bb61f7ea --- /dev/null +++ b/.github/workflows/buildroot-e2e.yml @@ -0,0 +1,61 @@ +name: CI + +# Controls when the action will run. +on: + push: + branches: [master, skiff, skiff-next] + pull_request: + branches: [skiff, skiff-next, upstream-master] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks + steps: + # Checks-out the repo under $GITHUB_WORKSPACE + - uses: actions/checkout@v2 + + - name: Cache build cache and downloads + uses: actions/cache@v2 + env: + cache-name: cache-buildroot + with: + path: ~/br-cache/ + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Makefile') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + # Detect changes vs upstream-master + - name: Detect changes vs upstream + run: | + cd $GITHUB_WORKSPACE + git fetch + git remote add upstream https://github.com/buildroot/buildroot.git + git fetch upstream + export BUILDROOT_UPSTREAM=$(cat .github/buildroot-upstream) + echo "::set-env name=CHANGED_VS_UPSTREAM::$(git diff --diff-filter=ACM --name-only $BUILDROOT_UPSTREAM | xargs)" + + # Run check-package on changed files + - name: Run check-package on all changed files and setup env + run: | + cd $GITHUB_WORKSPACE + ./utils/check-package $CHANGED_VS_UPSTREAM + + # Installing buildroot deps + - name: Install buildroot apt deps + run: | + sudo apt-get install -y libelf-dev + + # Test a build + - name: Run a generic build + run: | + cd $GITHUB_WORKSPACE + make defconfig BR2_DEFCONFIG=$(pwd)/.github/workflows/buildroot-e2e_defconfig + make -s all legal-info BR2_CCACHE_DIR=${HOME}/br-cache/ccache BR2_DL_DIR=${HOME}/br-cache/dl + diff --git a/.github/workflows/buildroot-e2e_defconfig b/.github/workflows/buildroot-e2e_defconfig new file mode 100644 index 00000000000..2bd0999459a --- /dev/null +++ b/.github/workflows/buildroot-e2e_defconfig @@ -0,0 +1,22 @@ +BR2_x86_64=y +BR2_x86_core_avx2=y +BR2_CCACHE=y +BR2_OPTIMIZE_FAST=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_GCC_ENABLE_LTO=n +BR2_INIT_SYSTEMD=y +# BR2_TARGET_ENABLE_ROOT_LOGIN is not set +BR2_SYSTEM_BIN_SH_BASH=y +BR2_ENABLE_LOCALE_WHITELIST="C en_US en_US.UTF-8" +BR2_GENERATE_LOCALE="en_US.UTF-8" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="x86_64" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_DELVE=y +BR2_PACKAGE_DOCKER_CLI=y +BR2_PACKAGE_DOCKER_CLI_STATIC=y +BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL=y +BR2_PACKAGE_MENDER=y +BR2_PACKAGE_HOST_MENDER_ARTIFACT=y diff --git a/CHANGES b/CHANGES index fc51a0d0c92..570be1f7dc9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,63 @@ +2020.08.1, released October 12th, 2020 + + Important / security related fixes. + + Fixes for various compilation issues with GCC 10.x. + + meson: Correct SDK cross-compilation.conf file when + per-package builds were used to build SDK. + + systemd: Use /run rather than /var/run for PID files in units. + + Toolchain: use Secure-PLT rather than BSS-PLT for PowerPC 32. + + Fakeroot scripts (BR2_ROOTFS_POST_FAKEROOT_SCRIPT) are now run + after all finalization hooks (including pre-rootfs) to ensure + they can override any late configuration done by packages. + + support/script/pycompile: Rework logic to ensure .pyc files + contain absolute target paths, fixing code inspection at + runtime when executed with cwd != '/'. + + support/scripts/setlocalversion: Correct Mercurial output to + match behaviour with Git. + + support/scripts/apply-patches.sh: Use patch + --no-backup-if-mismatch, so we no longer blindly have to + remove *.orig files after patching, fixing issues with + packages containing such files. + + fs/jffs2: Now correcly handle xattrs + + Updated/fixed packages: acpica, afboot-stm32, alsa-utils, + apparmor, bandwidthd, barebox, bash, bison, brotli, + cifs-utils, cups, dhcpcd, dhcpdump, docker-cli, docker-engine, + ecryptfs-utils, efl, fail2ban, fbterm, ffmpeg, fontconfig, + freetype, gcc, gdb, ghostscript, gnupg2, gnutls, go, gqview, + gst1-plugins-base, gst1-plugins-ugly, ipmitool, jbig2dec, + kexec, lcdproc, libcamera, libhtp, libnetconf2, libraw, + libssh, libxml2, libxml-parser-perl, libzip, linux-headers, + live555, localedef, ltp-testsuite, lua, matchbox, memcached, + memtester, mesa3d, meson, minidlna, mongodb, mongrel2, motion, + mraa, mtd, musepack, neardal, netatalk, netperf, netsniff-ng, + nginx, nodejs, nss-pam-ldapd, open-plc-utils, openswan, + opentyrian, openvmtools, php, postgresql, python, + python-aenum, python-cycler, python-engineio, python-fire, + python-pymodbus, python-scapy, python-semver, + python-sentry-sdk, python-socketio, python-texttable, + python-tinyrpc, python-txtorcon, python3, qt5base, quagga, + read-edid, redis, rsh-redone, runc, samba4, socketcand, + strace, supertux, suricata, systemd, ti-utils, trinity, + uclibc, usb_modeswitch, vlc, vsftpd, wampcc, + wayland-protocols, wireguard-linux-compat, wireshark, wlroots, + wolfssl, w_scan, xerces, xfsprogs, xdriver-xf86-video-ati, + xserver_xorg-server, ympd, zeromq, zlib-ng, zstd + + Issues resolved (http://bugs.uclibc.org): + + #12911: usb_modeswitch installation race condition + #13236: Can't compile linux 5.4.8 (with gcc 10 on host) + 2020.08, released September 1st, 2020 Various fixes. diff --git a/DEVELOPERS b/DEVELOPERS index 3c3dcda859a..7cfe565b4db 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -237,6 +237,8 @@ N: Anthony Viallard F: package/gnuplot/ N: Antoine Ténart +F: package/libselinux/ +F: package/refpolicy/ F: package/wf111/ N: Antony Pavlov @@ -1380,6 +1382,7 @@ F: package/rabbitmq-c/ N: Joseph Kogut F: package/at-spi2-atk/ F: package/at-spi2-core/ +F: package/chromium/ F: package/clang/ F: package/earlyoom/ F: package/gconf/ @@ -1678,6 +1681,7 @@ F: package/bridge-utils/ F: package/checkpolicy/ F: package/checksec/ F: package/cgroupfs-mount/ +F: package/compiler-rt/ F: package/crda/ F: package/cunit/ F: package/dacapo/ @@ -1913,6 +1917,7 @@ F: package/tpm-tools/ F: package/trousers/ N: Norbert Lange +F: package/systemd/ F: package/tcf-agent/ N: Nylon Chen @@ -2154,16 +2159,16 @@ N: Rahul Jain F: package/uhttpd/ F: package/ustream-ssl/ -N: Refik Tuzakli -F: package/freescale-imx/ -F: package/paho-mqtt-cpp/ - N: Ramon Fried F: package/bitwise/ N: Raphaël Mélotte F: package/jbig2dec/ +N: Refik Tuzakli +F: package/freescale-imx/ +F: package/paho-mqtt-cpp/ + N: Rémi Rérolle F: package/libfreeimage/ @@ -2254,6 +2259,7 @@ F: package/davfs2/ N: Ryan Barnett F: package/atftp/ +F: package/c-periphery/ F: package/miraclecast/ F: package/python-pysnmp/ F: package/python-pysnmp-mibs/ diff --git a/Makefile b/Makefile index a6b99d0868c..4ebf671af26 100644 --- a/Makefile +++ b/Makefile @@ -92,9 +92,9 @@ all: .PHONY: all # Set and export the version string -export BR2_VERSION := 2020.08 +export BR2_VERSION := 2020.08.1 # Actual time the release is cut (for reproducible builds) -BR2_VERSION_EPOCH = 1598992000 +BR2_VERSION_EPOCH = 1602507000 # Save running make version since it's clobbered by the make package RUNNING_MAKE_VERSION := $(MAKE_VERSION) diff --git a/board/jetsontx2 b/board/jetsontx2 new file mode 120000 index 00000000000..fe9d31deedd --- /dev/null +++ b/board/jetsontx2 @@ -0,0 +1 @@ +./nvidia \ No newline at end of file diff --git a/board/nvidia/readme.txt b/board/nvidia/readme.txt new file mode 100644 index 00000000000..c3b248d70cf --- /dev/null +++ b/board/nvidia/readme.txt @@ -0,0 +1,85 @@ +NVIDIA Jetson TX2 + +Intro +===== + +This configuration adds support for the Jetson TX2 devkit. It should be +compatible with the other Jetson-series boards as well, but has not yet been +tested. (Other boards include the tx2i, nano...) + +Building +======== + +Configure Buildroot +------------------- + +For Jetson TX2: + + $ make jetsontx2_defconfig + +Build the rootfs +---------------- + +You may now build your rootfs with: + + $ make + + +Flashing +======== + +Once the build process is finished you will have the target binaries in the +output/images directory, with a symlink to linux4tegra. + +Flashing to the internal eMMC is done by booting to the official recovery mode, +and flashing the system from there. The default factory-flashed TX2 is suitable. + +There are a lot of cases where the TX2 will not boot properly unless all of the +peripherals are fully disconnected, power is disconnected, everything fully +resets, and then the power is introduced back again. + +The recovery mode of the Jetson is used to flash. Entering recovery: + + - Start with the machine powered off + fully unplugged. + - Plug in the device to power, and connect a HDMI display. + - Connect a micro-USB cable from the host PC to the target board. + - Power on the device by holding the start button until the red light is lit. + - Hold down the RST button and REC button simultaneously. + - Release the RST button while holding down the REC button. + - Wait a few seconds, then release the REC button. + +To flash over USB: + +``` +cd output/images/linux4tegra +sudo bash ./flash.sh \ + -I ../rootfs.ext2 \ + -K ../Image \ + -L ../u-boot-dtb.bin \ + -C "ramdisk_size=100000 net.ifnames=0 elevator=deadline" \ + -d ../tegra186-quill-p3310-1000-c03-00-base.dtb \ + jetson-tx2-devkit mmcblk0p1 +``` + +This will run the `flash.sh` script from L4T, and will setup the kernel, u-boot, +persist + boot-up partition mmcblk0p1. This may overwrite your existing work so +use it for initial setup only. + +## Bootup Process + +The TX2 and recent boards boot from the internal eMMC, at mmcblk0p1. The Jetson +Nano can boot to a SD card. + +A "secure boot" process is used, with multiple bootloaders: + + - BootROM -> MB1 (TrustZone) + - MB2/BPMP -> (Non-Trustzone) + - Cboot (uses Little Kernel) + - Uboot + - Kernel + +Uboot is flashed to the mmcblk0p1 emmc partition. + +Cboot could be compiled from source, and the source is available from the +official sources, however, we do not (yet) compile cboot. + diff --git a/boot/afboot-stm32/0001-Pass-fno-builtin-to-fix-build-with-gcc-10.patch b/boot/afboot-stm32/0001-Pass-fno-builtin-to-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..5ef47b59ff5 --- /dev/null +++ b/boot/afboot-stm32/0001-Pass-fno-builtin-to-fix-build-with-gcc-10.patch @@ -0,0 +1,46 @@ +From 5448f328ff63a6ca4a64519c2f1dfc63a33df4b7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 10 Sep 2020 11:37:33 +0200 +Subject: [PATCH] Pass -fno-builtin to fix build with gcc 10 + +gcc 10, if it recognizes some hand-written code that looks like +memcpy, will generate a call to memcpy(). + +For example: + + while (dst < &_end_data) { + *dst++ = *src++; + } + +gets recognized as such. However, in the context of bare-metal code, +having a call to memcpy() in the C library doesn't work. So we fix +that by disabling builtins. + +Fixes: + +/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: stm32f429i-disco.o: in function `reset': +stm32f429i-disco.c:(.text.reset+0x1a): undefined reference to `memcpy' +/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: stm32f429i-disco.c:(.text.reset+0x34): undefined reference to `memset' +make[1]: *** [Makefile:26: stm32f429i-disco] Error 1 + +Upstream: https://github.com/mcoquelin-stm32/afboot-stm32/pull/9 +Signed-off-by: Thomas Petazzoni +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index f699176..1e8557d 100644 +--- a/Makefile ++++ b/Makefile +@@ -13,6 +13,7 @@ DTB_ADDR?=0x08004000 + CFLAGS := -mthumb -mcpu=cortex-m4 + CFLAGS += -ffunction-sections -fdata-sections + CFLAGS += -Os -std=gnu99 -Wall ++CFLAGS += -fno-builtin + LINKERFLAGS := -nostartfiles --gc-sections + + obj-y += gpio.o mpu.o qspi.o start_kernel.o +-- +2.26.2 + diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk index 422f27312d9..9d62037e7a4 100644 --- a/boot/barebox/barebox.mk +++ b/boot/barebox/barebox.mk @@ -88,13 +88,6 @@ $(1)_KCONFIG_DEPENDENCIES = \ $(BR2_BISON_HOST_DEPENDENCY) \ $(BR2_FLEX_HOST_DEPENDENCY) -ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) -define $(1)_BUILD_BAREBOXENV_CMDS - $$(TARGET_CC) $$(TARGET_CFLAGS) $$(TARGET_LDFLAGS) -o $$(@D)/bareboxenv \ - $$(@D)/scripts/bareboxenv.c -endef -endif - ifeq ($$(BR2_TARGET_$(1)_CUSTOM_ENV),y) $(1)_ENV_NAME = $$(notdir $$(call qstrip,\ $$(BR2_TARGET_$(1)_CUSTOM_ENV_PATH))) @@ -109,12 +102,23 @@ endef endif ifneq ($$($(1)_CUSTOM_EMBEDDED_ENV_PATH),) -define $(1)_KCONFIG_FIXUP_CMDS +define $(1)_KCONFIG_FIXUP_CUSTOM_EMBEDDED_ENV_PATH $$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT) $$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)") endef endif +define $(1)_KCONFIG_FIXUP_BAREBOXENV + $$(if $$(BR2_TARGET_$(1)_BAREBOXENV),\ + $$(call KCONFIG_ENABLE_OPT,CONFIG_BAREBOXENV_TARGET),\ + $$(call KCONFIG_DISABLE_OPT,CONFIG_BAREBOXENV_TARGET)) +endef + +define $(1)_KCONFIG_FIXUP_CMDS + $$($(1)_KCONFIG_FIXUP_CUSTOM_EMBEDDED_ENV_PATH) + $$($(1)_KCONFIG_FIXUP_BAREBOXENV) +endef + define $(1)_BUILD_CMDS $$($(1)_BUILD_BAREBOXENV_CMDS) $$(TARGET_MAKE_ENV) $$(MAKE) $$($(1)_MAKE_FLAGS) -C $$(@D) @@ -136,7 +140,7 @@ endef ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) define $(1)_INSTALL_TARGET_CMDS - cp $$(@D)/bareboxenv $$(TARGET_DIR)/usr/bin + cp $$(@D)/scripts/bareboxenv-target $$(TARGET_DIR)/usr/bin/bareboxenv endef endif diff --git a/configs/jetsontx2_defconfig b/configs/jetsontx2_defconfig new file mode 100644 index 00000000000..55167a7f701 --- /dev/null +++ b/configs/jetsontx2_defconfig @@ -0,0 +1,52 @@ +BR2_aarch64=y +BR2_cortex_a57=y + +# enable specific optimizations +BR2_TARGET_OPTIMIZATION="-march=armv8-a+crypto -mcpu=cortex-a57+crypto" + +# Toolchain reference: docs.nvidia.com: "Jetson Linux Driver Package Toolchain" +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_BINUTILS_VERSION_2_32_X=y + +BR2_SYSTEM_DHCP="eth0" + +# Linux headers same as kernel, a 4.9 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,madisongh,linux-tegra-4.9,0be1a57448010ae60505acf4e2153638455cee7c)/linux-tegra-4.9.140-r1.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="tegra" + +# Build the DTB from the kernel sources +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="_ddot_/_ddot_/_ddot_/_ddot_/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base" + +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +BR2_PACKAGE_LINUX4TEGRA=y +BR2_PACKAGE_NVIDIA_CONTAINER_TOOLKIT=y + +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y + +# Required tools to create the image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_JQ=y +BR2_PACKAGE_HOST_PARTED=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="1024M" +# BR2_TARGET_ROOTFS_TAR is not set + +# Uboot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,paralin,u-boot-tegra,e6da093be3cc593ef4294e1922b3391ede9c94da)/u-boot-tegra-e6da09.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="p2771-0000-500" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y + diff --git a/docs/manual/adding-board-support.txt b/docs/manual/adding-board-support.txt index f6d74ae1f4c..33ed7095354 100644 --- a/docs/manual/adding-board-support.txt +++ b/docs/manual/adding-board-support.txt @@ -10,9 +10,9 @@ that is known to work. You are welcome to add support for other boards to Buildroot too. To do so, you need to create a normal Buildroot configuration that -builds a basic system for the hardware: toolchain, kernel, bootloader, -filesystem and a simple BusyBox-only userspace. No specific package -should be selected: the configuration should be as minimal as +builds a basic system for the hardware: (internal) toolchain, kernel, +bootloader, filesystem and a simple BusyBox-only userspace. No specific +package should be selected: the configuration should be as minimal as possible, and should only build a working basic BusyBox system for the target platform. You can of course use more complicated configurations for your internal projects, but the Buildroot project will only @@ -22,7 +22,17 @@ selections are highly application-specific. Once you have a known working configuration, run +make savedefconfig+. This will generate a minimal +defconfig+ file at the root of the Buildroot source tree. Move this file into the +configs/+ -directory, and rename it +_defconfig+. +directory, and rename it +_defconfig+. If the configuration +is a bit more complicated, it is nice to manually reformat it and +separate it into sections, with a comment before each section. Typical +sections are _Architecture_, _Toolchain options_ (typically just linux +headers version), _Firmware_, _Bootloader_, _Kernel_, and _Filesystem_. + +Always use fixed versions or commit hashes for the different +components, not the "latest" version. For example, set ++BR2_LINUX_KERNEL_CUSTOM_VERSION=y+ and ++BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE+ to the kernel version you tested +with. It is recommended to use as much as possible upstream versions of the Linux kernel and bootloaders, and to use as much as possible default diff --git a/docs/manual/adding-packages-golang.txt b/docs/manual/adding-packages-golang.txt index 8c467689bef..3b34579200c 100644 --- a/docs/manual/adding-packages-golang.txt +++ b/docs/manual/adding-packages-golang.txt @@ -76,15 +76,13 @@ optionally be defined, depending on the package's needs. Many of them are only useful in very specific cases, typical packages will therefore only use a few of them, or none. -* If your package need a custom +GOPATH+ to be compiled in, you can - use the +FOO_WORKSPACE+ variable. The +GOPATH+ being used will be - +/+. If +FOO_WORKSPACE+ is not - specified, it defaults to +_gopath+. - -* +FOO_SRC_SUBDIR+ is the sub-directory where your source will be - compiled relatively to the +GOPATH+. An example value is - +github.com/bar/foo+. If +FOO_SRC_SUBDIR+ is not specified, it - defaults to a value infered from the +FOO_SITE+ variable. +* The package must specify its Go module name in the +FOO_GOMOD+ + variable. If not specified, it defaults to + +URL-domain/1st-part-of-URL/2nd-part-of-URL+, e.g +FOO_GOMOD+ will + take the value +github.com/bar/foo+ for a package that specifies + +FOO_SITE = $(call github,bar,foo,$(FOO_VERSION))+. The Go package + infrastructure will automatically generate a minimal +go.mod+ file + in the package source tree if it doesn't exist. * +FOO_LDFLAGS+ and +FOO_TAGS+ can be used to pass respectively the +LDFLAGS+ or the +TAGS+ to the +go+ build command. diff --git a/docs/manual/contribute.txt b/docs/manual/contribute.txt index 11d8811b44f..14ecdbd66c5 100644 --- a/docs/manual/contribute.txt +++ b/docs/manual/contribute.txt @@ -371,6 +371,37 @@ in the following cases: * whenever you feel it will help presenting your work, your choices, the review process, etc. +==== Patches for maintenance branches + +When fixing bugs on a maintenance branch, bugs should be fixed on the +master branch first. The commit log for such a patch may then contain a +post-commit note specifying what branches are affected: + +---- +package/foo: fix stuff + +Signed-off-by: Your Real Name +--- +Backport to: 2020.02.x, 2020.05.x +(2020.08.x not affected as the version was bumped) +---- + +Those changes will then be backported by a maintainer to the affected +branches. + +However, some bugs may apply only to a specific release, for example +because it is using an older version of a package. In that case, patches +should be based off the maintenance branch, and the patch subject prefix +must include the maintenance branch name (for example "[PATCH 2020.02.x]"). +This can be done with the +git format-patch+ flag +--subject-prefix+: + +--------------------- +$ git format-patch --subject-prefix "PATCH 2020.02.x" \ + -M -s -o outgoing origin/2020.02.x +--------------------- + +Then send the patches with +git send-email+, as described above. + ==== Patch revision changelog When improvements are requested, the new revision of each commit diff --git a/fs/common.mk b/fs/common.mk index 842ea924a5e..5e790365d60 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -163,11 +163,11 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES) echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT) PATH=$$(BR_PATH) $$(TOPDIR)/support/scripts/mkusers $$(ROOTFS_FULL_USERS_TABLE) $$(TARGET_DIR) >> $$(FAKEROOT_SCRIPT) echo "$$(HOST_DIR)/bin/makedevs -d $$(ROOTFS_FULL_DEVICES_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT) + $$(foreach hook,$$(ROOTFS_PRE_CMD_HOOKS),\ + $$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep)) $$(foreach s,$$(call qstrip,$$(BR2_ROOTFS_POST_FAKEROOT_SCRIPT)),\ echo "echo '$$(TERM_BOLD)>>> Executing fakeroot script $$(s)$$(TERM_RESET)'" >> $$(FAKEROOT_SCRIPT); \ echo $$(EXTRA_ENV) $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep)) - $$(foreach hook,$$(ROOTFS_PRE_CMD_HOOKS),\ - $$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep)) $$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),\ $$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep)) diff --git a/fs/jffs2/jffs2.mk b/fs/jffs2/jffs2.mk index 2adbc2320e3..0096af2ea96 100644 --- a/fs/jffs2/jffs2.mk +++ b/fs/jffs2/jffs2.mk @@ -4,7 +4,7 @@ # ################################################################################ -JFFS2_OPTS = -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE) +JFFS2_OPTS = -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE) --with-xattr SUMTOOL_OPTS = -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE) ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y) diff --git a/linux/linux.hash b/linux/linux.hash index fbda638da6b..69e778c46a1 100644 --- a/linux/linux.hash +++ b/linux/linux.hash @@ -1,11 +1,11 @@ # From https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc sha256 419c6248b9ae4dfead4599787aecbfd202e88bc4124523adfa6dd2d642b99fe7 linux-5.7.19.tar.xz -sha256 86f13d050f6389c5a1727fa81510ee8eceac795297bc584f443354609617fea4 linux-5.4.61.tar.xz +sha256 c0b3d8085c5ba235df38b00b740e053659709e8a5ca21957a239f6bc22c45007 linux-5.4.70.tar.xz # From https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc -sha256 6994dda988e9fb7f5661cf80ff42039016cb0044acd39f830937ba0220296388 linux-4.4.234.tar.xz -sha256 756f8544d261e8117716c911261690e4fb5491e14c1f4612c83e0986453782e3 linux-4.9.234.tar.xz -sha256 394f28798670240baacd9e2cce521fbd79f8da5e1fc191695b0e11381445a021 linux-4.14.195.tar.xz -sha256 6912db1c242d72ce9c8d4ff71982ac935d97690822af5c1c6ec22412b31667a4 linux-4.19.142.tar.xz +sha256 067814035c17e77dee84076dcc06a95eb675344cd926b7b79a16b80fee593364 linux-4.4.238.tar.xz +sha256 b1eaf60b771ec4df0546d2b7539e164355008ea2f680a0642ae430e9cb134a3f linux-4.9.238.tar.xz +sha256 5d404a0224a34b5379f1871cc46825487d557c2660459d2b5c3cd4871d699a38 linux-4.14.200.tar.xz +sha256 f2f709ef086a4d8cb3c15a857daa44dfecf1b88d7d7c53c980fb180f6dccbace linux-4.19.150.tar.xz # Locally computed sha256 c20f9014b89ea3e27f55f1d407aa5a4724ed38ac520c197291e9d644f164c43a linux-cip-4.19.132-cip30.tar.gz sha256 81dd791d9ad6c3fddaeaffc6d7d8df0e13831283a5fe494c437ac7820d79ca39 linux-cip-4.19.132-cip30-rt12.tar.gz diff --git a/package/Config.in b/package/Config.in index d7e79f47954..43890d58b95 100644 --- a/package/Config.in +++ b/package/Config.in @@ -15,6 +15,7 @@ menu "Audio and video applications" source "package/aumix/Config.in" source "package/bellagio/Config.in" source "package/bluez-alsa/Config.in" + source "package/chromium/Config.in" source "package/dvblast/Config.in" source "package/dvdauthor/Config.in" source "package/dvdrw-tools/Config.in" @@ -88,6 +89,7 @@ menu "Debugging, profiling and benchmark" source "package/cache-calibrator/Config.in" source "package/clinfo/Config.in" source "package/dacapo/Config.in" + source "package/delve/Config.in" source "package/dhrystone/Config.in" source "package/dieharder/Config.in" source "package/dmalloc/Config.in" @@ -480,6 +482,7 @@ endmenu source "package/libuio/Config.in" source "package/linux-backports/Config.in" source "package/linux-serial-test/Config.in" + source "package/linux4tegra/Config.in" source "package/linuxconsoletools/Config.in" source "package/lirc-tools/Config.in" source "package/lm-sensors/Config.in" @@ -500,6 +503,7 @@ endmenu source "package/nanocom/Config.in" source "package/neard/Config.in" source "package/nvidia-driver/Config.in" + source "package/nvidia-modprobe/Config.in" source "package/nvidia-tegra23/Config.in" source "package/nvme/Config.in" source "package/ofono/Config.in" @@ -1508,6 +1512,7 @@ menu "Hardware handling" source "package/libllcp/Config.in" source "package/libmbim/Config.in" source "package/libnfc/Config.in" + source "package/libnvidia-container/Config.in" source "package/libpciaccess/Config.in" source "package/libphidget/Config.in" source "package/libpri/Config.in" @@ -1804,6 +1809,7 @@ menu "Other" source "package/clang/Config.in" source "package/clapack/Config.in" source "package/cmocka/Config.in" + source "package/compiler-rt/Config.in" source "package/cppcms/Config.in" source "package/cracklib/Config.in" source "package/dawgdic/Config.in" @@ -2382,6 +2388,8 @@ menu "System tools" source "package/netifrc/Config.in" source "package/numactl/Config.in" source "package/nut/Config.in" + source "package/nvidia-container-runtime/Config.in" + source "package/nvidia-container-toolkit/Config.in" source "package/openrc/Config.in" source "package/openvmtools/Config.in" source "package/pamtester/Config.in" diff --git a/package/Config.in.host b/package/Config.in.host index fb29622ccb8..5356aaf9bdb 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -39,6 +39,7 @@ menu "Host utilities" source "package/jsmin/Config.in.host" source "package/libp11/Config.in.host" source "package/lld/Config.in.host" + source "package/llvm/Config.in.host" source "package/lpc3250loader/Config.in.host" source "package/lttng-babeltrace/Config.in.host" source "package/mender-artifact/Config.in.host" diff --git a/package/acpica/acpica.hash b/package/acpica/acpica.hash index 961ee9dbe3c..a2fdfe602e0 100644 --- a/package/acpica/acpica.hash +++ b/package/acpica/acpica.hash @@ -1,3 +1,3 @@ # locally computed hash -sha256 ad8a7b1571ec94d8c1837cf0c89ff33ea820780362fbb3e26adbde96beed5205 acpica-unix2-20200528.tar.gz +sha256 8a49904744a8159b7f325ed941b56968ba37a0371c634036628064f97538de4b acpica-unix2-20200717.tar.gz sha256 cb17c679d3291eba1a70a1336062fb07eec2e839b0821b443b24f41de18c5218 source/include/acpi.h diff --git a/package/acpica/acpica.mk b/package/acpica/acpica.mk index 8f1a36fbb70..21ecc155be2 100644 --- a/package/acpica/acpica.mk +++ b/package/acpica/acpica.mk @@ -4,7 +4,7 @@ # ################################################################################ -ACPICA_VERSION = 20200528 +ACPICA_VERSION = 20200717 ACPICA_SOURCE = acpica-unix2-$(ACPICA_VERSION).tar.gz ACPICA_SITE = https://acpica.org/sites/acpica/files ACPICA_LICENSE = BSD-3-Clause or GPL-2.0 diff --git a/package/alsa-utils/alsa-utils.mk b/package/alsa-utils/alsa-utils.mk index 27894d3e92b..4776a174543 100644 --- a/package/alsa-utils/alsa-utils.mk +++ b/package/alsa-utils/alsa-utils.mk @@ -86,10 +86,10 @@ define ALSA_UTILS_INSTALL_INIT_SYSTEMD $(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service $(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-state.service \ $(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service - mkdir $(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d printf '[Install]\nWantedBy=multi-user.target\n' \ >$(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d/buildroot-enable.conf - mkdir $(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d printf '[Install]\nWantedBy=multi-user.target\n' \ >$(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d/buildroot-enable.conf; endef diff --git a/package/apparmor/apparmor.mk b/package/apparmor/apparmor.mk index f6679660824..51820999ebf 100644 --- a/package/apparmor/apparmor.mk +++ b/package/apparmor/apparmor.mk @@ -53,6 +53,15 @@ ifeq ($(BR2_PACKAGE_APACHE),y) APPARMOR_DEPENDENCIES += apache APPARMOR_TOOLS += changehat/mod_apparmor APPARMOR_MAKE_OPTS += APXS=$(STAGING_DIR)/usr/bin/apxs + +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y) +define APPARMOR_FIXUP_APXS + $(SED) "s@$(PER_PACKAGE_DIR)/[^/]\+/@$(PER_PACKAGE_DIR)/apparmor/@g" \ + $(STAGING_DIR)/usr/bin/apxs \ + $(STAGING_DIR)/usr/build/config_vars.mk +endef +APPARMOR_POST_CONFIGURE_HOOKS += APPARMOR_FIXUP_APXS +endif endif define APPARMOR_BUILD_CMDS diff --git a/package/bandwidthd/bandwidthd.service b/package/bandwidthd/bandwidthd.service index 9c03d42946e..ab7f05a2e85 100644 --- a/package/bandwidthd/bandwidthd.service +++ b/package/bandwidthd/bandwidthd.service @@ -5,7 +5,7 @@ After=network.target [Service] Type=forking ExecStart=/usr/bin/bandwidthd -PIDFile=/var/run/bandwidthd.pid +PIDFile=/run/bandwidthd.pid [Install] WantedBy=multi-user.target diff --git a/package/bash/0017-bash50-017.patch b/package/bash/0017-bash50-017.patch new file mode 100644 index 00000000000..6758b203f86 --- /dev/null +++ b/package/bash/0017-bash50-017.patch @@ -0,0 +1,293 @@ +From https://ftp.gnu.org/gnu/bash/bash-5.0-patches/bash55-017 + +Signed-off-by: Peter Korsgaard + + BASH PATCH REPORT + ================= + +Bash-Release: 5.0 +Patch-ID: bash50-017 + +Bug-Reported-by: Valentin Lab +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-03/msg00062.html + +Bug-Description: + +There were cases where patch 16 reaped process substitution file descriptors +(or FIFOs) and processes to early. This is a better fix for the problem that +bash50-016 attempted to solve. + +Patch (apply with `patch -p0'): + +*** bash-5.0-patched/subst.c 2019-08-29 11:16:49.000000000 -0400 +--- b/subst.c 2020-04-02 16:24:19.000000000 -0400 +*************** +*** 5337,5341 **** + } + +! char * + copy_fifo_list (sizep) + int *sizep; +--- b/5337,5341 ---- + } + +! void * + copy_fifo_list (sizep) + int *sizep; +*************** +*** 5343,5347 **** + if (sizep) + *sizep = 0; +! return (char *)NULL; + } + +--- b/5343,5347 ---- + if (sizep) + *sizep = 0; +! return (void *)NULL; + } + +*************** +*** 5409,5414 **** + if (fifo_list[i].file) + { +! fifo_list[j].file = fifo_list[i].file; +! fifo_list[j].proc = fifo_list[i].proc; + j++; + } +--- b/5409,5419 ---- + if (fifo_list[i].file) + { +! if (i != j) +! { +! fifo_list[j].file = fifo_list[i].file; +! fifo_list[j].proc = fifo_list[i].proc; +! fifo_list[i].file = (char *)NULL; +! fifo_list[i].proc = 0; +! } + j++; + } +*************** +*** 5426,5433 **** + void + close_new_fifos (list, lsize) +! char *list; + int lsize; + { + int i; + + if (list == 0) +--- b/5431,5439 ---- + void + close_new_fifos (list, lsize) +! void *list; + int lsize; + { + int i; ++ char *plist; + + if (list == 0) +*************** +*** 5437,5442 **** + } + +! for (i = 0; i < lsize; i++) +! if (list[i] == 0 && i < fifo_list_size && fifo_list[i].proc != -1) + unlink_fifo (i); + +--- b/5443,5448 ---- + } + +! for (plist = (char *)list, i = 0; i < lsize; i++) +! if (plist[i] == 0 && i < fifo_list_size && fifo_list[i].proc != -1) + unlink_fifo (i); + +*************** +*** 5560,5568 **** + } + +! char * + copy_fifo_list (sizep) + int *sizep; + { +! char *ret; + + if (nfds == 0 || totfds == 0) +--- b/5566,5574 ---- + } + +! void * + copy_fifo_list (sizep) + int *sizep; + { +! void *ret; + + if (nfds == 0 || totfds == 0) +*************** +*** 5570,5579 **** + if (sizep) + *sizep = 0; +! return (char *)NULL; + } + + if (sizep) + *sizep = totfds; +! ret = (char *)xmalloc (totfds * sizeof (pid_t)); + return (memcpy (ret, dev_fd_list, totfds * sizeof (pid_t))); + } +--- b/5576,5585 ---- + if (sizep) + *sizep = 0; +! return (void *)NULL; + } + + if (sizep) + *sizep = totfds; +! ret = xmalloc (totfds * sizeof (pid_t)); + return (memcpy (ret, dev_fd_list, totfds * sizeof (pid_t))); + } +*************** +*** 5648,5655 **** + void + close_new_fifos (list, lsize) +! char *list; + int lsize; + { + int i; + + if (list == 0) +--- b/5654,5662 ---- + void + close_new_fifos (list, lsize) +! void *list; + int lsize; + { + int i; ++ pid_t *plist; + + if (list == 0) +*************** +*** 5659,5664 **** + } + +! for (i = 0; i < lsize; i++) +! if (list[i] == 0 && i < totfds && dev_fd_list[i]) + unlink_fifo (i); + +--- b/5666,5671 ---- + } + +! for (plist = (pid_t *)list, i = 0; i < lsize; i++) +! if (plist[i] == 0 && i < totfds && dev_fd_list[i]) + unlink_fifo (i); + +*** bash-5.0-patched/subst.h 2018-10-21 18:46:09.000000000 -0400 +--- b/subst.h 2020-04-02 16:29:28.000000000 -0400 +*************** +*** 274,280 **** + extern void unlink_fifo __P((int)); + +! extern char *copy_fifo_list __P((int *)); +! extern void unlink_new_fifos __P((char *, int)); +! extern void close_new_fifos __P((char *, int)); + + extern void clear_fifo_list __P((void)); +--- b/274,279 ---- + extern void unlink_fifo __P((int)); + +! extern void *copy_fifo_list __P((int *)); +! extern void close_new_fifos __P((void *, int)); + + extern void clear_fifo_list __P((void)); +*** bash-5.0-patched/execute_cmd.c 2020-02-06 20:16:48.000000000 -0500 +--- b/execute_cmd.c 2020-04-02 17:00:10.000000000 -0400 +*************** +*** 565,569 **** + #if defined (PROCESS_SUBSTITUTION) + volatile int ofifo, nfifo, osize, saved_fifo; +! volatile char *ofifo_list; + #endif + +--- b/565,569 ---- + #if defined (PROCESS_SUBSTITUTION) + volatile int ofifo, nfifo, osize, saved_fifo; +! volatile void *ofifo_list; + #endif + +*************** +*** 751,760 **** + # endif + +! if (variable_context != 0) /* XXX - also if sourcelevel != 0? */ + { + ofifo = num_fifos (); + ofifo_list = copy_fifo_list ((int *)&osize); + begin_unwind_frame ("internal_fifos"); +! add_unwind_protect (xfree, ofifo_list); + saved_fifo = 1; + } +--- b/751,762 ---- + # endif + +! /* XXX - also if sourcelevel != 0? */ +! if (variable_context != 0) + { + ofifo = num_fifos (); + ofifo_list = copy_fifo_list ((int *)&osize); + begin_unwind_frame ("internal_fifos"); +! if (ofifo_list) +! add_unwind_protect (xfree, ofifo_list); + saved_fifo = 1; + } +*************** +*** 1100,1123 **** + nfifo = num_fifos (); + if (nfifo > ofifo) +! close_new_fifos ((char *)ofifo_list, osize); + free ((void *)ofifo_list); + discard_unwind_frame ("internal_fifos"); + } +- # if defined (HAVE_DEV_FD) +- /* Reap process substitutions at the end of loops */ +- switch (command->type) +- { +- case cm_while: +- case cm_until: +- case cm_for: +- case cm_group: +- # if defined (ARITH_FOR_COMMAND) +- case cm_arith_for: +- # endif +- reap_procsubs (); +- default: +- break; +- } +- # endif /* HAVE_DEV_FD */ + #endif + +--- b/1102,1109 ---- + nfifo = num_fifos (); + if (nfifo > ofifo) +! close_new_fifos ((void *)ofifo_list, osize); + free ((void *)ofifo_list); + discard_unwind_frame ("internal_fifos"); + } + #endif + + +*** bash-5.0/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 16 + + #endif /* _PATCHLEVEL_H_ */ +--- b/26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 17 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0018-bash50-018.patch b/package/bash/0018-bash50-018.patch new file mode 100644 index 00000000000..efecb1897d2 --- /dev/null +++ b/package/bash/0018-bash50-018.patch @@ -0,0 +1,49 @@ +From https://ftp.gnu.org/gnu/bash/bash-5.0-patches/bash55-018 + +Signed-off-by: Peter Korsgaard + + BASH PATCH REPORT + ================= + +Bash-Release: 5.0 +Patch-ID: bash50-018 + +Bug-Reported-by: oguzismailuysal@gmail.com +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2019-10/msg00098.html + +Bug-Description: + +In certain cases, bash does not perform quoted null removal on patterns +that are used as part of word expansions such as ${parameter##pattern}, so +empty patterns are treated as non-empty. + +Patch (apply with `patch -p0'): + +*** bash-5.0.17/subst.c 2020-04-02 17:14:58.000000000 -0400 +--- b/subst.c 2020-07-09 15:28:19.000000000 -0400 +*************** +*** 5113,5116 **** +--- b/5113,5118 ---- + (int *)NULL, (int *)NULL) + : (WORD_LIST *)0; ++ if (l) ++ word_list_remove_quoted_nulls (l); + pat = string_list (l); + dispose_words (l); + +*** bash-5.0/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 17 + + #endif /* _PATCHLEVEL_H_ */ +--- b/26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 18 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0017-input.h-add-missing-include-on-stdio.h.patch b/package/bash/0019-input.h-add-missing-include-on-stdio.h.patch similarity index 100% rename from package/bash/0017-input.h-add-missing-include-on-stdio.h.patch rename to package/bash/0019-input.h-add-missing-include-on-stdio.h.patch diff --git a/package/bash/0018-locale.c-fix-build-without-wchar.patch b/package/bash/0020-locale.c-fix-build-without-wchar.patch similarity index 100% rename from package/bash/0018-locale.c-fix-build-without-wchar.patch rename to package/bash/0020-locale.c-fix-build-without-wchar.patch diff --git a/package/bison/bison.mk b/package/bison/bison.mk index b73e9163ad8..a2048350207 100644 --- a/package/bison/bison.mk +++ b/package/bison/bison.mk @@ -13,5 +13,6 @@ BISON_LICENSE_FILES = COPYING BISON_MAKE = $(MAKE1) HOST_BISON_DEPENDENCIES = host-m4 HOST_BISON_CONF_OPTS = --enable-relocatable +HOST_BISON_CONF_ENV = ac_cv_libtextstyle=no $(eval $(host-autotools-package)) diff --git a/package/brotli/0001-CMake-Allow-using-BUILD_SHARED_LIBS-to-choose-static.patch b/package/brotli/0001-CMake-Allow-using-BUILD_SHARED_LIBS-to-choose-static.patch index ae5386b1ce6..2a3204fc346 100644 --- a/package/brotli/0001-CMake-Allow-using-BUILD_SHARED_LIBS-to-choose-static.patch +++ b/package/brotli/0001-CMake-Allow-using-BUILD_SHARED_LIBS-to-choose-static.patch @@ -1,6 +1,6 @@ -From 7289e5a378ba13801996a84d89d8fe95c3fc4c11 Mon Sep 17 00:00:00 2001 +From 6cb16322decd643fed9de332d9cda77f7738b7af Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro -Date: Mon, 26 Mar 2018 19:08:31 +0100 +Date: Mon, 7 Sep 2020 12:14:22 +0300 Subject: [PATCH] CMake: Allow using BUILD_SHARED_LIBS to choose static/shared libs @@ -18,16 +18,16 @@ This way, the following will both work as expected: This is helpful for distributions which need (or want) to build only static libraries. ---- - CMakeLists.txt | 42 ++++++++++++++---------------------------- - c/fuzz/test_fuzzer.sh | 6 +++--- - 2 files changed, 17 insertions(+), 31 deletions(-) Signed-off-by: Adrian Perez de Castro -Upstream-Status: Submitted [https://github.com/google/brotli/pull/655] +[Upstream status: https://github.com/google/brotli/pull/655] +--- + CMakeLists.txt | 46 ++++++++++++++----------------------------- + c/fuzz/test_fuzzer.sh | 6 +++--- + 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index fc45f80..3f87f13 100644 +index 4ff3401..f889311 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,8 @@ cmake_minimum_required(VERSION 2.8.6) @@ -36,10 +36,10 @@ index fc45f80..3f87f13 100644 +option(BUILD_SHARED_LIBS "Build shared libraries" ON) + - # If Brotli is being bundled in another project, we don't want to - # install anything. However, we want to let people override this, so - # we'll use the BROTLI_BUNDLED_MODE variable to let them do that; just -@@ -114,10 +116,6 @@ set(BROTLI_LIBRARIES_CORE brotlienc brotlidec brotlicommon) + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to Release as none was specified.") + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE) +@@ -137,10 +139,6 @@ set(BROTLI_LIBRARIES_CORE brotlienc brotlidec brotlicommon) set(BROTLI_LIBRARIES ${BROTLI_LIBRARIES_CORE} ${LIBM_LIBRARY}) mark_as_advanced(BROTLI_LIBRARIES) @@ -50,14 +50,20 @@ index fc45f80..3f87f13 100644 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") add_definitions(-DOS_LINUX) elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") -@@ -137,24 +135,22 @@ endfunction() - transform_sources_list("scripts/sources.lst" "${CMAKE_CURRENT_BINARY_DIR}/sources.lst.cmake") +@@ -161,29 +159,25 @@ transform_sources_list("scripts/sources.lst" "${CMAKE_CURRENT_BINARY_DIR}/source include("${CMAKE_CURRENT_BINARY_DIR}/sources.lst.cmake") --add_library(brotlicommon SHARED ${BROTLI_COMMON_C}) --add_library(brotlidec SHARED ${BROTLI_DEC_C}) --add_library(brotlienc SHARED ${BROTLI_ENC_C}) -- + if(BROTLI_EMSCRIPTEN) +- set(BROTLI_SHARED_LIBS "") +-else() +- set(BROTLI_SHARED_LIBS brotlicommon brotlidec brotlienc) +- add_library(brotlicommon SHARED ${BROTLI_COMMON_C}) +- add_library(brotlidec SHARED ${BROTLI_DEC_C}) +- add_library(brotlienc SHARED ${BROTLI_ENC_C}) ++ set(BUILD_SHARED_LIBS OFF) + endif() + +-set(BROTLI_STATIC_LIBS brotlicommon-static brotlidec-static brotlienc-static) -add_library(brotlicommon-static STATIC ${BROTLI_COMMON_C}) -add_library(brotlidec-static STATIC ${BROTLI_DEC_C}) -add_library(brotlienc-static STATIC ${BROTLI_ENC_C}) @@ -68,27 +74,27 @@ index fc45f80..3f87f13 100644 # Older CMake versions does not understand INCLUDE_DIRECTORIES property. include_directories(${BROTLI_INCLUDE_DIRS}) +-foreach(lib IN LISTS BROTLI_SHARED_LIBS) +- target_compile_definitions(${lib} PUBLIC "BROTLI_SHARED_COMPILATION" ) +- string(TOUPPER "${lib}" LIB) +- set_target_properties (${lib} PROPERTIES DEFINE_SYMBOL "${LIB}_SHARED_COMPILATION") +-endforeach() +if(BUILD_SHARED_LIBS) + foreach(lib brotlicommon brotlidec brotlienc) + target_compile_definitions(${lib} PUBLIC "BROTLI_SHARED_COMPILATION" ) + string(TOUPPER "${lib}" LIB) -+ set_target_properties (${lib} PROPERTIES DEFINE_SYMBOL "${LIB}_SHARED_COMPILATION" ) ++ set_target_properties (${lib} PROPERTIES DEFINE_SYMBOL "${LIB}_SHARED_COMPILATION") + endforeach() +endif() -+ - foreach(lib brotlicommon brotlidec brotlienc) -- target_compile_definitions(${lib} PUBLIC "BROTLI_SHARED_COMPILATION" ) -- string(TOUPPER "${lib}" LIB) -- set_target_properties (${lib} PROPERTIES DEFINE_SYMBOL "${LIB}_SHARED_COMPILATION" ) --endforeach() -- --foreach(lib brotlicommon brotlidec brotlienc brotlicommon-static brotlidec-static brotlienc-static) + +-foreach(lib IN LISTS BROTLI_SHARED_LIBS BROTLI_STATIC_LIBS) ++foreach(lib brotlicommon brotlidec brotlienc) target_link_libraries(${lib} ${LIBM_LIBRARY}) set_property(TARGET ${lib} APPEND PROPERTY INCLUDE_DIRECTORIES ${BROTLI_INCLUDE_DIRS}) set_target_properties(${lib} PROPERTIES -@@ -167,9 +163,6 @@ endforeach() - target_link_libraries(brotlidec brotlicommon) +@@ -200,9 +194,6 @@ target_link_libraries(brotlidec brotlicommon) target_link_libraries(brotlienc brotlicommon) + endif() -target_link_libraries(brotlidec-static brotlicommon-static) -target_link_libraries(brotlienc-static brotlicommon-static) @@ -96,7 +102,7 @@ index fc45f80..3f87f13 100644 # For projects stuck on older versions of CMake, this will set the # BROTLI_INCLUDE_DIRS and BROTLI_LIBRARIES variables so they still # have a relatively easy way to use Brotli: -@@ -183,7 +176,7 @@ endif() +@@ -216,7 +207,7 @@ endif() # Build the brotli executable add_executable(brotli ${BROTLI_CLI_C}) @@ -104,8 +110,8 @@ index fc45f80..3f87f13 100644 +target_link_libraries(brotli ${BROTLI_LIBRARIES}) # Installation - if(NOT BROTLI_BUNDLED_MODE) -@@ -199,13 +192,6 @@ if(NOT BROTLI_BUNDLED_MODE) + if(NOT BROTLI_EMSCRIPTEN) +@@ -233,13 +224,6 @@ if(NOT BROTLI_BUNDLED_MODE) RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ) @@ -119,26 +125,6 @@ index fc45f80..3f87f13 100644 install( DIRECTORY ${BROTLI_INCLUDE_DIRS}/brotli DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -diff --git a/c/fuzz/test_fuzzer.sh b/c/fuzz/test_fuzzer.sh -index 9985194..4b99947 100755 ---- a/c/fuzz/test_fuzzer.sh -+++ b/c/fuzz/test_fuzzer.sh -@@ -13,12 +13,12 @@ mkdir bin - cd bin - - cmake $BROTLI -DCMAKE_C_COMPILER="$CC" \ -- -DBUILD_TESTING=OFF -DENABLE_SANITIZER=address --make -j$(nproc) brotlidec-static -+ -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DENABLE_SANITIZER=address -+make -j$(nproc) brotlidec - - ${CC} -o run_decode_fuzzer -std=c99 -fsanitize=address -I$SRC/include \ - $SRC/fuzz/decode_fuzzer.c $SRC/fuzz/run_decode_fuzzer.c \ -- ./libbrotlidec-static.a ./libbrotlicommon-static.a -+ ./libbrotlidec.a ./libbrotlicommon.a - - mkdir decode_corpora - unzip $BROTLI/java/org/brotli/integration/fuzz_data.zip -d decode_corpora -- -2.19.1 +2.28.0 diff --git a/package/brotli/0002-Revert-Add-runtime-linker-path-to-pkg-config-files.patch b/package/brotli/0002-Revert-Add-runtime-linker-path-to-pkg-config-files.patch new file mode 100644 index 00000000000..892aa1da15d --- /dev/null +++ b/package/brotli/0002-Revert-Add-runtime-linker-path-to-pkg-config-files.patch @@ -0,0 +1,51 @@ +From 09b0992b6acb7faa6fd3b23f9bc036ea117230fc Mon Sep 17 00:00:00 2001 +From: Eugene Kliuchnikov +Date: Wed, 2 Sep 2020 11:38:26 +0200 +Subject: [PATCH] Revert "Add runtime linker path to pkg-config files (#740)" + (#838) + +This reverts commit 31754d4ffce14153b5c2addf7a11019ec23f51c1. +[Retrieved from: +https://github.com/google/brotli/commit/09b0992b6acb7faa6fd3b23f9bc036ea117230fc] +Signed-off-by: Fabrice Fontaine +--- + scripts/libbrotlicommon.pc.in | 2 +- + scripts/libbrotlidec.pc.in | 2 +- + scripts/libbrotlienc.pc.in | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/scripts/libbrotlicommon.pc.in b/scripts/libbrotlicommon.pc.in +index 10ca969e..2a8cf7a3 100644 +--- a/scripts/libbrotlicommon.pc.in ++++ b/scripts/libbrotlicommon.pc.in +@@ -7,5 +7,5 @@ Name: libbrotlicommon + URL: https://github.com/google/brotli + Description: Brotli common dictionary library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -R${libdir} -lbrotlicommon ++Libs: -L${libdir} -lbrotlicommon + Cflags: -I${includedir} +diff --git a/scripts/libbrotlidec.pc.in b/scripts/libbrotlidec.pc.in +index e7c3124f..6f8ef2e4 100644 +--- a/scripts/libbrotlidec.pc.in ++++ b/scripts/libbrotlidec.pc.in +@@ -7,6 +7,6 @@ Name: libbrotlidec + URL: https://github.com/google/brotli + Description: Brotli decoder library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -R${libdir} -lbrotlidec ++Libs: -L${libdir} -lbrotlidec + Requires.private: libbrotlicommon >= 1.0.2 + Cflags: -I${includedir} +diff --git a/scripts/libbrotlienc.pc.in b/scripts/libbrotlienc.pc.in +index 4dd0811b..2098afe2 100644 +--- a/scripts/libbrotlienc.pc.in ++++ b/scripts/libbrotlienc.pc.in +@@ -7,6 +7,6 @@ Name: libbrotlienc + URL: https://github.com/google/brotli + Description: Brotli encoder library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -R${libdir} -lbrotlienc ++Libs: -L${libdir} -lbrotlienc + Requires.private: libbrotlicommon >= 1.0.2 + Cflags: -I${includedir} diff --git a/package/brotli/brotli.hash b/package/brotli/brotli.hash index 82163040d16..22f894c403b 100644 --- a/package/brotli/brotli.hash +++ b/package/brotli/brotli.hash @@ -1,5 +1,5 @@ # Locally generated: -sha512 a82362aa36d2f2094bca0b2808d9de0d57291fb3a4c29d7c0ca0a37e73087ec5ac4df299c8c363e61106fccf2fe7f58b5cf76eb97729e2696058ef43b1d3930a v1.0.7.tar.gz +sha512 b8e2df955e8796ac1f022eb4ebad29532cb7e3aa6a4b6aee91dbd2c7d637eee84d9a144d3e878895bb5e62800875c2c01c8f737a1261020c54feacf9f676b5f5 v1.0.9.tar.gz # Hash for license files: sha512 bae78184c2f50f86d8c727826d3982c469454c42b9af81f4ef007e39036434fa894cf5be3bf5fc65b7de2301f0a72d067a8186e303327db8a96bd14867e0a3a8 LICENSE diff --git a/package/brotli/brotli.mk b/package/brotli/brotli.mk index 134f480895b..5209d3186be 100644 --- a/package/brotli/brotli.mk +++ b/package/brotli/brotli.mk @@ -4,7 +4,7 @@ # ################################################################################ -BROTLI_VERSION = 1.0.7 +BROTLI_VERSION = 1.0.9 BROTLI_SOURCE = v$(BROTLI_VERSION).tar.gz BROTLI_SITE = https://github.com/google/brotli/archive BROTLI_LICENSE = MIT diff --git a/package/chromium/Config.in b/package/chromium/Config.in new file mode 100644 index 00000000000..1dff413315a --- /dev/null +++ b/package/chromium/Config.in @@ -0,0 +1,90 @@ +config BR2_PACKAGE_CHROMIUM_ARCH_SUPPORTS + bool + default y if BR2_arm + default y if BR2_aarch64 + default y if BR2_i386 + default y if BR2_x86_64 + +config BR2_PACKAGE_CHROMIUM_TARGET_ARCH + string + default "arm" if BR2_arm + default "arm64" if BR2_aarch64 + default "x86" if BR2_i386 + default "x64" if BR2_x86_64 + +menuconfig BR2_PACKAGE_CHROMIUM + bool "chromium" + depends on BR2_HOST_GCC_AT_LEAST_4_9 # gn requires -std=c++14 + depends on BR2_INSTALL_LIBSTDCPP # icu + depends on BR2_USE_WCHAR # icu + depends on BR2_PACKAGE_HAS_LIBGL + depends on BR2_PACKAGE_XORG7 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # icu + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_TOOLCHAIN_HAS_THREADS # icu + depends on !BR2_BINFMT_FLAT # icu + select BR2_PACKAGE_AT_SPI2_ATK + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_COMPILER_RT + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FLAC + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_HARFBUZZ + select BR2_PACKAGE_HOST_CLANG + select BR2_PACKAGE_HOST_ICU + select BR2_PACKAGE_HOST_LLD + select BR2_PACKAGE_HOST_NINJA + select BR2_PACKAGE_HOST_NODEJS + select BR2_PACKAGE_HOST_PKGCONF + select BR2_PACKAGE_HOST_PYTHON + select BR2_PACKAGE_ICU + select BR2_PACKAGE_JPEG_TURBO + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBERATION # runtime + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBKRB5 + select BR2_PACKAGE_LIBNSS + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + select BR2_PACKAGE_MINIZIP + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_NCURSES_WCHAR + select BR2_PACKAGE_OPUS + select BR2_PACKAGE_PANGO + select BR2_PACKAGE_SNAPPY + select BR2_PACKAGE_WEBP + select BR2_PACKAGE_WEBP_MUX + select BR2_PACKAGE_WEBP_DEMUX + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XLIB_LIBXI if !BR2_PACKAGE_LIBGTK3_X11 + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXSCRNSAVER + select BR2_PACKAGE_XLIB_LIBXTST if !BR2_PACKAGE_LIBGTK3_X11 + select BR2_PACKAGE_LIBGTK3 + help + Chromium is an open-source Web browser project started by + Google, to provide the source code for the proprietary + Google Chrome browser. + +if BR2_PACKAGE_CHROMIUM + +config BR2_PACKAGE_CHROMIUM_PROPRIETARY_CODECS + bool "Enable proprietary codecs" + help + Enables proprietary codecs with additional licensing + restrictions, such as MP3 and H264 + +endif # BR2_PACKAGE_CHROMIUM + +comment "chromium needs toolchain w/ Glibc, host gcc >= 4.9.0, dynamic library" + depends on BR2_PACKAGE_CHROMIUM_ARCH_SUPPORTS \ + && !BR2_TOOLCHAIN_USES_GLIBC \ + || !BR2_HOST_GCC_AT_LEAST_4_9 + +comment "chromium needs X.org and an OpenGL backend" + depends on BR2_PACKAGE_CHROMIUM_ARCH_SUPPORTS \ + && !BR2_PACKAGE_XORG7 \ + || !BR2_PACKAGE_HAS_LIBGL diff --git a/package/chromium/chromium.hash b/package/chromium/chromium.hash new file mode 100644 index 00000000000..735fc619ff4 --- /dev/null +++ b/package/chromium/chromium.hash @@ -0,0 +1,2 @@ +sha256 53e2791c18f675cfee32cb5e9c0cdca9756f4051c55fb8bb12d592a61c4f3bdb chromium-88.0.4296.2.tar.gz +sha256 845022e0c1db1abb41a6ba4cd3c4b674ec290f3359d9d3c78ae558d4c0ed9308 LICENSE diff --git a/package/chromium/chromium.mk b/package/chromium/chromium.mk new file mode 100644 index 00000000000..b5d1c752eb9 --- /dev/null +++ b/package/chromium/chromium.mk @@ -0,0 +1,204 @@ +################################################################################ +# +# Chromium +# +################################################################################ + +CHROMIUM_VERSION = 88.0.4296.2 +CHROMIUM_SITE = $(call github,chromium,chromium,$(CHROMIUM_VERSION)) +CHROMIUM_LICENSE = BSD-Style +CHROMIUM_LICENSE_FILES = LICENSE +CHROMIUM_DEPENDENCIES = atk at-spi2-core at-spi2-atk alsa-lib cairo ffmpeg \ + flac fontconfig freetype harfbuzz host-clang host-ninja host-nodejs \ + host-pkgconf host-python icu jpeg libdrm libglib2 libkrb5 libnss libpng libxml2 libxslt \ + minizip opus ncurses pango snappy webp xlib_libXcomposite xlib_libXScrnSaver \ + xlib_libXcursor xlib_libXrandr zlib compiler-rt + +CHROMIUM_TOOLCHAIN_CONFIG_PATH = $(shell pwd)/package/chromium/toolchain + +CHROMIUM_OPTS = \ + custom_toolchain=\"//build/toolchain/linux/unbundle:default\" \ + host_toolchain=\"//build/toolchain/linux/unbundle:host\" \ + v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\" \ + is_clang=true \ + clang_use_chrome_plugins=false \ + treat_warnings_as_errors=false \ + use_gnome_keyring=false \ + linux_use_bundled_binutils=false \ + use_sysroot=false \ + target_cpu=\"$(BR2_PACKAGE_CHROMIUM_TARGET_ARCH)\" \ + enable_nacl=false \ + enable_swiftshader=false \ + enable_linux_installer=false \ + is_official_build=true \ + use_custom_libcxx=false \ + clang_use_default_sample_profile=false \ + is_cfi=false \ + pkg_config=\"PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig" $(HOST_DIR)/usr/bin/pkgconf\" \ + use_system_libjpeg=true \ + use_system_libpng=true \ + use_system_harfbuzz=true \ + use_system_freetype=true + +CHROMIUM_SYSTEM_LIBS = \ + ffmpeg \ + flac \ + fontconfig \ + freetype \ + harfbuzz-ng \ + libdrm \ + libjpeg \ + libpng \ + libvpx \ + libwebp \ + libxml \ + libxslt \ + openh264 \ + opus \ + re2 \ + snappy \ + yasm \ + zlib + +ifeq ($(BR2_i386)$(BR2_x86_64),y) +CHROMIUM_SYSTEM_LIBS += yasm +CHROMIUM_DEPENDENCIES += host-yasm +endif + +# tcmalloc has portability issues +CHROMIUM_OPTS += use_allocator=\"none\" + +ifneq (BR2_PACKAGE_GTK2,y) +CHROMIUM_DEPENDENCIES += libgtk3 +else +CHROMIUM_DEPENDENCIES += libgtk2 +CHROMIUM_OPTS += gtk_version=2 +endif + +# V8 snapshots require compiling V8 with the same word size as the target +# architecture, which means the host needs to have that toolchain available. +# +# Additionally, v8_context_snapshot_generator requires host-ffmpeg, which +# doesn't currently build. +CHROMIUM_OPTS += v8_use_snapshot=false + +ifeq ($(BR2_CCACHE),y) +CHROMIUM_OPTS += cc_wrapper=\"ccache\" +endif + +# LLD is unsupported on i386, and fails during linking +ifeq ($(BR2_i386)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) +CHROMIUM_OPTS += use_lld=false +# Disable gold as well, to force usage of our toolchain's ld.bfd +CHROMIUM_OPTS += use_gold=false +else +CHROMIUM_DEPENDENCIES += host-lld +CHROMIUM_OPTS += use_lld=true +endif + +ifeq ($(BR2_ENABLE_DEBUG),y) +CHROMIUM_OPTS += is_debug=true +else +CHROMIUM_OPTS += is_debug=false +CHROMIUM_OPTS += blink_symbol_level=0 +endif + +ifeq ($(BR2_PACKAGE_CUPS),y) +CHROMIUM_DEPENDENCIES += cups +CHROMIUM_OPTS += use_cups=true +else +CHROMIUM_OPTS += use_cups=false +endif + +ifeq ($(BR2_PACKAGE_CHROMIUM_PROPRIETARY_CODECS),y) +CHROMIUM_OPTS += proprietary_codecs=true ffmpeg_branding=\"Chrome\" +endif + +ifeq ($(BR2_PACKAGE_PCIUTILS),y) +CHROMIUM_DEPENDENCIES += pciutils +CHROMIUM_OPTS += use_libpci=true +else +CHROMIUM_OPTS += use_libpci=false +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +CHROMIUM_DEPENDENCIES += pulseaudio +CHROMIUM_OPTS += use_pulseaudio=true +else +CHROMIUM_OPTS += use_pulseaudio=false +endif + +#ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +#CHROMIUM_TARGET_LDFLAGS += --gcc-toolchain=$(TOOLCHAIN_EXTERNAL_INSTALL_DIR) +#else +#CHROMIUM_TARGET_LDFLAGS += --gcc-toolchain=$(HOST_DIR) +#endif + +# This is required for compatibility with host-icu, which is configured +# with --disable-renaming +#CHROMIUM_HOST_CXXFLAGS += -DU_DISABLE_RENAMING=1 + +#CHROMIUM_TARGET_CFLAGS += $(CHROMIUM_TARGET_LDFLAGS) +#CHROMIUM_TARGET_CXXFLAGS += $(CHROMIUM_TARGET_CFLAGS) + +define CHROMIUM_CONFIGURE_CMDS + # Allow building against system libraries in official builds + ( cd $(@D); \ + sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ + tools/generate_shim_headers/generate_shim_headers.py \ + ) + + mkdir -p $(@D)/third_party/node/linux/node-linux-x64/bin + ln -sf $(HOST_DIR)/bin/node $(@D)/third_party/node/linux/node-linux-x64/bin/ + + # Use python2 by default + mkdir -p $(@D)/bin + ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/bin/python + + ( cd $(@D); \ + $(TARGET_MAKE_ENV) \ + build/linux/unbundle/replace_gn_files.py \ + --system-libraries $(CHROMIUM_SYSTEM_LIBS) \ + ) + + ( cd $(@D); \ + $(TARGET_MAKE_ENV) \ + BUILD_CC="clang" \ + BUILD_CXX="clang++" \ + BUILD_AR="$(HOSTAR)" \ + BUILD_NM="$(HOSTNM)" \ + BUILD_CFLAGS="$(HOST_CFLAGS)" \ + BUILD_CXXFLAGS="$(HOST_CXXFLAGS)" \ + BUILD_LDFLAGS="$(HOST_LDFLAGS)" \ + CC="clang" \ + CXX="clang++" \ + AR="ar" \ + NM="nm" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CXXFLAGS="$(TARGET_CXXFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + gn gen out/Release --args="$(CHROMIUM_OPTS)" \ + --script-executable=$(HOST_DIR)/bin/python2 \ + ) +endef + +define CHROMIUM_BUILD_CMDS + ( cd $(@D); \ + $(TARGET_MAKE_ENV) \ + PATH=$(@D)/bin:$(BR_PATH) \ + ninja -j$(PARALLEL_JOBS) -C out/Release chrome chrome_sandbox chromedriver \ + ) +endef + +define CHROMIUM_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/out/Release/chrome $(TARGET_DIR)/usr/lib/chromium/chromium + $(INSTALL) -Dm4755 $(@D)/out/Release/chrome_sandbox \ + $(TARGET_DIR)/usr/lib/chromium/chrome-sandbox + cp $(@D)/out/Release/{chrome_{100,200}_percent,resources}.pak \ + $(@D)/out/Release/chromedriver \ + $(TARGET_DIR)/usr/lib/chromium/ + $(INSTALL) -Dm644 -t $(TARGET_DIR)/usr/lib/chromium/locales \ + $(@D)/out/Release/locales/*.pak +endef + +$(eval $(generic-package)) diff --git a/package/chromium/toolchain/BUILD.gn b/package/chromium/toolchain/BUILD.gn new file mode 100644 index 00000000000..e8525bd67dd --- /dev/null +++ b/package/chromium/toolchain/BUILD.gn @@ -0,0 +1,71 @@ +import("//build/toolchain/gcc_toolchain.gni") +import("//build/config/sysroot.gni") + +gcc_toolchain("host") { + cc = getenv("HOST_CC") + cxx = getenv("HOST_CXX") + ar = getenv("HOST_AR") + nm = getenv("HOST_NM") + ld = cxx + + extra_cflags = getenv("HOST_CFLAGS") + extra_cppflags = getenv("HOST_CPPFLAGS") + extra_cxxflags = getenv("HOST_CXXFLAGS") + extra_ldflags = getenv("HOST_LDFLAGS") + + toolchain_args = { + cc_wrapper = "" + current_cpu = host_cpu + current_os = host_os + is_clang = false + use_sysroot = false + use_lld = false + } +} + +gcc_toolchain("target") { + cc = getenv("TARGET_CC") + cxx = getenv("TARGET_CXX") + ar = getenv("TARGET_AR") + nm = getenv("TARGET_NM") + ld = cxx + + extra_cflags = getenv("TARGET_CFLAGS") + extra_cppflags = getenv("TARGET_CPPFLAGS") + extra_cxxflags = getenv("TARGET_CXXFLAGS") + extra_ldflags = getenv("TARGET_LDFLAGS") + + toolchain_args = { + cc_wrapper = "" + current_cpu = target_cpu + current_os = target_os + is_clang = is_clang + use_sysroot = use_sysroot + } +} + +gcc_toolchain("v8_snapshot") { + cc = getenv("V8_CC") + cxx = getenv("V8_CXX") + ar = getenv("V8_AR") + nm = getenv("V8_NM") + ld = cxx + + extra_cflags = getenv("V8_CFLAGS") + extra_cppflags = getenv("V8_CPPFLAGS") + extra_cxxflags = getenv("V8_CXXFLAGS") + extra_ldflags = getenv("V8_LDFLAGS") + + toolchain_args = { + cc_wrapper = "" + if (target_cpu == "x86" || target_cpu == "arm" || target_cpu == "mipsel") { + current_cpu = "x86" + } else { + current_cpu = "x64" + } + current_os = host_os + is_clang = is_clang + use_sysroot = false + } +} + diff --git a/package/cifs-utils/cifs-utils.hash b/package/cifs-utils/cifs-utils.hash index 5eaa84f3704..ca97eb8e560 100644 --- a/package/cifs-utils/cifs-utils.hash +++ b/package/cifs-utils/cifs-utils.hash @@ -1,5 +1,5 @@ # Locally calculated after checking pgp signature -sha256 92fc29c8e9039637f3344267500f1fa381e2cccd7d10142f0c1676fa575904a7 cifs-utils-6.10.tar.bz2 +sha256 b859239a3f204f8220d3e54ed43bf8109e1ef202042dd87ba87492f8878728d9 cifs-utils-6.11.tar.bz2 # Hash for license file: sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/cifs-utils/cifs-utils.mk b/package/cifs-utils/cifs-utils.mk index b59a54d9875..b06ce7dddf4 100644 --- a/package/cifs-utils/cifs-utils.mk +++ b/package/cifs-utils/cifs-utils.mk @@ -4,7 +4,7 @@ # ################################################################################ -CIFS_UTILS_VERSION = 6.10 +CIFS_UTILS_VERSION = 6.11 CIFS_UTILS_SOURCE = cifs-utils-$(CIFS_UTILS_VERSION).tar.bz2 CIFS_UTILS_SITE = http://ftp.samba.org/pub/linux-cifs/cifs-utils CIFS_UTILS_LICENSE = GPL-3.0+ diff --git a/package/compiler-rt/Config.in b/package/compiler-rt/Config.in new file mode 100644 index 00000000000..9afc0d9d604 --- /dev/null +++ b/package/compiler-rt/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_COMPILER_RT + bool "compiler-rt" + depends on BR2_PACKAGE_LLVM + depends on BR2_TOOLCHAIN_USES_GLIBC # asan lib requires + help + A collection of runtime libraries primarily used by clang and + llvm to provide builtins, sanitizer runtimes, and profiling + at runtime. + + https://compiler-rt.llvm.org/ + +comment "compiler-rt requires llvm to be enabled and a glibc toolchain" + depends on !BR2_PACKAGE_LLVM + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/compiler-rt/compiler-rt.hash b/package/compiler-rt/compiler-rt.hash new file mode 100644 index 00000000000..0dd1b588644 --- /dev/null +++ b/package/compiler-rt/compiler-rt.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 c2bfab95c9986318318363d7f371a85a95e333bc0b34fbfa52edbd3f5e3a9077 compiler-rt-9.0.1.src.tar.xz +sha256 417541d990edb3f96327ac03cb67e52eac80fc5c3e7afc69213cd04d7c3b9b27 LICENSE.TXT diff --git a/package/compiler-rt/compiler-rt.mk b/package/compiler-rt/compiler-rt.mk new file mode 100644 index 00000000000..ae3f88cfced --- /dev/null +++ b/package/compiler-rt/compiler-rt.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# compiler-rt +# +################################################################################ + +# Compiler-RT should be bumped together with LLVM and Clang as the run-time is +# tied to the version of those tools +COMPILER_RT_VERSION = 9.0.1 +COMPILER_RT_SOURCE = compiler-rt-$(COMPILER_RT_VERSION).src.tar.xz +COMPILER_RT_SITE = https://github.com/llvm/llvm-project/releases/download/llvmorg-$(COMPILER_RT_VERSION) +COMPILER_RT_LICENSE = NCSA MIT +COMPILER_RT_LICENSE_FILES = LICENSE.TXT +COMPILER_RT_DEPENDENCIES = host-clang llvm + +COMPILER_RT_INSTALL_STAGING = YES +COMPILER_RT_INSTALL_TARGET = NO + +COMPILER_RT_CONF_OPTS=-DCOMPILER_RT_STANDALONE_BUILD=OFF \ + -DCOMPILER_RT_STANDALONE_BUILD=ON \ + -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=$(GNU_TARGET_NAME) \ + -DLLVM_CONFIG_PATH=$(HOST_DIR)/usr/bin/llvm-config + +# The installation of the target runtime libraries defaults to DESTDIR, however +# host-clang resources directory needs a link so Clang can find the runtime +# libraries in the same location they would be if built as part of the Clang +# build. The "resources" directory is loosely documented and seems to be +# assumed, as compiler-rt is usually build at the same time as Clang and not +# standalone. +define COMPILER_RT_SETUP_RUNTIME_LIBS + mkdir -p $(HOST_DIR)/lib/clang/$(HOST_CLANG_VERSION)/lib + ln -sf ../../../../$(GNU_TARGET_NAME)/sysroot/usr/lib/linux $(HOST_DIR)/lib/clang/$(HOST_CLANG_VERSION)/lib/linux +endef +COMPILER_RT_POST_INSTALL_STAGING_HOOKS += COMPILER_RT_SETUP_RUNTIME_LIBS + +$(eval $(cmake-package)) diff --git a/package/cups/70-usb-printers.rules b/package/cups/70-usb-printers.rules new file mode 100644 index 00000000000..67e7f5e9387 --- /dev/null +++ b/package/cups/70-usb-printers.rules @@ -0,0 +1,3 @@ +# Allow USB printers in the lp group +# Match rules converted from usblp.c driver's usblp_ids +ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="07", ATTR{bInterfaceSubClass}=="01", GROUP="lp" diff --git a/package/cups/cups.mk b/package/cups/cups.mk index 2712e535b1e..2f4385671cf 100644 --- a/package/cups/cups.mk +++ b/package/cups/cups.mk @@ -22,6 +22,9 @@ CUPS_CONF_OPTS = \ --disable-gssapi \ --disable-pam \ --libdir=/usr/lib \ + --with-cups-user=lp \ + --with-cups-group=lp \ + --with-system-groups="lpadmin sys root" \ --without-rcdir CUPS_CONFIG_SCRIPTS = cups-config CUPS_DEPENDENCIES = \ @@ -72,9 +75,25 @@ else CUPS_CONF_OPTS += --disable-avahi endif +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +define CUPS_INSTALL_UDEV_RULES + $(INSTALL) -D -m 0644 package/cups/70-usb-printers.rules \ + $(TARGET_DIR)/lib/udev/rules.d/70-usb-printers.rules +endef + +CUPS_POST_INSTALL_TARGET_HOOKS += CUPS_INSTALL_UDEV_RULES +endif + define CUPS_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 package/cups/S81cupsd \ $(TARGET_DIR)/etc/init.d/S81cupsd endef +# lp user is needed to run cups spooler +# lpadmin group membership grants administrative privileges +define CUPS_USERS + lp -1 lp -1 * /var/spool/lpd /bin/false - lp + - - lpadmin -1 * - - - Printers admin group. +endef + $(eval $(autotools-package)) diff --git a/package/delve/Config.in b/package/delve/Config.in new file mode 100644 index 00000000000..008f00d7897 --- /dev/null +++ b/package/delve/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_DELVE + bool "delve" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC # go, cgo + depends on !BR2_TOOLCHAIN_USES_UCLIBC # go + depends on BR2_USE_MMU # go + help + Delve is a debugger for the Go programming language. + + https://github.com/go-delve/delve + +comment "delve needs a glibc toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_USE_MMU diff --git a/package/delve/delve.hash b/package/delve/delve.hash new file mode 100644 index 00000000000..b4dee774ebf --- /dev/null +++ b/package/delve/delve.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 6d9da41a18905c9819e33f475bf911facba1297674d2312ab5d7e2488fac685a delve-1.4.1.tar.gz +sha256 778864b990007e8cef6633f8c372dd05bac1fada6cf67b008afb1483f83b38f5 LICENSE diff --git a/package/delve/delve.mk b/package/delve/delve.mk new file mode 100644 index 00000000000..c7ad5728876 --- /dev/null +++ b/package/delve/delve.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# delve +# +################################################################################ + +DELVE_VERSION = 1.4.1 +DELVE_SITE = $(call github,go-delve,delve,v$(DELVE_VERSION)) + +DELVE_LICENSE = MIT +DELVE_LICENSE_FILES = LICENSE + +DELVE_DEPENDENCIES = host-pkgconf + +DELVE_TAGS = cgo + +DELVE_BUILD_TARGETS = cmd/dlv + +DELVE_INSTALL_BINS = $(notdir $(DELVE_BUILD_TARGETS)) + +$(eval $(golang-package)) diff --git a/package/dhcpcd/dhcpcd.service b/package/dhcpcd/dhcpcd.service index 0552b5c73a3..e648092c9b3 100644 --- a/package/dhcpcd/dhcpcd.service +++ b/package/dhcpcd/dhcpcd.service @@ -5,7 +5,7 @@ After=network.target [Service] Type=forking EnvironmentFile=-/etc/default/dhcpcd -PIDFile=/var/run/dhcpcd.pid +PIDFile=/run/dhcpcd.pid ExecStart=/sbin/dhcpcd $DAEMON_ARGS Restart=always diff --git a/package/dhcpdump/dhcpdump.mk b/package/dhcpdump/dhcpdump.mk index 24138128801..ec9571c0af1 100644 --- a/package/dhcpdump/dhcpdump.mk +++ b/package/dhcpdump/dhcpdump.mk @@ -20,7 +20,7 @@ DHCPDUMP_CFLAGS = $(TARGET_CFLAGS) -DHAVE_STRSEP define DHCPDUMP_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC) $(DHCPDUMP_CFLAGS) \ - -D_GNU_SOURCE" LIBS="$(DHCPDUMP_LIBS)" + -D_GNU_SOURCE" LIBS="$(DHCPDUMP_LIBS)" dhcpdump endef define DHCPDUMP_INSTALL_TARGET_CMDS diff --git a/package/docker-cli/docker-cli.hash b/package/docker-cli/docker-cli.hash index 8868a60e38b..66abfe5224e 100644 --- a/package/docker-cli/docker-cli.hash +++ b/package/docker-cli/docker-cli.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 a5b1d6c5766f77896273e864a448a7f0ea4055bb52f50f884f14ad6ef0d5fdb4 docker-cli-19.03.11.tar.gz +sha256 21b88a00e8f7a3194c0ae1de5a31e3e1728ef6aa2804158dcb502a8b5fd6ae2b docker-cli-19.03.13.tar.gz sha256 2d81ea060825006fc8f3fe28aa5dc0ffeb80faf325b612c955229157b8c10dc0 LICENSE diff --git a/package/docker-cli/docker-cli.mk b/package/docker-cli/docker-cli.mk index 766c984f0b5..d1daee4c327 100644 --- a/package/docker-cli/docker-cli.mk +++ b/package/docker-cli/docker-cli.mk @@ -4,9 +4,8 @@ # ################################################################################ -DOCKER_CLI_VERSION = 19.03.11 +DOCKER_CLI_VERSION = 19.03.13 DOCKER_CLI_SITE = $(call github,docker,cli,v$(DOCKER_CLI_VERSION)) -DOCKER_CLI_WORKSPACE = gopath DOCKER_CLI_LICENSE = Apache-2.0 DOCKER_CLI_LICENSE_FILES = LICENSE diff --git a/package/docker-containerd/docker-containerd.hash b/package/docker-containerd/docker-containerd.hash index 95288be58bd..2ec3d042bad 100644 --- a/package/docker-containerd/docker-containerd.hash +++ b/package/docker-containerd/docker-containerd.hash @@ -1,3 +1,3 @@ # Computed locally -sha256 0811057ab67b78ce911416e793edaeb14b3f1e105d67b8e67b6302e0eab572e4 docker-containerd-1.2.13.tar.gz -sha256 4bbe3b885e8cd1907ab4cf9a41e862e74e24b5422297a4f2fe524e6a30ada2b4 LICENSE +sha256 d410b8efc94e4124990f01de7107223971be8c9258fc651decf9e0ba648485b5 docker-containerd-1.4.1.tar.gz +sha256 4bbe3b885e8cd1907ab4cf9a41e862e74e24b5422297a4f2fe524e6a30ada2b4 LICENSE diff --git a/package/docker-containerd/docker-containerd.mk b/package/docker-containerd/docker-containerd.mk index 5a44489065f..71f9b4c0658 100644 --- a/package/docker-containerd/docker-containerd.mk +++ b/package/docker-containerd/docker-containerd.mk @@ -4,12 +4,12 @@ # ################################################################################ -DOCKER_CONTAINERD_VERSION = 1.2.13 +DOCKER_CONTAINERD_VERSION = 1.4.1 DOCKER_CONTAINERD_SITE = $(call github,containerd,containerd,v$(DOCKER_CONTAINERD_VERSION)) DOCKER_CONTAINERD_LICENSE = Apache-2.0 DOCKER_CONTAINERD_LICENSE_FILES = LICENSE -DOCKER_CONTAINERD_WORKSPACE = vendor +DOCKER_CONTAINERD_GOMOD = github.com/containerd/containerd DOCKER_CONTAINERD_LDFLAGS = \ -X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION) diff --git a/package/docker-engine/docker-engine.hash b/package/docker-engine/docker-engine.hash index 99159f9376e..e7d59326872 100644 --- a/package/docker-engine/docker-engine.hash +++ b/package/docker-engine/docker-engine.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 5ff62d7b3638a275b2c459e53a4d1a7a8fb03dde8305defcd55e05e059e5618d docker-engine-19.03.11.tar.gz +sha256 f43331fef1d24e31f43392fc1fed72b48fc17fd432d341d6eb1f68ca11383406 docker-engine-19.03.13.tar.gz sha256 7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8 LICENSE diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk index 6bb382f5a7d..8cedf307ba1 100644 --- a/package/docker-engine/docker-engine.mk +++ b/package/docker-engine/docker-engine.mk @@ -4,14 +4,14 @@ # ################################################################################ -DOCKER_ENGINE_VERSION = 19.03.11 -DOCKER_ENGINE_SITE = $(call github,docker,engine,v$(DOCKER_ENGINE_VERSION)) +DOCKER_ENGINE_VERSION = 19.03.13 +DOCKER_ENGINE_SITE = $(call github,moby,moby,v$(DOCKER_ENGINE_VERSION)) DOCKER_ENGINE_LICENSE = Apache-2.0 DOCKER_ENGINE_LICENSE_FILES = LICENSE DOCKER_ENGINE_DEPENDENCIES = host-pkgconf -DOCKER_ENGINE_SRC_SUBDIR = github.com/docker/docker +DOCKER_ENGINE_GOMOD = github.com/docker/docker DOCKER_ENGINE_LDFLAGS = \ -X main.GitCommit=$(DOCKER_ENGINE_VERSION) \ diff --git a/package/docker-proxy/docker-proxy.hash b/package/docker-proxy/docker-proxy.hash index 58de697929b..569a21d365e 100644 --- a/package/docker-proxy/docker-proxy.hash +++ b/package/docker-proxy/docker-proxy.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 866c8d196b9396a383b437b0d775476459ed7c11f527c4f6bbf1fd08524b461d docker-proxy-55685ba49593e67f5e1c8180539379b16736c25e.tar.gz -sha256 cb5e8e7e5f4a3988e1063c142c60dc2df75605f4c46515e776e3aca6df976e14 LICENSE +sha256 a3e255d77c1af7e5dadaeebb554a049d7858196a72aba5cb0a51669478d65cc5 docker-proxy-d0951081b35fa4216fc4f0064bf065beeb55a74b.tar.gz +sha256 cb5e8e7e5f4a3988e1063c142c60dc2df75605f4c46515e776e3aca6df976e14 LICENSE diff --git a/package/docker-proxy/docker-proxy.mk b/package/docker-proxy/docker-proxy.mk index 8843266c300..ef791709fc6 100644 --- a/package/docker-proxy/docker-proxy.mk +++ b/package/docker-proxy/docker-proxy.mk @@ -4,7 +4,7 @@ # ################################################################################ -DOCKER_PROXY_VERSION = 55685ba49593e67f5e1c8180539379b16736c25e +DOCKER_PROXY_VERSION = d0951081b35fa4216fc4f0064bf065beeb55a74b DOCKER_PROXY_SITE = $(call github,docker,libnetwork,$(DOCKER_PROXY_VERSION)) DOCKER_PROXY_LICENSE = Apache-2.0 @@ -12,8 +12,6 @@ DOCKER_PROXY_LICENSE_FILES = LICENSE DOCKER_PROXY_DEPENDENCIES = host-pkgconf -DOCKER_PROXY_WORKSPACE = gopath - DOCKER_PROXY_BUILD_TARGETS = cmd/proxy define DOCKER_PROXY_INSTALL_TARGET_CMDS diff --git a/package/ecryptfs-utils/ecryptfs-utils.mk b/package/ecryptfs-utils/ecryptfs-utils.mk index 326ff4f2ddf..3a3253a3664 100644 --- a/package/ecryptfs-utils/ecryptfs-utils.mk +++ b/package/ecryptfs-utils/ecryptfs-utils.mk @@ -15,6 +15,7 @@ ECRYPTFS_UTILS_CONF_OPTS = --disable-pywrap #Needed for build system to find pk11func.h and libnss3.so ECRYPTFS_UTILS_CONF_ENV = \ + ac_cv_path_POD2MAN=true \ NSS_CFLAGS="-I$(STAGING_DIR)/usr/include/nss -I$(STAGING_DIR)/usr/include/nspr" \ NSS_LIBS="-lnss3" diff --git a/package/efl/Config.in b/package/efl/Config.in index 031bff7ad64..60ba87b2436 100644 --- a/package/efl/Config.in +++ b/package/efl/Config.in @@ -1,7 +1,7 @@ config BR2_PACKAGE_EFL bool "efl" - # g++ issue with 4.4.5, tested with g++ 4.7.2 - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11 + depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-efl depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS # untested without threads depends on BR2_USE_MMU @@ -280,8 +280,9 @@ comment "SVG loader needs a toolchain w/ gcc >= 4.8" endif # BR2_PACKAGE_EFL -comment "efl needs a toolchain w/ C++, dynamic library, gcc >= 4.7, threads, wchar" +comment "efl needs a toolchain w/ C++, dynamic library, gcc >= 4.9, host gcc >= 4.9, threads, wchar" depends on !BR2_INSTALL_LIBSTDCPP \ - || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 \ - || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \ + || !BR2_HOST_GCC_AT_LEAST_4_9 || BR2_STATIC_LIBS \ + || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR depends on BR2_USE_MMU diff --git a/package/fail2ban/fail2ban.mk b/package/fail2ban/fail2ban.mk index a0a2dc704b0..a4ee0852cc0 100644 --- a/package/fail2ban/fail2ban.mk +++ b/package/fail2ban/fail2ban.mk @@ -27,6 +27,13 @@ define FAIL2BAN_FIX_DEFAULT_CONFIG endef FAIL2BAN_POST_INSTALL_TARGET_HOOKS += FAIL2BAN_FIX_DEFAULT_CONFIG +# fail2ban-python points to host python +define FAIL2BAN_FIX_FAIL2BAN_PYTHON_SYMLINK + ln -snf $(if $(BR2_PACKAGE_PYTHON),python,python3) \ + $(TARGET_DIR)/usr/bin/fail2ban-python +endef +FAIL2BAN_POST_INSTALL_TARGET_HOOKS += FAIL2BAN_FIX_FAIL2BAN_PYTHON_SYMLINK + define FAIL2BAN_INSTALL_INIT_SYSV $(INSTALL) -D -m 755 package/fail2ban/S60fail2ban \ $(TARGET_DIR)/etc/init.d/S60fail2ban diff --git a/package/fbterm/fbterm.mk b/package/fbterm/fbterm.mk index 712d4f97fa5..9964827801c 100644 --- a/package/fbterm/fbterm.mk +++ b/package/fbterm/fbterm.mk @@ -10,12 +10,6 @@ FBTERM_LICENSE = GPL-2.0+ FBTERM_LICENSE_FILES = COPYING FBTERM_DEPENDENCIES = fontconfig liberation -ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy) -# fontconfig uses pthreads if available, but fbterm forgets to link -# with it breaking static builds -FBTERM_CONF_ENV += LIBS='-lpthread' -endif - ifeq ($(BR2_PACKAGE_GPM),y) FBTERM_DEPENDENCIES += gpm FBTERM_CONF_OPTS += --enable-gpm diff --git a/package/ffmpeg/0002-configure-use-require_pkg_config-to-check-for-wavpac.patch b/package/ffmpeg/0002-configure-use-require_pkg_config-to-check-for-wavpac.patch new file mode 100644 index 00000000000..49c3ccee9b5 --- /dev/null +++ b/package/ffmpeg/0002-configure-use-require_pkg_config-to-check-for-wavpac.patch @@ -0,0 +1,31 @@ +From a507a9cd6525d5b3a1eea32e25a139b4023800a2 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sun, 20 Sep 2020 13:48:00 +0200 +Subject: [PATCH] configure: use require_pkg_config to check for wavpack + +Fixes static builds with toolchains needing "-lm" for math functions. + +Patch sent upstream: +http://ffmpeg.org/pipermail/ffmpeg-devel/2020-September/270127.html + +Signed-off-by: Bernd Kuhls +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 5d68695192..4e6c6edd30 100755 +--- a/configure ++++ b/configure +@@ -6438,7 +6438,7 @@ enabled libvpx && { + fi + } + +-enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack ++enabled libwavpack && require_pkg_config libwavpack wavpack "wavpack/wavpack.h" WavpackOpenFileOutput + enabled libwebp && { + enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion + enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; } +-- +2.27.0 + diff --git a/package/fontconfig/0002-add-pthread-as-a-dependency-of-a-static-lib.patch b/package/fontconfig/0002-add-pthread-as-a-dependency-of-a-static-lib.patch new file mode 100644 index 00000000000..eed9dba0056 --- /dev/null +++ b/package/fontconfig/0002-add-pthread-as-a-dependency-of-a-static-lib.patch @@ -0,0 +1,44 @@ +From 40ec04a8bf36dd8d0aa3da98b167792ce2dcd114 Mon Sep 17 00:00:00 2001 +From: Silvan Scherrer +Date: Sun, 20 Sep 2020 12:52:08 +0200 +Subject: [PATCH] add pthread as a dependency of a static lib + +Downloaded from https://trac.netlabs.org/ports/changeset/2220 + +Patch sent upstream: +https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/121 + +Signed-off-by: Bernd Kuhls +--- + configure.ac | 2 ++ + fontconfig.pc.in | 4 ++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f3189a7..594d6fd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -690,6 +690,8 @@ fi + have_pthread=false + if test "$os_win32" = no; then + AX_PTHREAD([have_pthread=true]) ++ AC_SUBST(PTHREAD_CFLAGS) ++ AC_SUBST(PTHREAD_LIBS) + fi + if $have_pthread; then + LIBS="$PTHREAD_LIBS $LIBS" +diff --git a/fontconfig.pc.in b/fontconfig.pc.in +index 61b35fb..f823bac 100644 +--- a/fontconfig.pc.in ++++ b/fontconfig.pc.in +@@ -14,5 +14,5 @@ Version: @VERSION@ + Requires: @PKGCONFIG_REQUIRES@ + Requires.private: @PKGCONFIG_REQUIRES_PRIVATELY@ + Libs: -L${libdir} -lfontconfig +-Libs.private: @ICONV_LIBS@ @PKG_EXPAT_LIBS@ +-Cflags: -I${includedir} @ICONV_CFLAGS@ @PKG_EXPAT_CFLAGS@ ++Libs.private: @ICONV_LIBS@ @PKG_EXPAT_LIBS@ @PTHREAD_LIBS@ ++Cflags: -I${includedir} @ICONV_CFLAGS@ @PKG_EXPAT_CFLAGS@ @PTHREAD_CFLAGS@ +-- +2.27.0 + diff --git a/package/fontconfig/fontconfig.mk b/package/fontconfig/fontconfig.mk index 7387452b0ff..ee82cc1de32 100644 --- a/package/fontconfig/fontconfig.mk +++ b/package/fontconfig/fontconfig.mk @@ -7,6 +7,8 @@ FONTCONFIG_VERSION = 2.13.1 FONTCONFIG_SITE = http://fontconfig.org/release FONTCONFIG_SOURCE = fontconfig-$(FONTCONFIG_VERSION).tar.bz2 +# 0002-add-pthread-as-a-dependency-of-a-static-lib.patch +FONTCONFIG_AUTORECONF = YES FONTCONFIG_INSTALL_STAGING = YES FONTCONFIG_DEPENDENCIES = freetype expat host-pkgconf host-gperf util-linux HOST_FONTCONFIG_DEPENDENCIES = \ diff --git a/package/freetype/freetype.mk b/package/freetype/freetype.mk index 516d1c0cfcd..f4d71bedf72 100644 --- a/package/freetype/freetype.mk +++ b/package/freetype/freetype.mk @@ -14,8 +14,17 @@ FREETYPE_LICENSE_FILES = docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT FREETYPE_DEPENDENCIES = host-pkgconf FREETYPE_CONFIG_SCRIPTS = freetype-config +# harfbuzz already depends on freetype so disable harfbuzz in freetype to avoid +# a circular dependency +FREETYPE_CONF_OPTS = --without-harfbuzz + HOST_FREETYPE_DEPENDENCIES = host-pkgconf -HOST_FREETYPE_CONF_OPTS = --without-zlib --without-bzip2 --without-png +HOST_FREETYPE_CONF_OPTS = \ + --without-brotli \ + --without-bzip2 \ + --without-harfbuzz \ + --without-png \ + --without-zlib # since 2.9.1 needed for freetype-config install FREETYPE_CONF_OPTS += --enable-freetype-config @@ -28,6 +37,13 @@ else FREETYPE_CONF_OPTS += --without-zlib endif +ifeq ($(BR2_PACKAGE_BROTLI),y) +FREETYPE_DEPENDENCIES += brotli +FREETYPE_CONF_OPTS += --with-brotli +else +FREETYPE_CONF_OPTS += --without-brotli +endif + ifeq ($(BR2_PACKAGE_BZIP2),y) FREETYPE_DEPENDENCIES += bzip2 FREETYPE_CONF_OPTS += --with-bzip2 @@ -37,9 +53,7 @@ endif ifeq ($(BR2_PACKAGE_LIBPNG),y) FREETYPE_DEPENDENCIES += libpng -FREETYPE_CONF_OPTS += LIBPNG_CFLAGS="`$(STAGING_DIR)/usr/bin/libpng-config --cflags`" \ - LIBPNG_LDFLAGS="`$(STAGING_DIR)/usr/bin/libpng-config --ldflags`" -FREETYPE_LIBPNG_LIBS = "`$(STAGING_DIR)/usr/bin/libpng-config --libs`" +FREETYPE_CONF_OPTS += --with-png else FREETYPE_CONF_OPTS += --without-png endif @@ -52,14 +66,5 @@ define FREETYPE_FIX_CONFIG_FILE endef FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE -# libpng isn't included in freetype-config & freetype2.pc :-/ -define FREETYPE_FIX_CONFIG_FILE_LIBS - $(SED) "s,^Libs.private:,& $(FREETYPE_LIBPNG_LIBS)," \ - $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc - $(SED) "s,-lfreetype,& $(FREETYPE_LIBPNG_LIBS)," \ - $(STAGING_DIR)/usr/bin/freetype-config -endef -FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE_LIBS - $(eval $(autotools-package)) $(eval $(host-autotools-package)) diff --git a/package/fuse-overlayfs/fuse-overlayfs.hash b/package/fuse-overlayfs/fuse-overlayfs.hash index 4f10be85a95..0c52e05cc91 100644 --- a/package/fuse-overlayfs/fuse-overlayfs.hash +++ b/package/fuse-overlayfs/fuse-overlayfs.hash @@ -1,4 +1,4 @@ # Locally computed -sha256 1c0fa67f806c44d5c51f4bce02fdcb546137a2688a8de76d93d07b79defc9cac fuse-overlayfs-1.1.2.tar.gz +sha256 5df218732244059057686194b0e1fef66fb822d4087db48af88e1bc29bb1afde fuse-overlayfs-1.2.0.tar.gz # Locally computed sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/fuse-overlayfs/fuse-overlayfs.mk b/package/fuse-overlayfs/fuse-overlayfs.mk index 1d19099edac..67bd9d1c7fb 100644 --- a/package/fuse-overlayfs/fuse-overlayfs.mk +++ b/package/fuse-overlayfs/fuse-overlayfs.mk @@ -4,7 +4,7 @@ # ################################################################################ -FUSE_OVERLAYFS_VERSION = 1.1.2 +FUSE_OVERLAYFS_VERSION = 1.2.0 FUSE_OVERLAYFS_SITE = $(call github,containers,fuse-overlayfs,v$(FUSE_OVERLAYFS_VERSION)) FUSE_OVERLAYFS_LICENSE = GPL-3.0 FUSE_OVERLAYFS_LICENSE_FILES = COPYING diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index b834269adca..1eab41a87c8 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -141,6 +141,14 @@ ifeq ($(BR2_sparc)$(BR2_sparc64),y) HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer endif +# The logic in libbacktrace/configure.ac to detect if __sync builtins +# are available assumes they are as soon as target_subdir is not +# empty, i.e when cross-compiling. However, some platforms do not have +# __sync builtins, so help the configure script a bit. +ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_4),) +HOST_GCC_COMMON_CONF_ENV += target_configargs="libbacktrace_cv_sys_sync=no" +endif + # TLS support is not needed on uClibc/no-thread and # uClibc/linux-threads, otherwise, for all other situations (glibc, # musl and uClibc/NPTL), we need it. @@ -223,6 +231,13 @@ HOST_GCC_COMMON_CONF_OPTS += \ --with-long-double-128 endif +# Set default to Secure-PLT to prevent run-time +# generation of PLT stubs (supports RELRO and +# SELinux non-exemem capabilities) +ifeq ($(BR2_powerpc),y) +HOST_GCC_COMMON_CONF_OPTS += --enable-secureplt +endif + # PowerPC64 big endian by default uses the elfv1 ABI, and PowerPC 64 # little endian by default uses the elfv2 ABI. However, musl has # decided to use the elfv2 ABI for both, so we force the elfv2 ABI for @@ -271,11 +286,6 @@ HOST_GCC_COMMON_CCACHE_HASH_FILES += \ ifeq ($(BR2_xtensa),y) HOST_GCC_COMMON_CCACHE_HASH_FILES += $(ARCH_XTENSA_OVERLAY_TAR) endif -ifeq ($(ARCH),powerpc) -ifneq ($(BR2_SOFT_FLOAT),) -HOST_GCC_COMMON_CCACHE_HASH_FILES += package/gcc/$(GCC_VERSION)/1000-powerpc-link-with-math-lib.patch.conditional -endif -endif # _CONF_OPTS contains some references to the absolute path of $(HOST_DIR) # and a reference to the Buildroot git revision (BR2_VERSION_FULL), diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk index 8c74a0e2f67..4bd0187343a 100644 --- a/package/gdb/gdb.mk +++ b/package/gdb/gdb.mk @@ -69,7 +69,8 @@ GDB_DISABLE_BINUTILS_CONF_OPTS = \ --disable-binutils \ --disable-install-libbfd \ --disable-ld \ - --disable-gas + --disable-gas \ + --disable-gprof GDB_CONF_ENV = \ ac_cv_type_uintptr_t=yes \ diff --git a/package/ghostscript/0001-Fix-cross-compilation-issue.patch b/package/ghostscript/0001-Fix-cross-compilation-issue.patch deleted file mode 100644 index a13c7f8381e..00000000000 --- a/package/ghostscript/0001-Fix-cross-compilation-issue.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 5fed765abb8ff07c381cc3ebb9367e9560f7a658 Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls -Date: Mon, 20 Mar 2017 23:43:03 +0100 -Subject: [PATCH] Fix cross compilation issue - -Without this patch unsafe paths are used: -x86_64-linux-gcc: ERROR: unsafe header/library path used in cross-compilation: '/libtiff' - -Downloaded from -http://bugs.ghostscript.com/show_bug.cgi?id=696508#c3 - -Slightly updated to work with 9.23 - -Signed-off-by: Bernd Kuhls -Signed-off-by: Fabrice Fontaine ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index d0f62d7..0d49344 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1173,7 +1173,7 @@ XPSWRITEDEVICE='' - - - LIBTIFFDIR='src' --LIBTIFFCONFDIR='' -+LIBTIFFCONFDIR='src' - TIFFCFLAGS='' - - TIFFDEVS_ALL='tiffs tiff12nc tiff24nc tiff48nc tiff32nc tiff64nc tiffcrle tifflzw tiffpack tiffgray tiffsep tiffsep1 tiffscaled tiffscaled4 tiffscaled8 tiffscaled24 tiffscaled32' - FAX_DEVS_ALL='cfax dfaxlow dfaxhigh fax faxg3 faxg32d faxg4 tiffg3 tiffg32d tiffg4 tfax' --- -2.7.4 - diff --git a/package/ghostscript/ghostscript.hash b/package/ghostscript/ghostscript.hash index d0b2e610df7..143b28014d5 100644 --- a/package/ghostscript/ghostscript.hash +++ b/package/ghostscript/ghostscript.hash @@ -1,5 +1,5 @@ -# From https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs952/SHA512SUMS -sha512 4c4a33884e1138bad553eee61fac1a72158297ad5c2ce46a4b36150848dea8158affaf2b902f4ff03e4f72ebc8154c198b618112624f409230a610b7648faa67 ghostscript-9.52.tar.xz +# From https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9532/SHA512SUMS +sha512 73aa6013aeecbd1345317a40349089a2f19a2205fc11b8ca0b619df1e91f2ca8b03efc09be9e079cb5ab8e1b838aa2236349cd1c177217c14308242f99138ae4 ghostscript-9.53.2.tar.gz # Hash for license file: sha256 6f852249f975287b3efd43a5883875e47fa9f3125e2f1b18b5c09517ac30ecf2 LICENSE diff --git a/package/ghostscript/ghostscript.mk b/package/ghostscript/ghostscript.mk index 9a74563a8ca..e8d35a50bc1 100644 --- a/package/ghostscript/ghostscript.mk +++ b/package/ghostscript/ghostscript.mk @@ -4,13 +4,10 @@ # ################################################################################ -GHOSTSCRIPT_VERSION = 9.52 +GHOSTSCRIPT_VERSION = 9.53.2 GHOSTSCRIPT_SITE = https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs$(subst .,,$(GHOSTSCRIPT_VERSION)) -GHOSTSCRIPT_SOURCE = ghostscript-$(GHOSTSCRIPT_VERSION).tar.xz GHOSTSCRIPT_LICENSE = AGPL-3.0 GHOSTSCRIPT_LICENSE_FILES = LICENSE -# 0001-Fix-cross-compilation-issue.patch -GHOSTSCRIPT_AUTORECONF = YES GHOSTSCRIPT_DEPENDENCIES = \ host-lcms2 \ host-libjpeg \ diff --git a/package/gnupg2/gnupg2.hash b/package/gnupg2/gnupg2.hash index 470681cda9e..ac78385f7a2 100644 --- a/package/gnupg2/gnupg2.hash +++ b/package/gnupg2/gnupg2.hash @@ -1,7 +1,7 @@ -# From https://lists.gnupg.org/pipermail/gnupg-announce/2020q3/000446.html -sha1 4af4c6fe5f9dd7d866243f715b32775500468943 gnupg-2.2.21.tar.bz2 +# From https://lists.gnupg.org/pipermail/gnupg-announce/2020q3/000448.html +sha1 bd949b4af7426e4afc13667d678503063c6aa4b5 gnupg-2.2.23.tar.bz2 # Calculated based on the hash above and signature -# https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.21.tar.bz2.sig +# https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.23.tar.bz2.sig # using key D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 -sha256 61e83278fb5fa7336658a8b73ab26f379d41275bb1c7c6e694dd9f9a6e8e76ec gnupg-2.2.21.tar.bz2 +sha256 10b55e49d78b3e49f1edb58d7541ecbdad92ddaeeb885b6f486ed23d1cd1da5c gnupg-2.2.23.tar.bz2 sha256 bc2d6664f6276fa0a72d57633b3ae68dc7dcb677b71018bf08c8e93e509f1357 COPYING diff --git a/package/gnupg2/gnupg2.mk b/package/gnupg2/gnupg2.mk index e77c84d41ea..af13a8d6c94 100644 --- a/package/gnupg2/gnupg2.mk +++ b/package/gnupg2/gnupg2.mk @@ -4,7 +4,7 @@ # ################################################################################ -GNUPG2_VERSION = 2.2.21 +GNUPG2_VERSION = 2.2.23 GNUPG2_SOURCE = gnupg-$(GNUPG2_VERSION).tar.bz2 GNUPG2_SITE = https://gnupg.org/ftp/gcrypt/gnupg GNUPG2_LICENSE = GPL-3.0+ diff --git a/package/gnutls/gnutls.hash b/package/gnutls/gnutls.hash index 6a4203f3a24..c360a56f93c 100644 --- a/package/gnutls/gnutls.hash +++ b/package/gnutls/gnutls.hash @@ -1,6 +1,6 @@ # Locally calculated after checking pgp signature -# https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.14.tar.xz.sig -sha256 5630751adec7025b8ef955af4d141d00d252a985769f51b4059e5affa3d39d63 gnutls-3.6.14.tar.xz +# https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.15.tar.xz.sig +sha256 0ea8c3283de8d8335d7ae338ef27c53a916f15f382753b174c18b45ffd481558 gnutls-3.6.15.tar.xz # Locally calculated sha256 e79e9c8a0c85d735ff98185918ec94ed7d175efc377012787aebcf3b80f0d90b doc/COPYING sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3 doc/COPYING.LESSER diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk index 34878e97b47..9f53150004f 100644 --- a/package/gnutls/gnutls.mk +++ b/package/gnutls/gnutls.mk @@ -5,7 +5,7 @@ ################################################################################ GNUTLS_VERSION_MAJOR = 3.6 -GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).14 +GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).15 GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz GNUTLS_SITE = https://www.gnupg.org/ftp/gcrypt/gnutls/v$(GNUTLS_VERSION_MAJOR) GNUTLS_LICENSE = LGPL-2.1+ (core library) diff --git a/package/go/go.hash b/package/go/go.hash index f58449d0792..9d651a1bfb7 100644 --- a/package/go/go.hash +++ b/package/go/go.hash @@ -1,3 +1,4 @@ # From https://golang.org/dl/ -sha256 197333e97290e9ea8796f738d61019dcba1c377c2f3961fd6a114918ecc7ab06 go1.13.14.src.tar.gz +sha256 28bf9d0bcde251011caae230a4a05d917b172ea203f2a62f2c2f9533589d4b4d go1.15.2.src.tar.gz +sha256 896a602570e54c8cdfc2c1348abd4ffd1016758d0bd086ccd9787dbfc9b64888 go1.15.3.src.tar.gz sha256 2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 LICENSE diff --git a/package/go/go.mk b/package/go/go.mk index 72604a250b9..63a2cb9d982 100644 --- a/package/go/go.mk +++ b/package/go/go.mk @@ -4,7 +4,7 @@ # ################################################################################ -GO_VERSION = 1.13.14 +GO_VERSION = 1.15.3 GO_SITE = https://storage.googleapis.com/golang GO_SOURCE = go$(GO_VERSION).src.tar.gz @@ -12,10 +12,23 @@ GO_LICENSE = BSD-3-Clause GO_LICENSE_FILES = LICENSE HOST_GO_DEPENDENCIES = host-go-bootstrap +HOST_GO_GOPATH = $(HOST_DIR)/usr/share/go-path HOST_GO_HOST_CACHE = $(HOST_DIR)/usr/share/host-go-cache HOST_GO_ROOT = $(HOST_DIR)/lib/go HOST_GO_TARGET_CACHE = $(HOST_DIR)/usr/share/go-cache +# We pass an empty GOBIN, otherwise "go install: cannot install +# cross-compiled binaries when GOBIN is set" +HOST_GO_COMMON_ENV = \ + GO111MODULE=on \ + GOFLAGS=-mod=vendor \ + GOROOT="$(HOST_GO_ROOT)" \ + GOPATH="$(HOST_GO_GOPATH)" \ + GOPROXY=off \ + PATH=$(BR_PATH) \ + GOBIN= \ + CGO_ENABLED=$(HOST_GO_CGO_ENABLED) + ifeq ($(BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS),y) ifeq ($(BR2_arm),y) @@ -46,12 +59,14 @@ endif # For the convienience of target packages. HOST_GO_TOOLDIR = $(HOST_GO_ROOT)/pkg/tool/linux_$(GO_GOARCH) HOST_GO_TARGET_ENV = \ - GO111MODULE=off \ + $(HOST_GO_COMMON_ENV) \ GOARCH=$(GO_GOARCH) \ GOCACHE="$(HOST_GO_TARGET_CACHE)" \ - GOROOT="$(HOST_GO_ROOT)" \ CC="$(TARGET_CC)" \ CXX="$(TARGET_CXX)" \ + CGO_CFLAGS="$(TARGET_CFLAGS)" \ + CGO_CXXFLAGS="$(TARGET_CXXFLAGS)" \ + CGO_LDFLAGS="$(TARGET_LDFLAGS)" \ GOTOOLDIR="$(HOST_GO_TOOLDIR)" # The go compiler's cgo support uses threads. If BR2_TOOLCHAIN_HAS_THREADS is @@ -77,6 +92,17 @@ else # !BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS HOST_GO_CGO_ENABLED = 1 endif # BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS +# For the convenience of host golang packages +HOST_GO_HOST_ENV = \ + $(HOST_GO_COMMON_ENV) \ + GOARCH="" \ + GOCACHE="$(HOST_GO_HOST_CACHE)" \ + CC="$(HOST_CCNOCCACHE)" \ + CXX="$(HOST_CXXNOCCACHE)" \ + CGO_CFLAGS="$(HOST_CFLAGS)" \ + CGO_CXXFLAGS="$(HOST_CXXFLAGS)" \ + CGO_LDFLAGS="$(HOST_LDFLAGS)" + # The go build system is not compatible with ccache, so use # HOSTCC_NOCCACHE. See https://github.com/golang/go/issues/11685. HOST_GO_MAKE_ENV = \ diff --git a/package/gqview/0002-fix-build-with-gcc-10.patch b/package/gqview/0002-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..55791c78b96 --- /dev/null +++ b/package/gqview/0002-fix-build-with-gcc-10.patch @@ -0,0 +1,27 @@ +fix build with gcc 10 + +Define bar_exif_key_count and bar_exif_key_list as extern to avoid the +following build failure with gcc 10 (which defaults to -fno-common): + +/home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: info.o:(.rodata+0x0): multiple definition of `bar_exif_key_count'; bar_exif.o:(.rodata+0x0): first defined here +/home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: info.o:(.bss+0x0): multiple definition of `bar_exif_key_list'; bar_exif.o:(.data+0x0): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/ab19e23cae603b2aa6e696e4937d106883e78b76 + +Signed-off-by: Fabrice Fontaine + +diff -Naur gqview-2.1.5.orig/src/bar_exif.h gqview-2.1.5/src/bar_exif.h +--- gqview-2.1.5.orig/src/bar_exif.h 2020-09-09 20:32:50.506755031 +0200 ++++ gqview-2.1.5/src/bar_exif.h 2020-09-09 20:33:30.370755818 +0200 +@@ -24,8 +24,8 @@ + + /* these are exposed for when duplication of the exif bar's text is needed */ + +-const gchar **bar_exif_key_list; +-const gint bar_exif_key_count; ++extern const gchar **bar_exif_key_list; ++extern const gint bar_exif_key_count; + + gchar *bar_exif_validate_text(gchar *text); + diff --git a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk index fe80f4751cb..f0c14bc1901 100644 --- a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk +++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk @@ -51,19 +51,22 @@ else GST1_PLUGINS_BASE_CONF_OPTS += -Dorc=disabled endif -ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_API),y) +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_API)$(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_PLATFORM)$(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_WINDOW),yyy) GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=enabled +else +GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=disabled +endif + ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL),y) GST1_PLUGINS_BASE_GL_API_LIST = opengl GST1_PLUGINS_BASE_DEPENDENCIES += libgl libglu endif + ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLES2),y) GST1_PLUGINS_BASE_GL_API_LIST += gles2 GST1_PLUGINS_BASE_DEPENDENCIES += libgles endif -else -GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=disabled -endif + GST1_PLUGINS_BASE_CONF_OPTS += -Dgl_api='$(subst $(space),$(comma),$(GST1_PLUGINS_BASE_GL_API_LIST))' ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLX),y) diff --git a/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk index 9f8b1d33590..0261dc3233c 100644 --- a/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk +++ b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk @@ -89,7 +89,7 @@ endif # Add GPL license if GPL plugins enabled. ifeq ($(GST1_PLUGINS_UGLY_HAS_GPL_LICENSE),y) -GST1_PLUGINS_UGLY_LICENSE += GPL-2.0 +GST1_PLUGINS_UGLY_LICENSE += , GPL-2.0 endif # Use the following command to extract license info for plugins. diff --git a/package/ipmitool/0008-fru-Fix-buffer-overflow-vulnerabilities.patch b/package/ipmitool/0008-fru-Fix-buffer-overflow-vulnerabilities.patch new file mode 100644 index 00000000000..a39713fdb1a --- /dev/null +++ b/package/ipmitool/0008-fru-Fix-buffer-overflow-vulnerabilities.patch @@ -0,0 +1,132 @@ +From d615cb6c39d401a569941be2a615176191afa7ac Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 16:33:59 +0000 +Subject: [PATCH] fru: Fix buffer overflow vulnerabilities + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `read_fru_area_section` function only performs size validation of +requested read size, and falsely assumes that the IPMI message will not +respond with more than the requested amount of data; it uses the +unvalidated response size to copy into `frubuf`. If the response is +larger than the request, this can result in overflowing the buffer. + +The same issue affects the `read_fru_area` function. + +[Retrieve from +https://github.com/ipmitool/ipmitool/commit/e824c23316ae50beb7f7488f2055ac65e8b341f2] +Signed-off-by: Heiko Thiery +--- + lib/ipmi_fru.c | 33 +++++++++++++++++++++++++++++++-- + 1 file changed, 31 insertions(+), 2 deletions(-) + +diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c +index cf00eff..af99aa9 100644 +--- a/lib/ipmi_fru.c ++++ b/lib/ipmi_fru.c +@@ -615,7 +615,10 @@ int + read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + uint32_t offset, uint32_t length, uint8_t *frubuf) + { +- uint32_t off = offset, tmp, finish; ++ uint32_t off = offset; ++ uint32_t tmp; ++ uint32_t finish; ++ uint32_t size_left_in_buffer; + struct ipmi_rs * rsp; + struct ipmi_rq req; + uint8_t msg_data[4]; +@@ -628,10 +631,12 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + + finish = offset + length; + if (finish > fru->size) { ++ memset(frubuf + fru->size, 0, length - fru->size); + finish = fru->size; + lprintf(LOG_NOTICE, "Read FRU Area length %d too large, " + "Adjusting to %d", + offset + length, finish - offset); ++ length = finish - offset; + } + + memset(&req, 0, sizeof(req)); +@@ -667,6 +672,7 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + } + } + ++ size_left_in_buffer = length; + do { + tmp = fru->access ? off >> 1 : off; + msg_data[0] = id; +@@ -707,9 +713,18 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + } + + tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0]; ++ if(rsp->data_len < 1 ++ || tmp > rsp->data_len - 1 ++ || tmp > size_left_in_buffer) ++ { ++ printf(" Not enough buffer size"); ++ return -1; ++ } ++ + memcpy(frubuf, rsp->data + 1, tmp); + off += tmp; + frubuf += tmp; ++ size_left_in_buffer -= tmp; + /* sometimes the size returned in the Info command + * is too large. return 0 so higher level function + * still attempts to parse what was returned */ +@@ -742,7 +757,9 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + uint32_t offset, uint32_t length, uint8_t *frubuf) + { + static uint32_t fru_data_rqst_size = 20; +- uint32_t off = offset, tmp, finish; ++ uint32_t off = offset; ++ uint32_t tmp, finish; ++ uint32_t size_left_in_buffer; + struct ipmi_rs * rsp; + struct ipmi_rq req; + uint8_t msg_data[4]; +@@ -755,10 +772,12 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + + finish = offset + length; + if (finish > fru->size) { ++ memset(frubuf + fru->size, 0, length - fru->size); + finish = fru->size; + lprintf(LOG_NOTICE, "Read FRU Area length %d too large, " + "Adjusting to %d", + offset + length, finish - offset); ++ length = finish - offset; + } + + memset(&req, 0, sizeof(req)); +@@ -773,6 +792,8 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + if (fru->access && fru_data_rqst_size > 16) + #endif + fru_data_rqst_size = 16; ++ ++ size_left_in_buffer = length; + do { + tmp = fru->access ? off >> 1 : off; + msg_data[0] = id; +@@ -804,8 +825,16 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + } + + tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0]; ++ if(rsp->data_len < 1 ++ || tmp > rsp->data_len - 1 ++ || tmp > size_left_in_buffer) ++ { ++ printf(" Not enough buffer size"); ++ return -1; ++ } + memcpy((frubuf + off)-offset, rsp->data + 1, tmp); + off += tmp; ++ size_left_in_buffer -= tmp; + + /* sometimes the size returned in the Info command + * is too large. return 0 so higher level function +-- +2.20.1 + diff --git a/package/ipmitool/0009-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch b/package/ipmitool/0009-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch new file mode 100644 index 00000000000..213a2ad7bb6 --- /dev/null +++ b/package/ipmitool/0009-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch @@ -0,0 +1,52 @@ +From 879f57c3b1ff17b1ca0dbdc8aac9c7a814e876fc Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 16:44:18 +0000 +Subject: [PATCH] fru: Fix buffer overflow in ipmi_spd_print_fru + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `ipmi_spd_print_fru` function has a similar issue as the one fixed +by the previous commit in `read_fru_area_section`. An initial request is +made to get the `fru.size`, which is used as the size for the allocation +of `spd_data`. Inside a loop, further requests are performed to get the +copy sizes which are not checked before being used as the size for a +copy into the buffer. + +[Retrieve from: +https://github.com/ipmitool/ipmitool/commit/840fb1cbb4fb365cb9797300e3374d4faefcdb10] +Signed-off-by: Heiko Thiery +--- + lib/dimm_spd.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/lib/dimm_spd.c b/lib/dimm_spd.c +index 41e30db..68f3b4f 100644 +--- a/lib/dimm_spd.c ++++ b/lib/dimm_spd.c +@@ -1621,7 +1621,7 @@ ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id) + struct ipmi_rq req; + struct fru_info fru; + uint8_t *spd_data, msg_data[4]; +- int len, offset; ++ uint32_t len, offset; + + msg_data[0] = id; + +@@ -1697,6 +1697,13 @@ ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id) + } + + len = rsp->data[0]; ++ if(rsp->data_len < 1 ++ || len > rsp->data_len - 1 ++ || len > fru.size - offset) ++ { ++ printf(" Not enough buffer size"); ++ return -1; ++ } + memcpy(&spd_data[offset], rsp->data + 1, len); + offset += len; + } while (offset < fru.size); +-- +2.20.1 + diff --git a/package/ipmitool/0010-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch b/package/ipmitool/0010-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch new file mode 100644 index 00000000000..94a5ce65049 --- /dev/null +++ b/package/ipmitool/0010-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch @@ -0,0 +1,52 @@ +From cd785a7fe4f42ab59bcefcf01b9175f039af29b5 Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 16:51:49 +0000 +Subject: [PATCH] session: Fix buffer overflow in ipmi_get_session_info + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `ipmi_get_session_info` function does not properly check the +response `data_len`, which is used as a copy size, allowing stack buffer +overflow. + +[Retrieve from: +https://github.com/ipmitool/ipmitool/commit/41d7026946fafbd4d1ec0bcaca3ea30a6e8eed22] +Signed-off-by: Heiko Thiery +--- + lib/ipmi_session.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/lib/ipmi_session.c b/lib/ipmi_session.c +index 141f0f4..b9af1fd 100644 +--- a/lib/ipmi_session.c ++++ b/lib/ipmi_session.c +@@ -309,8 +309,10 @@ ipmi_get_session_info(struct ipmi_intf * intf, + } + else + { +- memcpy(&session_info, rsp->data, rsp->data_len); +- print_session_info(&session_info, rsp->data_len); ++ memcpy(&session_info, rsp->data, ++ __min(rsp->data_len, sizeof(session_info))); ++ print_session_info(&session_info, ++ __min(rsp->data_len, sizeof(session_info))); + } + break; + +@@ -341,8 +343,10 @@ ipmi_get_session_info(struct ipmi_intf * intf, + break; + } + +- memcpy(&session_info, rsp->data, rsp->data_len); +- print_session_info(&session_info, rsp->data_len); ++ memcpy(&session_info, rsp->data, ++ __min(rsp->data_len, sizeof(session_info))); ++ print_session_info(&session_info, ++ __min(rsp->data_len, sizeof(session_info))); + + } while (i <= session_info.session_slot_count); + break; +-- +2.20.1 + diff --git a/package/ipmitool/0011-channel-Fix-buffer-overflow.patch b/package/ipmitool/0011-channel-Fix-buffer-overflow.patch new file mode 100644 index 00000000000..62e04c3e27c --- /dev/null +++ b/package/ipmitool/0011-channel-Fix-buffer-overflow.patch @@ -0,0 +1,46 @@ +From 1d479fc61feacc64adea64da9601f3dfcf6f74b3 Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 16:56:38 +0000 +Subject: [PATCH] channel: Fix buffer overflow +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `ipmi_get_channel_cipher_suites` function does not properly check +the final response’s `data_len`, which can lead to stack buffer overflow +on the final copy. + +[Retrieve from: +https://github.com/ipmitool/ipmitool/commit/9452be87181a6e83cfcc768b3ed8321763db50e4 + +The patch is slightly modified manually. The define +(MAX_CIPHER_SUITE_DATA_LEN) was introduced upstream in another patch. +Replace the define by the value 0x10.] + +Signed-off-by: Heiko Thiery +--- + lib/ipmi_channel.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/lib/ipmi_channel.c b/lib/ipmi_channel.c +index fab2e54..59ac227 100644 +--- a/lib/ipmi_channel.c ++++ b/lib/ipmi_channel.c +@@ -413,7 +413,10 @@ ipmi_get_channel_cipher_suites(struct ipmi_intf *intf, const char *payload_type, + lprintf(LOG_ERR, "Unable to Get Channel Cipher Suites"); + return -1; + } +- if (rsp->ccode > 0) { ++ if (rsp->ccode ++ || rsp->data_len < 1 ++ || rsp->data_len > sizeof(uint8_t) + 0x10) ++ { + lprintf(LOG_ERR, "Get Channel Cipher Suites failed: %s", + val2str(rsp->ccode, completion_code_vals)); + return -1; +-- +2.20.1 + diff --git a/package/ipmitool/0012-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch b/package/ipmitool/0012-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch new file mode 100644 index 00000000000..aba9ad2c71b --- /dev/null +++ b/package/ipmitool/0012-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch @@ -0,0 +1,92 @@ +From ceebf5998b71e11c81133680560b498977d3d3cd Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 17:06:39 +0000 +Subject: [PATCH] lanp: Fix buffer overflows in get_lan_param_select +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `get_lan_param_select` function is missing a validation check on the +response’s `data_len`, which it then returns to caller functions, where +stack buffer overflow can occur. + +[Retrieve from: +https://github.com/ipmitool/ipmitool/commit/d45572d71e70840e0d4c50bf48218492b79c1a10] +Signed-off-by: Heiko Thiery +--- + lib/ipmi_lanp.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/lib/ipmi_lanp.c b/lib/ipmi_lanp.c +index 65d881b..022c7f1 100644 +--- a/lib/ipmi_lanp.c ++++ b/lib/ipmi_lanp.c +@@ -1809,7 +1809,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + /* set new ipaddr */ + memcpy(data+3, temp, 4); + printf("Setting LAN Alert %d IP Address to %d.%d.%d.%d\n", alert, +@@ -1824,7 +1824,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + /* set new macaddr */ + memcpy(data+7, temp, 6); + printf("Setting LAN Alert %d MAC Address to " +@@ -1838,7 +1838,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + + if (strncasecmp(argv[1], "def", 3) == 0 || + strncasecmp(argv[1], "default", 7) == 0) { +@@ -1864,7 +1864,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + + if (strncasecmp(argv[1], "on", 2) == 0 || + strncasecmp(argv[1], "yes", 3) == 0) { +@@ -1889,7 +1889,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + + if (strncasecmp(argv[1], "pet", 3) == 0) { + printf("Setting LAN Alert %d destination to PET Trap\n", alert); +@@ -1917,7 +1917,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + + if (str2uchar(argv[1], &data[2]) != 0) { + lprintf(LOG_ERR, "Invalid time: %s", argv[1]); +@@ -1933,7 +1933,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + + if (str2uchar(argv[1], &data[3]) != 0) { + lprintf(LOG_ERR, "Invalid retry: %s", argv[1]); +-- +2.20.1 + diff --git a/package/ipmitool/0013-fru-sdr-Fix-id_string-buffer-overflows.patch b/package/ipmitool/0013-fru-sdr-Fix-id_string-buffer-overflows.patch new file mode 100644 index 00000000000..2a519f3c729 --- /dev/null +++ b/package/ipmitool/0013-fru-sdr-Fix-id_string-buffer-overflows.patch @@ -0,0 +1,141 @@ +From bf3ded3a474d85da99eb717acdcd8ff4f89f9879 Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 17:13:45 +0000 +Subject: [PATCH] fru, sdr: Fix id_string buffer overflows + +Final part of the fixes for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +9 variants of stack buffer overflow when parsing `id_string` field of +SDR records returned from `CMD_GET_SDR` command. + +SDR record structs have an `id_code` field, and an `id_string` `char` +array. + +The length of `id_string` is calculated as `(id_code & 0x1f) + 1`, +which can be larger than expected 16 characters (if `id_code = 0xff`, +then length will be `(0xff & 0x1f) + 1 = 32`). + +In numerous places, this can cause stack buffer overflow when copying +into fixed buffer of size `17` bytes from this calculated length. + +[Retrieve from: +https://github.com/ipmitool/ipmitool/commit/7ccea283dd62a05a320c1921e3d8d71a87772637] +Signed-off-by: Heiko Thiery +--- + lib/ipmi_fru.c | 2 +- + lib/ipmi_sdr.c | 40 ++++++++++++++++++++++++---------------- + 2 files changed, 25 insertions(+), 17 deletions(-) + +diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c +index af99aa9..98bc984 100644 +--- a/lib/ipmi_fru.c ++++ b/lib/ipmi_fru.c +@@ -3062,7 +3062,7 @@ ipmi_fru_print(struct ipmi_intf * intf, struct sdr_record_fru_locator * fru) + return 0; + + memset(desc, 0, sizeof(desc)); +- memcpy(desc, fru->id_string, fru->id_code & 0x01f); ++ memcpy(desc, fru->id_string, __min(fru->id_code & 0x01f, sizeof(desc))); + desc[fru->id_code & 0x01f] = 0; + printf("FRU Device Description : %s (ID %d)\n", desc, fru->device_id); + +diff --git a/lib/ipmi_sdr.c b/lib/ipmi_sdr.c +index 2a9cbe3..62aac08 100644 +--- a/lib/ipmi_sdr.c ++++ b/lib/ipmi_sdr.c +@@ -2084,7 +2084,7 @@ ipmi_sdr_print_sensor_eventonly(struct ipmi_intf *intf, + return -1; + + memset(desc, 0, sizeof (desc)); +- snprintf(desc, (sensor->id_code & 0x1f) + 1, "%s", sensor->id_string); ++ snprintf(desc, sizeof(desc), "%.*s", (sensor->id_code & 0x1f) + 1, sensor->id_string); + + if (verbose) { + printf("Sensor ID : %s (0x%x)\n", +@@ -2135,7 +2135,7 @@ ipmi_sdr_print_sensor_mc_locator(struct ipmi_intf *intf, + return -1; + + memset(desc, 0, sizeof (desc)); +- snprintf(desc, (mc->id_code & 0x1f) + 1, "%s", mc->id_string); ++ snprintf(desc, sizeof(desc), "%.*s", (mc->id_code & 0x1f) + 1, mc->id_string); + + if (verbose == 0) { + if (csv_output) +@@ -2228,7 +2228,7 @@ ipmi_sdr_print_sensor_generic_locator(struct ipmi_intf *intf, + char desc[17]; + + memset(desc, 0, sizeof (desc)); +- snprintf(desc, (dev->id_code & 0x1f) + 1, "%s", dev->id_string); ++ snprintf(desc, sizeof(desc), "%.*s", (dev->id_code & 0x1f) + 1, dev->id_string); + + if (!verbose) { + if (csv_output) +@@ -2285,7 +2285,7 @@ ipmi_sdr_print_sensor_fru_locator(struct ipmi_intf *intf, + char desc[17]; + + memset(desc, 0, sizeof (desc)); +- snprintf(desc, (fru->id_code & 0x1f) + 1, "%s", fru->id_string); ++ snprintf(desc, sizeof(desc), "%.*s", (fru->id_code & 0x1f) + 1, fru->id_string); + + if (!verbose) { + if (csv_output) +@@ -2489,35 +2489,43 @@ ipmi_sdr_print_name_from_rawentry(struct ipmi_intf *intf, uint16_t id, + + int rc =0; + char desc[17]; ++ const char *id_string; ++ uint8_t id_code; + memset(desc, ' ', sizeof (desc)); + + switch ( type) { + case SDR_RECORD_TYPE_FULL_SENSOR: + record.full = (struct sdr_record_full_sensor *) raw; +- snprintf(desc, (record.full->id_code & 0x1f) +1, "%s", +- (const char *)record.full->id_string); ++ id_code = record.full->id_code; ++ id_string = record.full->id_string; + break; ++ + case SDR_RECORD_TYPE_COMPACT_SENSOR: + record.compact = (struct sdr_record_compact_sensor *) raw ; +- snprintf(desc, (record.compact->id_code & 0x1f) +1, "%s", +- (const char *)record.compact->id_string); ++ id_code = record.compact->id_code; ++ id_string = record.compact->id_string; + break; ++ + case SDR_RECORD_TYPE_EVENTONLY_SENSOR: + record.eventonly = (struct sdr_record_eventonly_sensor *) raw ; +- snprintf(desc, (record.eventonly->id_code & 0x1f) +1, "%s", +- (const char *)record.eventonly->id_string); +- break; ++ id_code = record.eventonly->id_code; ++ id_string = record.eventonly->id_string; ++ break; ++ + case SDR_RECORD_TYPE_MC_DEVICE_LOCATOR: + record.mcloc = (struct sdr_record_mc_locator *) raw ; +- snprintf(desc, (record.mcloc->id_code & 0x1f) +1, "%s", +- (const char *)record.mcloc->id_string); ++ id_code = record.mcloc->id_code; ++ id_string = record.mcloc->id_string; + break; ++ + default: + rc = -1; +- break; +- } ++ } ++ if (!rc) { ++ snprintf(desc, sizeof(desc), "%.*s", (id_code & 0x1f) + 1, id_string); ++ } + +- lprintf(LOG_INFO, "ID: 0x%04x , NAME: %-16s", id, desc); ++ lprintf(LOG_INFO, "ID: 0x%04x , NAME: %-16s", id, desc); + return rc; + } + +-- +2.20.1 + diff --git a/package/ipmitool/ipmitool.mk b/package/ipmitool/ipmitool.mk index 5254668877a..123dd274f45 100644 --- a/package/ipmitool/ipmitool.mk +++ b/package/ipmitool/ipmitool.mk @@ -10,6 +10,14 @@ IPMITOOL_SITE = http://downloads.sourceforge.net/project/ipmitool/ipmitool/$(IPM IPMITOOL_LICENSE = BSD-3-Clause IPMITOOL_LICENSE_FILES = COPYING +# 0008-fru-Fix-buffer-overflow-vulnerabilities.patch +# 0009-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch +# 0010-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch +# 0011-channel-Fix-buffer-overflow.patch +# 0012-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch +# 0013-fru-sdr-Fix-id_string-buffer-overflows.patch +IPMITOOL_IGNORE_CVES += CVE-2020-5208 + ifeq ($(BR2_PACKAGE_IPMITOOL_LANPLUS),y) IPMITOOL_DEPENDENCIES += openssl IPMITOOL_CONF_OPTS += --enable-intf-lanplus diff --git a/package/jbig2dec/jbig2dec.hash b/package/jbig2dec/jbig2dec.hash index 86584b19a6c..5a34af37f6c 100644 --- a/package/jbig2dec/jbig2dec.hash +++ b/package/jbig2dec/jbig2dec.hash @@ -1,7 +1,7 @@ -# https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs952/MD5SUMS +# https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9530/MD5SUMS # and SHA512SUMS are missing the hashes for this file. # Locally computed: -sha256 9e19775237350e299c422b7b91b0c045e90ffa4ba66abf28c8fb5eb005772f5e jbig2dec-0.18.tar.gz +sha256 279476695b38f04939aa59d041be56f6bade3422003a406a85e9792c27118a37 jbig2dec-0.19.tar.gz # Hash for license files: sha256 1bf5258afe453934484fd0cea97508b72301633a6a78b0ae8a9ee44ac78f26d9 LICENSE diff --git a/package/jbig2dec/jbig2dec.mk b/package/jbig2dec/jbig2dec.mk index 08ef89bfcb6..59fcddfc1c3 100644 --- a/package/jbig2dec/jbig2dec.mk +++ b/package/jbig2dec/jbig2dec.mk @@ -4,8 +4,9 @@ # ################################################################################ -JBIG2DEC_VERSION = 0.18 -JBIG2DEC_SITE = https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs952 +JBIG2DEC_VERSION = 0.19 +JBIG2DEC_SITE = \ + https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9530 JBIG2DEC_LICENSE = AGPL-3.0+ JBIG2DEC_LICENSE_FILES = LICENSE JBIG2DEC_INSTALL_STAGING = YES diff --git a/package/kexec/0002-kexec-tools-Remove-duplicated-variable-declarations.patch b/package/kexec/0002-kexec-tools-Remove-duplicated-variable-declarations.patch new file mode 100644 index 00000000000..99cb9a2824d --- /dev/null +++ b/package/kexec/0002-kexec-tools-Remove-duplicated-variable-declarations.patch @@ -0,0 +1,102 @@ +From cc087b11462af9f971a2c090d07e8d780a867b50 Mon Sep 17 00:00:00 2001 +From: Kairui Song +Date: Wed, 29 Jan 2020 13:38:19 +0800 +Subject: kexec-tools: Remove duplicated variable declarations + +When building kexec-tools for Fedora 32, following error is observed: + +/usr/bin/ld: kexec/arch/x86_64/kexec-bzImage64.o:(.bss+0x0): multiple definition of `bzImage_support_efi_boot'; +kexec/arch/i386/kexec-bzImage.o:(.bss+0x0): first defined here + +/builddir/build/BUILD/kexec-tools-2.0.20/kexec/arch/arm/../../fs2dt.h:33: multiple definition of `my_debug'; +kexec/fs2dt.o:/builddir/build/BUILD/kexec-tools-2.0.20/kexec/fs2dt.h:33: first defined here + +/builddir/build/BUILD/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.h:68: multiple definition of `arm64_mem'; +kexec/fs2dt.o:/builddir/build/BUILD/kexec-tools-2.0.20/././kexec/arch/arm64/kexec-arm64.h:68: first defined here + +/builddir/build/BUILD/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.h:54: multiple definition of `initrd_size'; +kexec/fs2dt.o:/builddir/build/BUILD/kexec-tools-2.0.20/././kexec/arch/arm64/kexec-arm64.h:54: first defined here + +/builddir/build/BUILD/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.h:53: multiple definition of `initrd_base'; +kexec/fs2dt.o:/builddir/build/BUILD/kexec-tools-2.0.20/././kexec/arch/arm64/kexec-arm64.h:53: first defined here + +And apparently, these variables are wrongly declared multiple times. So +remove duplicated declaration. + +Signed-off-by: Kairui Song +Signed-off-by: Simon Horman +[Retrieved from: +https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=cc087b11462af9f971a2c090d07e8d780a867b50] +Signed-off-by: Fabrice Fontaine +--- + kexec/arch/arm64/kexec-arm64.h | 6 +++--- + kexec/arch/ppc64/kexec-elf-ppc64.c | 2 -- + kexec/arch/x86_64/kexec-bzImage64.c | 1 - + kexec/fs2dt.h | 2 +- + 4 files changed, 4 insertions(+), 7 deletions(-) + +diff --git a/kexec/arch/arm64/kexec-arm64.h b/kexec/arch/arm64/kexec-arm64.h +index 628de79..ed447ac 100644 +--- a/kexec/arch/arm64/kexec-arm64.h ++++ b/kexec/arch/arm64/kexec-arm64.h +@@ -50,8 +50,8 @@ int zImage_arm64_load(int argc, char **argv, const char *kernel_buf, + void zImage_arm64_usage(void); + + +-off_t initrd_base; +-off_t initrd_size; ++extern off_t initrd_base; ++extern off_t initrd_size; + + /** + * struct arm64_mem - Memory layout info. +@@ -65,7 +65,7 @@ struct arm64_mem { + }; + + #define arm64_mem_ngv UINT64_MAX +-struct arm64_mem arm64_mem; ++extern struct arm64_mem arm64_mem; + + uint64_t get_phys_offset(void); + uint64_t get_vp_offset(void); +diff --git a/kexec/arch/ppc64/kexec-elf-ppc64.c b/kexec/arch/ppc64/kexec-elf-ppc64.c +index 3510b70..695b8b0 100644 +--- a/kexec/arch/ppc64/kexec-elf-ppc64.c ++++ b/kexec/arch/ppc64/kexec-elf-ppc64.c +@@ -44,8 +44,6 @@ + uint64_t initrd_base, initrd_size; + unsigned char reuse_initrd = 0; + const char *ramdisk; +-/* Used for enabling printing message from purgatory code */ +-int my_debug = 0; + + int elf_ppc64_probe(const char *buf, off_t len) + { +diff --git a/kexec/arch/x86_64/kexec-bzImage64.c b/kexec/arch/x86_64/kexec-bzImage64.c +index 8edb3e4..ba8dc48 100644 +--- a/kexec/arch/x86_64/kexec-bzImage64.c ++++ b/kexec/arch/x86_64/kexec-bzImage64.c +@@ -42,7 +42,6 @@ + #include + + static const int probe_debug = 0; +-int bzImage_support_efi_boot; + + int bzImage64_probe(const char *buf, off_t len) + { +diff --git a/kexec/fs2dt.h b/kexec/fs2dt.h +index 7633273..fe24931 100644 +--- a/kexec/fs2dt.h ++++ b/kexec/fs2dt.h +@@ -30,7 +30,7 @@ extern struct bootblock bb[1]; + + /* Used for enabling printing message from purgatory code + * Only has implemented for PPC64 */ +-int my_debug; ++extern int my_debug; + extern int dt_no_old_root; + + void reserve(unsigned long long where, unsigned long long length); +-- +cgit 1.2.3-1.el7 + diff --git a/package/lcdproc/0001-Add-missing-ioctl-header.patch b/package/lcdproc/0002-Add-missing-ioctl-header.patch similarity index 100% rename from package/lcdproc/0001-Add-missing-ioctl-header.patch rename to package/lcdproc/0002-Add-missing-ioctl-header.patch diff --git a/package/lcdproc/0003-Fixcompilation-with-GCC-10-x.patch b/package/lcdproc/0003-Fixcompilation-with-GCC-10-x.patch new file mode 100644 index 00000000000..c8a3dc20a33 --- /dev/null +++ b/package/lcdproc/0003-Fixcompilation-with-GCC-10-x.patch @@ -0,0 +1,46 @@ +From 084126b03f29b33ab3e657c66e8c6a439f27f8e1 Mon Sep 17 00:00:00 2001 +From: Harald Geyer +Date: Mon, 10 Feb 2020 13:15:10 +0100 +Subject: [PATCH] Fix compilation with GCC >= 10.x + +Starting with GCC >= 10.x, -fno-common is used as default +instead of -fcommon. This patch fixes the compilation. + +Closes: #148 + +Suggested-by: Conrad Kostecki +Signed-off-by: Harald Geyer + +[Retrieved from: +https://github.com/lcdproc/lcdproc/commit/084126b03f29b33ab3e657c66e8c6a439f27f8e1] +Signed-off-by: Fabrice Fontaine +--- + clients/lcdproc/iface.c | 1 + + clients/lcdproc/iface.h | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/clients/lcdproc/iface.c b/clients/lcdproc/iface.c +index 40e50cb7..1ac355bd 100644 +--- a/clients/lcdproc/iface.c ++++ b/clients/lcdproc/iface.c +@@ -32,6 +32,7 @@ + #define UNSET_INT -1 + #define UNSET_STR "\01" + ++IfaceInfo iface[MAX_INTERFACES]; + + static int iface_count = 0; /* number of interfaces */ + static char unit_label[10] = "B"; /* default unit label is Bytes */ +diff --git a/clients/lcdproc/iface.h b/clients/lcdproc/iface.h +index cc6dbaaf..c1bd6b5b 100644 +--- a/clients/lcdproc/iface.h ++++ b/clients/lcdproc/iface.h +@@ -18,7 +18,7 @@ + /** max number of interfaces in multi-interface mode */ + #define MAX_INTERFACES 3 + +-IfaceInfo iface[MAX_INTERFACES]; /* interface info */ ++extern IfaceInfo iface[MAX_INTERFACES]; /* interface info */ + + /** Update screen content */ + int iface_screen(int rep, int display, int *flags_ptr); diff --git a/package/libcamera/Config.in b/package/libcamera/Config.in index 960d78b82e9..39741e44122 100644 --- a/package/libcamera/Config.in +++ b/package/libcamera/Config.in @@ -1,5 +1,12 @@ +config BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS + bool + default y + # Invalid packing size of ControlValue struct on m68k + depends on BR2_m68k + menuconfig BR2_PACKAGE_LIBCAMERA bool "libcamera" + depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++14 @@ -64,5 +71,6 @@ config BR2_PACKAGE_LIBCAMERA_PIPELINE_VIMC endif # BR2_PACKAGE_LIBCAMERA comment "libcamera needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 5" + depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ !BR2_TOOLCHAIN_GCC_AT_LEAST_5 || BR2_STATIC_LIBS || !BR2_USE_WCHAR diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk index 4919a4adcaf..90a1cfea4d6 100644 --- a/package/libcap/libcap.mk +++ b/package/libcap/libcap.mk @@ -62,12 +62,12 @@ endef define HOST_LIBCAP_BUILD_CMDS $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)\ - RAISE_SETFCAP=no + RAISE_SETFCAP=no GOLANG=no endef define HOST_LIBCAP_INSTALL_CMDS $(HOST_MAKE_ENV) $(MAKE) -C $(@D) prefix=$(HOST_DIR) \ - RAISE_SETFCAP=no lib=lib install + RAISE_SETFCAP=no GOLANG=no lib=lib install endef $(eval $(generic-package)) diff --git a/package/libhtp/0001-htp.pc.in-add-lz-to-Libs.private.patch b/package/libhtp/0001-htp.pc.in-add-lz-to-Libs.private.patch deleted file mode 100644 index b21ea6053ac..00000000000 --- a/package/libhtp/0001-htp.pc.in-add-lz-to-Libs.private.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 39e534ab696157b244ec226d649c789dcf423e42 Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -Date: Wed, 24 Apr 2019 20:48:57 +0200 -Subject: [PATCH] htp.pc.in: add -lz to Libs.private - -zlib is a mandatory dependency so add it to Libs.private otherwise -static linking of packages linking with htp (e.g. suricata) will fail. - -Signed-off-by: Fabrice Fontaine -[Upstream status: https://github.com/OISF/libhtp/pull/294] ---- - htp.pc.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/htp.pc.in b/htp.pc.in -index 2fec995..9b1a6cc 100644 ---- a/htp.pc.in -+++ b/htp.pc.in -@@ -7,6 +7,6 @@ Name: @PACKAGE_NAME@ - Description: A security-aware HTTP parser, designed for use in IDS/IPS and WAF products. - Version: @PACKAGE_VERSION@ - Libs: -L${libdir} -lhtp --Libs.private: @LIBICONV@ -+Libs.private: -lz @LIBICONV@ - Cflags: -I${includedir} -I${libdir}/htp/include - --- -2.20.1 - diff --git a/package/libhtp/libhtp.hash b/package/libhtp/libhtp.hash index 765acd5bf96..df75336df66 100644 --- a/package/libhtp/libhtp.hash +++ b/package/libhtp/libhtp.hash @@ -1,3 +1,3 @@ # Locally computed: -sha256 953651fdfe828805bb82dc1aa8b56187b0e2f80781727343e68ccf8afd6a9122 libhtp-0.5.33.tar.gz +sha256 4c3ac4c6027710455ffe725f24ac6a83b2c13fe0afc83b74df2cca78ba46976a libhtp-0.5.35.tar.gz sha256 87c93904e5434c81622ea690c2b90097b9f162aaa92a96542649a157dbf98d15 LICENSE diff --git a/package/libhtp/libhtp.mk b/package/libhtp/libhtp.mk index b77d8715f9f..c402cf750e8 100644 --- a/package/libhtp/libhtp.mk +++ b/package/libhtp/libhtp.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBHTP_VERSION = 0.5.33 +LIBHTP_VERSION = 0.5.35 LIBHTP_SITE = $(call github,OISF,libhtp,$(LIBHTP_VERSION)) LIBHTP_LICENSE = BSD-3-Clause LIBHTP_LICENSE_FILES = LICENSE diff --git a/package/libnetconf2/0001-CMakeList.txt-remove-version-check-for-faulty-libssh.patch b/package/libnetconf2/0001-CMakeList.txt-remove-version-check-for-faulty-libssh.patch deleted file mode 100644 index d1df807626c..00000000000 --- a/package/libnetconf2/0001-CMakeList.txt-remove-version-check-for-faulty-libssh.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ad89283f9ed36f0f1234c7f005edfc34e8b9fd58 Mon Sep 17 00:00:00 2001 -From: Heiko Thiery -Date: Thu, 4 Jun 2020 15:31:56 +0200 -Subject: [PATCH] CMakeList.txt: remove version check for faulty libssh version - -libssh is fixed by a patch in buildroot so we can drop the libssh -version check for 0.9.3 and 0.9.4. - -See: 39099153d9404cd6f107f0fd92ce8686bbd1beb2 - -Signed-off-by: Heiko Thiery ---- - CMakeLists.txt | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f21fec9..29ef202 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -148,9 +148,6 @@ endif() - # dependencies - libssh - if(ENABLE_SSH) - find_package(LibSSH 0.7.0 REQUIRED) -- if(LIBSSH_VERSION VERSION_EQUAL 0.9.3 OR LIBSSH_VERSION VERSION_EQUAL 0.9.4) -- message(FATAL_ERROR "LibSSH ${LIBSSH_VERSION} includes regression bugs and libnetconf2 will NOT work properly, try to use another version") -- endif() - - target_link_libraries(netconf2 ${LIBSSH_LIBRARIES}) - list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBSSH_LIBRARIES}) --- -2.20.1 - diff --git a/package/libnvidia-container/0001-Build-fixes-from-vowstar-portage-overlay.patch b/package/libnvidia-container/0001-Build-fixes-from-vowstar-portage-overlay.patch new file mode 100644 index 00000000000..7232e76d978 --- /dev/null +++ b/package/libnvidia-container/0001-Build-fixes-from-vowstar-portage-overlay.patch @@ -0,0 +1,1890 @@ +From bd633a208446c86e11097e3cd3b019a086738ae3 Mon Sep 17 00:00:00 2001 +From: Christian Stewart +Date: Sun, 19 Jul 2020 09:56:42 -0700 +Subject: [PATCH] Build fixes from vowstar portage overlay + +This commit brings in build fixes written by @vowstar in the overlay: + +https://github.com/vowstar/vowstar-overlay/tree/master/app-emulation/libnvidia-container/files + +Signed-off-by: Christian Stewart +--- + Makefile | 30 +- + mk/Dockerfile.debian | 1 - + mk/Dockerfile.ubuntu | 1 - + mk/common.mk | 2 +- + src/nvc.c | 4 +- + src/nvidia-modprobe-utils.c | 794 ++++++++++++++++++++++++++++++++++++ + src/nvidia-modprobe-utils.h | 157 +++++++ + src/pci-enum.h | 112 +++++ + src/pci-sysfs.c | 529 ++++++++++++++++++++++++ + src/pci-sysfs.h | 85 ++++ + 10 files changed, 1696 insertions(+), 19 deletions(-) + create mode 100644 src/nvidia-modprobe-utils.c + create mode 100644 src/nvidia-modprobe-utils.h + create mode 100644 src/pci-enum.h + create mode 100644 src/pci-sysfs.c + create mode 100644 src/pci-sysfs.h + +diff --git a/Makefile b/Makefile +index c07863b..f1c56a9 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,21 +4,21 @@ + + .PHONY: all tools shared static deps install uninstall dist depsclean mostlyclean clean distclean + .DEFAULT_GOAL := all +- ++STRIP := @echo skipping: strip + ##### Global variables ##### + +-WITH_LIBELF ?= no +-WITH_TIRPC ?= no ++WITH_LIBELF ?= yes ++WITH_TIRPC ?= yes + WITH_SECCOMP ?= yes + + ##### Global definitions ##### + +-export prefix = /usr/local ++export prefix = /usr + export exec_prefix = $(prefix) + export bindir = $(exec_prefix)/bin +-export libdir = $(exec_prefix)/lib ++export libdir = $(exec_prefix)/lib64 + export docdir = $(prefix)/share/doc +-export libdbgdir = $(prefix)/lib/debug$(libdir) ++export libdbgdir = $(prefix)/lib64/debug$(libdir) + export includedir = $(prefix)/include + export pkgconfdir = $(libdir)/pkgconfig + +@@ -52,6 +52,8 @@ LIB_SRCS := $(SRCS_DIR)/driver.c \ + $(SRCS_DIR)/error_generic.c \ + $(SRCS_DIR)/error.c \ + $(SRCS_DIR)/ldcache.c \ ++ $(SRCS_DIR)/pci-sysfs.c \ ++ $(SRCS_DIR)/nvidia-modprobe-utils.c \ + $(SRCS_DIR)/nvc.c \ + $(SRCS_DIR)/nvc_ldcache.c \ + $(SRCS_DIR)/nvc_info.c \ +@@ -121,8 +123,8 @@ LDLIBS := $(LDLIBS) + LIB_CPPFLAGS = -DNV_LINUX -isystem $(DEPS_DIR)$(includedir) -include $(BUILD_DEFS) + LIB_CFLAGS = -fPIC + LIB_LDFLAGS = -L$(DEPS_DIR)$(libdir) -shared -Wl,-soname=$(LIB_SONAME) +-LIB_LDLIBS_STATIC = -l:libnvidia-modprobe-utils.a +-LIB_LDLIBS_SHARED = -ldl -lcap ++# LIB_LDLIBS_STATIC = -l:libnvidia-modprobe-utils.a ++LIB_LDLIBS_SHARED = -ldl -lcap -ltirpc + ifeq ($(WITH_LIBELF), yes) + LIB_CPPFLAGS += -DWITH_LIBELF + LIB_LDLIBS_SHARED += -lelf +@@ -131,7 +133,7 @@ LIB_LDLIBS_STATIC += -l:libelf.a + endif + ifeq ($(WITH_TIRPC), yes) + LIB_CPPFLAGS += -isystem $(DEPS_DIR)$(includedir)/tirpc -DWITH_TIRPC +-LIB_LDLIBS_STATIC += -l:libtirpc.a ++# LIB_LDLIBS_STATIC += -l:libtirpc.a + LIB_LDLIBS_SHARED += -lpthread + endif + ifeq ($(WITH_SECCOMP), yes) +@@ -146,7 +148,7 @@ LIB_LDLIBS_SHARED += $(LDLIBS) + LIB_LDLIBS = $(LIB_LDLIBS_STATIC) $(LIB_LDLIBS_SHARED) + + # Binary flags (recursively expanded to handle target-specific flags) +-BIN_CPPFLAGS = -include $(BUILD_DEFS) $(CPPFLAGS) ++BIN_CPPFLAGS = -include $(BUILD_DEFS) $(CPPFLAGS) -DWITH_TIRPC + BIN_CFLAGS = -I$(SRCS_DIR) -fPIE -flto $(CFLAGS) + BIN_LDFLAGS = -L. -pie $(LDFLAGS) -Wl,-rpath='$$ORIGIN/../$$LIB' + BIN_LDLIBS = -l:$(LIB_SHARED) -lcap $(LDLIBS) +@@ -220,12 +222,12 @@ static: $(LIB_STATIC)($(LIB_STATIC_OBJ)) + deps: export DESTDIR:=$(DEPS_DIR) + deps: $(LIB_RPC_SRCS) $(BUILD_DEFS) + $(MKDIR) -p $(DEPS_DIR) +- $(MAKE) -f $(MAKE_DIR)/nvidia-modprobe.mk install ++ # $(MAKE) -f $(MAKE_DIR)/nvidia-modprobe.mk install + ifeq ($(WITH_LIBELF), no) +- $(MAKE) -f $(MAKE_DIR)/elftoolchain.mk install ++ # $(MAKE) -f $(MAKE_DIR)/elftoolchain.mk install + endif + ifeq ($(WITH_TIRPC), yes) +- $(MAKE) -f $(MAKE_DIR)/libtirpc.mk install ++ # $(MAKE) -f $(MAKE_DIR)/libtirpc.mk install + endif + + install: all +@@ -238,7 +240,7 @@ install: all + $(LN) -sf $(LIB_SONAME) $(DESTDIR)$(libdir)/$(LIB_SYMLINK) + $(LDCONFIG) -n $(DESTDIR)$(libdir) + # Install debugging symbols +- $(INSTALL) -m 644 $(DEBUG_DIR)/$(LIB_SONAME) $(DESTDIR)$(libdbgdir) ++ # $(INSTALL) -m 644 $(DEBUG_DIR)/$(LIB_SONAME) $(DESTDIR)$(libdbgdir) + # Install configuration files + $(MAKE_DIR)/$(LIB_PKGCFG).in "$(strip $(VERSION))" "$(strip $(LIB_LDLIBS_SHARED))" > $(DESTDIR)$(pkgconfdir)/$(LIB_PKGCFG) + # Install binary files +diff --git a/mk/Dockerfile.debian b/mk/Dockerfile.debian +index 8e8a560..096e1d0 100644 +--- a/mk/Dockerfile.debian ++++ b/mk/Dockerfile.debian +@@ -41,7 +41,6 @@ RUN make distclean && make -j"$(nproc)" + ENV DIST_DIR /dist + VOLUME $DIST_DIR + CMD bash -c " \ +- export DISTRIB=$(lsb_release -c -s); \ + export SECTION="" \ + make dist; \ + make deb; \ +diff --git a/mk/Dockerfile.ubuntu b/mk/Dockerfile.ubuntu +index 8b8cea8..d1f64d0 100644 +--- a/mk/Dockerfile.ubuntu ++++ b/mk/Dockerfile.ubuntu +@@ -40,7 +40,6 @@ RUN make distclean && make -j"$(nproc)" + ENV DIST_DIR /dist + VOLUME $DIST_DIR + CMD bash -c " \ +- export DISTRIB=$(lsb_release -c -s); \ + export SECTION="" \ + make dist; \ + make deb; \ +diff --git a/mk/common.mk b/mk/common.mk +index 73bc27a..cdd93c9 100644 +--- a/mk/common.mk ++++ b/mk/common.mk +@@ -21,7 +21,7 @@ DOCKER ?= docker + UID := $(shell id -u) + GID := $(shell id -g) + DATE := $(shell date -u --iso-8601=minutes) +-REVISION := $(shell git rev-parse HEAD) ++REVISION := 61f82bf25f0b3afaa75c6df8a0a6551ecfdf81f4 + COMPILER := $(realpath $(shell which $(CC))) + PLATFORM ?= $(shell uname -m) + +diff --git a/src/nvc.c b/src/nvc.c +index 35ad5be..f1d9b62 100644 +--- a/src/nvc.c ++++ b/src/nvc.c +@@ -14,8 +14,8 @@ + #include + #include + +-#include +-#include ++#include "pci-enum.h" ++#include "nvidia-modprobe-utils.h" + + #include "nvc_internal.h" + +diff --git a/src/nvidia-modprobe-utils.c b/src/nvidia-modprobe-utils.c +new file mode 100644 +index 0000000..d3f3233 +--- /dev/null ++++ b/src/nvidia-modprobe-utils.c +@@ -0,0 +1,794 @@ ++ ++#if defined(NV_LINUX) ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "nvidia-modprobe-utils.h" ++#include "pci-enum.h" ++ ++#define NV_PROC_MODPROBE_PATH "/proc/sys/kernel/modprobe" ++#define NV_PROC_MODULES_PATH "/proc/modules" ++#define NV_PROC_DEVICES_PATH "/proc/devices" ++ ++#define NV_PROC_MODPROBE_PATH_MAX 1024 ++#define NV_MAX_MODULE_NAME_SIZE 16 ++#define NV_MAX_PROC_REGISTRY_PATH_SIZE NV_MAX_CHARACTER_DEVICE_FILE_STRLEN ++#define NV_MAX_LINE_LENGTH 256 ++ ++#define NV_NVIDIA_MODULE_NAME "nvidia" ++#define NV_PROC_REGISTRY_PATH "/proc/driver/nvidia/params" ++ ++#define NV_NMODULE_NVIDIA_MODULE_NAME "nvidia%d" ++#define NV_NMODULE_PROC_REGISTRY_PATH "/proc/driver/nvidia/%d/params" ++ ++#define NV_UVM_MODULE_NAME "nvidia-uvm" ++#define NV_UVM_DEVICE_NAME "/dev/nvidia-uvm" ++#define NV_UVM_TOOLS_DEVICE_NAME "/dev/nvidia-uvm-tools" ++ ++#define NV_MODESET_MODULE_NAME "nvidia-modeset" ++ ++#define NV_VGPU_VFIO_MODULE_NAME "nvidia-vgpu-vfio" ++ ++#define NV_NVLINK_MODULE_NAME "nvidia-nvlink" ++#define NV_NVLINK_PROC_PERM_PATH "/proc/driver/nvidia-nvlink/permissions" ++ ++#define NV_DEVICE_FILE_MODE_MASK (S_IRWXU|S_IRWXG|S_IRWXO) ++#define NV_DEVICE_FILE_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) ++#define NV_DEVICE_FILE_UID 0 ++#define NV_DEVICE_FILE_GID 0 ++ ++#define NV_MAKE_DEVICE(x,y) ((dev_t)((x) << 8 | (y))) ++ ++#define NV_MAJOR_DEVICE_NUMBER 195 ++ ++#define NV_PCI_VENDOR_ID 0x10DE ++ ++#define NV_MIN(a, b) (((a) < (b)) ? (a) : (b)) ++ ++/* ++ * Construct the nvidia kernel module name based on the input ++ * module instance provided. If an error occurs, the null ++ * terminator will be written to nv_module_name[0]. ++ */ ++static __inline__ void assign_nvidia_kernel_module_name ++( ++ char nv_module_name[NV_MAX_MODULE_NAME_SIZE], ++ int module_instance ++) ++{ ++ int ret; ++ ++ if (is_multi_module(module_instance)) ++ { ++ ret = snprintf(nv_module_name, NV_MAX_MODULE_NAME_SIZE, ++ NV_NMODULE_NVIDIA_MODULE_NAME, module_instance); ++ } ++ else ++ { ++ ret = snprintf(nv_module_name, NV_MAX_MODULE_NAME_SIZE, ++ NV_NVIDIA_MODULE_NAME); ++ } ++ ++ if (ret <= 0) ++ { ++ goto fail; ++ } ++ ++ nv_module_name[NV_MAX_MODULE_NAME_SIZE - 1] = '\0'; ++ ++ return; ++ ++fail: ++ ++ nv_module_name[0] = '\0'; ++} ++ ++ ++/* ++ * Construct the proc registry path name based on the input ++ * module instance provided. If an error occurs, the null ++ * terminator will be written to proc_path[0]. ++ */ ++static __inline__ void assign_proc_registry_path ++( ++ char proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE], ++ int module_instance ++) ++{ ++ int ret; ++ ++ if (is_multi_module(module_instance)) ++ { ++ ret = snprintf(proc_path, NV_MAX_PROC_REGISTRY_PATH_SIZE, ++ NV_NMODULE_PROC_REGISTRY_PATH, module_instance); ++ } ++ else ++ { ++ ret = snprintf(proc_path, NV_MAX_PROC_REGISTRY_PATH_SIZE, ++ NV_PROC_REGISTRY_PATH); ++ } ++ ++ if (ret <= 0) ++ { ++ goto fail; ++ } ++ ++ proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE - 1] = '\0'; ++ ++ return; ++ ++fail: ++ ++ proc_path[0] = '\0'; ++} ++ ++ ++/* ++ * Just like strcmp(3), except that differences between '-' and '_' are ++ * ignored. This is useful for comparing module names, where '-' and '_' ++ * are supposed to be treated interchangeably. ++ */ ++static int modcmp(const char *a, const char *b) ++{ ++ int i; ++ ++ /* Walk both strings and compare each character */ ++ for (i = 0; a[i] && b[i]; i++) ++ { ++ if (a[i] != b[i]) ++ { ++ /* ignore differences between '-' and '_' */ ++ if (((a[i] == '-') || (a[i] == '_')) && ++ ((b[i] == '-') || (b[i] == '_'))) ++ { ++ continue; ++ } ++ ++ break; ++ } ++ } ++ ++ /* ++ * If the strings are of unequal length, only one of a[i] or b[i] == '\0'. ++ * If they are the same length, both will be '\0', and the strings match. ++ */ ++ return a[i] - b[i]; ++} ++ ++ ++/* ++ * Check whether the specified module is loaded by reading ++ * NV_PROC_MODULES_PATH; returns 1 if the kernel module is loaded. ++ * Otherwise, it returns 0. ++ */ ++static int is_kernel_module_loaded(const char *nv_module_name) ++{ ++ FILE *fp; ++ char module_name[NV_MAX_MODULE_NAME_SIZE]; ++ int module_loaded = 0; ++ ++ fp = fopen(NV_PROC_MODULES_PATH, "r"); ++ ++ if (fp == NULL) ++ { ++ return 0; ++ } ++ ++ while (fscanf(fp, "%15s%*[^\n]\n", module_name) == 1) ++ { ++ module_name[15] = '\0'; ++ if (modcmp(module_name, nv_module_name) == 0) ++ { ++ module_loaded = 1; ++ break; ++ } ++ } ++ ++ fclose(fp); ++ ++ return module_loaded; ++} ++ ++/* ++ * Attempt to redirect STDOUT and STDERR to /dev/null. ++ * ++ * This is only for the cosmetics of silencing warnings, so do not ++ * treat any errors here as fatal. ++ */ ++static void silence_current_process(void) ++{ ++ int dev_null_fd = open("/dev/null", O_RDWR); ++ if (dev_null_fd < 0) ++ { ++ return; ++ } ++ ++ dup2(dev_null_fd, STDOUT_FILENO); ++ dup2(dev_null_fd, STDERR_FILENO); ++ close(dev_null_fd); ++} ++ ++/* ++ * Attempt to load a kernel module; returns 1 if kernel module is ++ * successfully loaded. Returns 0 if the kernel module could not be ++ * loaded. ++ * ++ * If any error is encountered and print_errors is non-0, then print the ++ * error to stderr. ++ */ ++static int modprobe_helper(const int print_errors, const char *module_name) ++{ ++ char modprobe_path[NV_PROC_MODPROBE_PATH_MAX]; ++ int status = 1; ++ struct stat file_status; ++ pid_t pid; ++ const char *envp[] = { "PATH=/sbin", NULL }; ++ FILE *fp; ++ ++ /* ++ * Use PCI_BASE_CLASS_MASK to cover both types of DISPLAY controllers that ++ * NVIDIA ships (VGA = 0x300 and 3D = 0x302). ++ */ ++ struct pci_id_match id_match = { ++ NV_PCI_VENDOR_ID, /* Vendor ID = 0x10DE */ ++ PCI_MATCH_ANY, /* Device ID = any */ ++ PCI_MATCH_ANY, /* Subvendor ID = any */ ++ PCI_MATCH_ANY, /* Subdevice ID = any */ ++ 0x0300, /* Device Class = PCI_BASE_CLASS_DISPLAY */ ++ PCI_BASE_CLASS_MASK, /* Display Mask = base class only */ ++ 0 /* Initial number of matches */ ++ }; ++ ++ modprobe_path[0] = '\0'; ++ ++ if (module_name == NULL || module_name[0] == '\0') { ++ return 0; ++ } ++ ++ /* If the kernel module is already loaded, nothing more to do: success. */ ++ ++ if (is_kernel_module_loaded(module_name)) ++ { ++ return 1; ++ } ++ ++ /* ++ * Before attempting to load the module, look for any NVIDIA PCI devices. ++ * If none exist, exit instead of attempting the modprobe, because doing so ++ * would issue error messages that are really irrelevant if there are no ++ * NVIDIA PCI devices present. ++ * ++ * If our check fails, for whatever reason, continue with the modprobe just ++ * in case. ++ */ ++ status = pci_enum_match_id(&id_match); ++ if (status == 0 && id_match.num_matches == 0) ++ { ++ if (print_errors) ++ { ++ fprintf(stderr, ++ "NVIDIA: no NVIDIA devices found\n"); ++ } ++ ++ return 0; ++ } ++ ++ /* Only attempt to load the kernel module if root. */ ++ ++ if (geteuid() != 0) ++ { ++ return 0; ++ } ++ ++ /* Attempt to read the full path to the modprobe executable from /proc. */ ++ ++ fp = fopen(NV_PROC_MODPROBE_PATH, "r"); ++ if (fp != NULL) ++ { ++ char *str; ++ size_t n; ++ ++ n = fread(modprobe_path, 1, sizeof(modprobe_path), fp); ++ ++ /* ++ * Null terminate the string, but make sure 'n' is in the range ++ * [0, sizeof(modprobe_path)-1]. ++ */ ++ n = NV_MIN(n, sizeof(modprobe_path) - 1); ++ modprobe_path[n] = '\0'; ++ ++ /* ++ * If str was longer than a line, we might still have a ++ * newline in modprobe_path: if so, overwrite it with the nul ++ * terminator. ++ */ ++ str = strchr(modprobe_path, '\n'); ++ if (str != NULL) ++ { ++ *str = '\0'; ++ } ++ ++ fclose(fp); ++ } ++ ++ /* If we couldn't read it from /proc, pick a reasonable default. */ ++ ++ if (modprobe_path[0] == '\0') ++ { ++ sprintf(modprobe_path, "/sbin/modprobe"); ++ } ++ ++ /* Do not attempt to exec(3) modprobe if it does not exist. */ ++ ++ if (stat(modprobe_path, &file_status) != 0 || ++ !S_ISREG(file_status.st_mode) || ++ (file_status.st_mode & S_IXUSR) != S_IXUSR) ++ { ++ return 0; ++ } ++ ++ /* Fork and exec modprobe from the child process. */ ++ ++ switch (pid = fork()) ++ { ++ case 0: ++ ++ /* ++ * modprobe might complain in expected scenarios. E.g., ++ * `modprobe nvidia` on a Tegra system with dGPU where no nvidia.ko is ++ * present will complain: ++ * ++ * "modprobe: FATAL: Module nvidia not found." ++ * ++ * Silence the current process to avoid such unwanted messages. ++ */ ++ silence_current_process(); ++ ++ execle(modprobe_path, "modprobe", ++ module_name, NULL, envp); ++ ++ /* If execl(3) returned, then an error has occurred. */ ++ ++ if (print_errors) ++ { ++ fprintf(stderr, ++ "NVIDIA: failed to execute `%s`: %s.\n", ++ modprobe_path, strerror(errno)); ++ } ++ exit(1); ++ ++ case -1: ++ return 0; ++ ++ default: ++ if (waitpid(pid, &status, 0) < 0) ++ { ++ return 0; ++ } ++ if (WIFEXITED(status) && WEXITSTATUS(status) == 0) ++ { ++ return 1; ++ } ++ else ++ { ++ return 0; ++ } ++ } ++ ++ return 1; ++} ++ ++ ++/* ++ * Attempt to load an NVIDIA kernel module ++ */ ++int nvidia_modprobe(const int print_errors, int module_instance) ++{ ++ char nv_module_name[NV_MAX_MODULE_NAME_SIZE]; ++ ++ assign_nvidia_kernel_module_name(nv_module_name, module_instance); ++ ++ return modprobe_helper(print_errors, nv_module_name); ++} ++ ++ ++/* ++ * Determine the requested device file parameters: allow users to ++ * override the default UID/GID and/or mode of the NVIDIA device ++ * files, or even whether device file modification should be allowed; ++ * the attributes are managed globally, and can be adjusted via the ++ * appropriate kernel module parameters. ++ */ ++static void init_device_file_parameters(uid_t *uid, gid_t *gid, mode_t *mode, ++ int *modify, const char *proc_path) ++{ ++ FILE *fp; ++ char name[32]; ++ unsigned int value; ++ ++ *mode = NV_DEVICE_FILE_MODE; ++ *uid = NV_DEVICE_FILE_UID; ++ *gid = NV_DEVICE_FILE_GID; ++ *modify = 1; ++ ++ if (proc_path == NULL || proc_path[0] == '\0') ++ { ++ return; ++ } ++ ++ fp = fopen(proc_path, "r"); ++ ++ if (fp == NULL) ++ { ++ return; ++ } ++ ++ while (fscanf(fp, "%31[^:]: %u\n", name, &value) == 2) ++ { ++ name[31] = '\0'; ++ if (strcmp(name, "DeviceFileUID") == 0) ++ { ++ *uid = value; ++ } ++ if (strcmp(name, "DeviceFileGID") == 0) ++ { ++ *gid = value; ++ } ++ if (strcmp(name, "DeviceFileMode") == 0) ++ { ++ *mode = value; ++ } ++ if (strcmp(name, "ModifyDeviceFiles") == 0) ++ { ++ *modify = value; ++ } ++ } ++ ++ fclose(fp); ++} ++ ++/* ++ * A helper to query device file states. ++ */ ++static int get_file_state_helper( ++ const char *path, ++ int major, ++ int minor, ++ const char *proc_path, ++ uid_t uid, ++ gid_t gid, ++ mode_t mode) ++{ ++ dev_t dev = NV_MAKE_DEVICE(major, minor); ++ struct stat stat_buf; ++ int ret; ++ int state = 0; ++ ++ ret = stat(path, &stat_buf); ++ if (ret == 0) ++ { ++ nvidia_update_file_state(&state, NvDeviceFileStateFileExists); ++ ++ if (S_ISCHR(stat_buf.st_mode) && (stat_buf.st_rdev == dev)) ++ { ++ nvidia_update_file_state(&state, NvDeviceFileStateChrDevOk); ++ } ++ ++ if (((stat_buf.st_mode & NV_DEVICE_FILE_MODE_MASK) == mode) && ++ (stat_buf.st_uid == uid) && ++ (stat_buf.st_gid == gid)) ++ { ++ nvidia_update_file_state(&state, NvDeviceFileStatePermissionsOk); ++ } ++ } ++ ++ return state; ++} ++ ++int nvidia_get_file_state(int minor, int module_instance) ++{ ++ char path[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN]; ++ char proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE]; ++ mode_t mode; ++ uid_t uid; ++ gid_t gid; ++ int modification_allowed; ++ int state = 0; ++ ++ assign_device_file_name(path, minor, module_instance); ++ assign_proc_registry_path(proc_path, module_instance); ++ ++ init_device_file_parameters(&uid, &gid, &mode, &modification_allowed, ++ proc_path); ++ ++ state = get_file_state_helper(path, NV_MAJOR_DEVICE_NUMBER, minor, ++ proc_path, uid, gid, mode); ++ ++ return state; ++} ++ ++/* ++ * Attempt to create the specified device file with the specified major ++ * and minor number. If proc_path is specified, scan it for custom file ++ * permissions. Returns 1 if the file is successfully created; returns 0 ++ * if the file could not be created. ++ */ ++int mknod_helper(int major, int minor, const char *path, ++ const char *proc_path) ++{ ++ dev_t dev = NV_MAKE_DEVICE(major, minor); ++ mode_t mode; ++ uid_t uid; ++ gid_t gid; ++ int modification_allowed; ++ int ret; ++ int state; ++ int do_mknod; ++ ++ if (path == NULL || path[0] == '\0') ++ { ++ return 0; ++ } ++ ++ init_device_file_parameters(&uid, &gid, &mode, &modification_allowed, ++ proc_path); ++ ++ /* If device file modification is not allowed, nothing to do: success. */ ++ ++ if (modification_allowed != 1) ++ { ++ return 1; ++ } ++ ++ state = get_file_state_helper(path, major, minor, ++ proc_path, uid, gid, mode); ++ ++ if (nvidia_test_file_state(state, NvDeviceFileStateFileExists) && ++ nvidia_test_file_state(state, NvDeviceFileStateChrDevOk) && ++ nvidia_test_file_state(state, NvDeviceFileStatePermissionsOk)) ++ { ++ return 1; ++ } ++ ++ /* If the stat(2) above failed, we need to create the device file. */ ++ ++ do_mknod = 0; ++ ++ if (!nvidia_test_file_state(state, NvDeviceFileStateFileExists)) ++ { ++ do_mknod = 1; ++ } ++ ++ /* ++ * If the file exists but the file is either not a character device or has ++ * the wrong major/minor character device number, then we need to delete it ++ * and recreate it. ++ */ ++ if (!do_mknod && ++ !nvidia_test_file_state(state, NvDeviceFileStateChrDevOk)) ++ { ++ ret = remove(path); ++ if (ret != 0) ++ { ++ return 0; ++ } ++ do_mknod = 1; ++ } ++ ++ if (do_mknod) ++ { ++ ret = mknod(path, S_IFCHR | mode, dev); ++ if (ret != 0) ++ { ++ return 0; ++ } ++ } ++ ++ /* ++ * Make sure the permissions and ownership are set correctly; if ++ * we created the device above and either of the below fails, then ++ * also delete the device file. ++ */ ++ if ((chmod(path, mode) != 0) || ++ (chown(path, uid, gid) != 0)) ++ { ++ if (do_mknod) ++ { ++ remove(path); ++ } ++ return 0; ++ } ++ ++ return 1; ++} ++ ++ ++/* ++ * Attempt to create a device file with the specified minor number for ++ * the specified NVIDIA module instance. ++ */ ++int nvidia_mknod(int minor, int module_instance) ++{ ++ char path[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN]; ++ char proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE]; ++ ++ assign_device_file_name(path, minor, module_instance); ++ assign_proc_registry_path(proc_path, module_instance); ++ ++ return mknod_helper(NV_MAJOR_DEVICE_NUMBER, minor, path, proc_path); ++} ++ ++ ++/* ++ * Scan NV_PROC_DEVICES_PATH to find the major number of the character ++ * device with the specified name. Returns the major number on success, ++ * or -1 on failure. ++ */ ++int get_chardev_major(const char *name) ++{ ++ int ret = -1; ++ char line[NV_MAX_LINE_LENGTH]; ++ FILE *fp; ++ ++ line[NV_MAX_LINE_LENGTH - 1] = '\0'; ++ ++ fp = fopen(NV_PROC_DEVICES_PATH, "r"); ++ if (!fp) ++ { ++ goto done; ++ } ++ ++ /* Find the beginning of the 'Character devices:' section */ ++ ++ while (fgets(line, NV_MAX_LINE_LENGTH - 1, fp)) ++ { ++ if (strcmp(line, "Character devices:\n") == 0) ++ { ++ break; ++ } ++ } ++ ++ if (ferror(fp)) { ++ goto done; ++ } ++ ++ /* Search for the given module name */ ++ ++ while (fgets(line, NV_MAX_LINE_LENGTH - 1, fp)) ++ { ++ char *found; ++ ++ if (strcmp(line, "\n") == 0 ) ++ { ++ /* we've reached the end of the 'Character devices:' section */ ++ break; ++ } ++ ++ found = strstr(line, name); ++ ++ /* Check for a newline to avoid partial matches */ ++ ++ if (found && found[strlen(name)] == '\n') ++ { ++ int major; ++ ++ /* Read the device major number */ ++ ++ if (sscanf(line, " %d %*s", &major) == 1) ++ { ++ ret = major; ++ } ++ ++ break; ++ } ++ } ++ ++done: ++ ++ if (fp) ++ { ++ fclose(fp); ++ } ++ ++ return ret; ++} ++ ++ ++/* ++ * Attempt to create the NVIDIA Unified Memory device file ++ */ ++int nvidia_uvm_mknod(int base_minor) ++{ ++ int major = get_chardev_major(NV_UVM_MODULE_NAME); ++ ++ if (major < 0) ++ { ++ return 0; ++ } ++ ++ return mknod_helper(major, base_minor, NV_UVM_DEVICE_NAME, NULL) && ++ mknod_helper(major, base_minor + 1, NV_UVM_TOOLS_DEVICE_NAME, NULL); ++} ++ ++ ++/* ++ * Attempt to load the NVIDIA Unified Memory kernel module ++ */ ++int nvidia_uvm_modprobe(void) ++{ ++ return modprobe_helper(0, NV_UVM_MODULE_NAME); ++} ++ ++ ++/* ++ * Attempt to load the NVIDIA modeset driver. ++ */ ++int nvidia_modeset_modprobe(void) ++{ ++ return modprobe_helper(0, NV_MODESET_MODULE_NAME); ++} ++ ++ ++/* ++ * Attempt to create the NVIDIA modeset driver device file. ++ */ ++int nvidia_modeset_mknod(void) ++{ ++ char proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE]; ++ ++ assign_proc_registry_path(proc_path, NV_MODULE_INSTANCE_NONE); ++ ++ return mknod_helper(NV_MAJOR_DEVICE_NUMBER, ++ NV_MODESET_MINOR_DEVICE_NUM, ++ NV_MODESET_DEVICE_NAME, proc_path); ++} ++ ++/* ++ * Attempt to create the NVIDIA NVLink driver device file. ++ */ ++int nvidia_nvlink_mknod(void) ++{ ++ int major = get_chardev_major(NV_NVLINK_MODULE_NAME); ++ ++ if (major < 0) ++ { ++ return 0; ++ } ++ ++ return mknod_helper(major, ++ 0, ++ NV_NVLINK_DEVICE_NAME, ++ NV_NVLINK_PROC_PERM_PATH); ++} ++ ++int nvidia_vgpu_vfio_mknod(int minor_num) ++{ ++ int major = get_chardev_major(NV_VGPU_VFIO_MODULE_NAME); ++ char vgpu_dev_name[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN]; ++ char proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE]; ++ ++ if (major < 0) ++ { ++ return 0; ++ } ++ ++ assign_proc_registry_path(proc_path, NV_MODULE_INSTANCE_NONE); ++ ++ snprintf(vgpu_dev_name, NV_MAX_CHARACTER_DEVICE_FILE_STRLEN, ++ NV_VGPU_VFIO_DEVICE_NAME, minor_num); ++ ++ vgpu_dev_name[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN - 1] = '\0'; ++ ++ return mknod_helper(major, minor_num, vgpu_dev_name, proc_path); ++} ++ ++#endif /* NV_LINUX */ +\ No newline at end of file +diff --git a/src/nvidia-modprobe-utils.h b/src/nvidia-modprobe-utils.h +new file mode 100644 +index 0000000..e06b4a4 +--- /dev/null ++++ b/src/nvidia-modprobe-utils.h +@@ -0,0 +1,157 @@ ++/* ++ * Copyright (c) 2013, NVIDIA CORPORATION. ++ * ++ * 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, sublicense, and/or sell copies ++ * of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ * ++ * This file provides utility functions on Linux for loading the ++ * NVIDIA kernel module and creating NVIDIA device files. ++ */ ++ ++#ifndef __NVIDIA_MODPROBE_UTILS_H__ ++#define __NVIDIA_MODPROBE_UTILS_H__ ++ ++#include ++ ++#define NV_MAX_CHARACTER_DEVICE_FILE_STRLEN 128 ++#define NV_MODULE_INSTANCE_NONE -1 ++#define NV_MODULE_INSTANCE_ZERO 0 ++#define NV_MAX_MODULE_INSTANCES 8 ++#define NV_CTL_DEVICE_NUM 255 ++#define NV_MODESET_MINOR_DEVICE_NUM 254 ++ ++#define NV_FRONTEND_CONTROL_DEVICE_MINOR_MAX NV_CTL_DEVICE_NUM ++ ++#define NV_DEVICE_FILE_PATH "/dev/nvidia%d" ++#define NV_CTRL_DEVICE_FILE_PATH "/dev/nvidiactl" ++#define NV_MODESET_DEVICE_NAME "/dev/nvidia-modeset" ++#define NV_VGPU_VFIO_DEVICE_NAME "/dev/nvidia-vgpu%d" ++#define NV_NVLINK_DEVICE_NAME "/dev/nvidia-nvlink" ++ ++#define NV_NMODULE_CTRL_DEVICE_FILE_PATH "/dev/nvidiactl%d" ++ ++#define NV_FRONTEND_CONTROL_DEVICE_MINOR_MIN \ ++ (NV_FRONTEND_CONTROL_DEVICE_MINOR_MAX - \ ++ NV_MAX_MODULE_INSTANCES) ++ ++#define NV_FRONTEND_IS_CONTROL_DEVICE(x) \ ++ ((x <= NV_FRONTEND_CONTROL_DEVICE_MINOR_MAX) && \ ++ (x > NV_FRONTEND_CONTROL_DEVICE_MINOR_MIN)) ++ ++#if defined(NV_LINUX) ++ ++typedef enum ++{ ++ NvDeviceFileStateFileExists = 0, ++ NvDeviceFileStateChrDevOk, ++ NvDeviceFileStatePermissionsOk ++} NvDeviceFileState; ++ ++static __inline__ void nvidia_update_file_state(int *state, ++ NvDeviceFileState value) ++{ ++ *state |= (1 << value); ++} ++ ++static __inline__ int nvidia_test_file_state(int state, ++ NvDeviceFileState value) ++{ ++ return !!(state & (1 << value)); ++} ++ ++int nvidia_get_file_state(int minor, int module_instance); ++int nvidia_modprobe(const int print_errors, int module_instance); ++int nvidia_mknod(int minor, int module_instance); ++int nvidia_uvm_modprobe(void); ++int nvidia_uvm_mknod(int base_minor); ++int nvidia_modeset_modprobe(void); ++int nvidia_modeset_mknod(void); ++int nvidia_vgpu_vfio_mknod(int minor_num); ++int nvidia_nvlink_mknod(void); ++ ++int mknod_helper(int major, int minor, const char *path, const char *proc_path); ++int get_chardev_major(const char *name); ++ ++#endif /* NV_LINUX */ ++ ++/* ++ * Detect use of multiple kernel module instances. Use a single ++ * module instance unless instance != NV_MODULE_INSTANCE_NONE ++ */ ++static __inline__ int is_multi_module(int module_instance) ++{ ++ return (module_instance != NV_MODULE_INSTANCE_NONE); ++} ++ ++ ++/* ++ * Construct the device file name, based on 'minor'. If an error ++ * occurs, the nul terminator will be written to name[0]. ++ */ ++static __inline__ void assign_device_file_name ++( ++ char name[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN], ++ int minor, ++ int module_instance ++) ++{ ++ int ret; ++ ++ if ((minor < 0) || (minor > NV_CTL_DEVICE_NUM)) ++ { ++ goto fail; ++ } ++ ++ if (!is_multi_module(module_instance) && minor == NV_CTL_DEVICE_NUM) ++ { ++ ret = snprintf(name, ++ NV_MAX_CHARACTER_DEVICE_FILE_STRLEN, ++ NV_CTRL_DEVICE_FILE_PATH); ++ } ++ else if (is_multi_module(module_instance) && ++ NV_FRONTEND_IS_CONTROL_DEVICE(minor)) ++ { ++ ret = snprintf(name, ++ NV_MAX_CHARACTER_DEVICE_FILE_STRLEN, ++ NV_NMODULE_CTRL_DEVICE_FILE_PATH, ++ module_instance); ++ } ++ else ++ { ++ ret = snprintf(name, ++ NV_MAX_CHARACTER_DEVICE_FILE_STRLEN, ++ NV_DEVICE_FILE_PATH, minor); ++ } ++ ++ if (ret <= 0) ++ { ++ goto fail; ++ } ++ ++ name[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN - 1] = '\0'; ++ ++ return; ++ ++fail: ++ ++ name[0] = '\0'; ++} ++ ++#endif /* __NVIDIA_MODPROBE_UTILS_H__ */ +\ No newline at end of file +diff --git a/src/pci-enum.h b/src/pci-enum.h +new file mode 100644 +index 0000000..73b8497 +--- /dev/null ++++ b/src/pci-enum.h +@@ -0,0 +1,112 @@ ++/* ++ * (C) Copyright IBM Corporation 2006 ++ * ++ * Copyright (c) 2007 Paulo R. Zanoni, Tiago Vignatti ++ * ++ * Copyright 2009 Red Hat, Inc. ++ * ++ * Copyright (c) 2014 NVIDIA Corporation ++ * ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy ++ * of this software and associated documentation files (the "Software"), to deal ++ * in the Software without restriction, including without limitation the rights ++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++ * copies of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++ * THE SOFTWARE. ++ */ ++ ++/** ++ * pci-enum.h ++ * ++ * Based on libpciaccess/include/pciaccess.h from libpciaccess-0.12.1, which ++ * can be found here: ++ * ++ * http://cgit.freedesktop.org/xorg/lib/libpciaccess ++ * ++ * Original authors: Ian Romanick , Paulo R. Zanoni, ++ * Tiago Vignatti ++ */ ++ ++#ifndef PCI_ENUM_H ++#define PCI_ENUM_H ++ ++#include ++ ++struct pci_id_match; ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++int pci_enum_match_id(struct pci_id_match *); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#define PCI_MATCH_ANY (~0U) ++ ++#define PCI_BASE_CLASS_MASK 0xff00 ++#define PCI_SUB_CLASS_MASK 0x00ff ++#define PCI_FULL_CLASS_MASK PCI_BASE_CLASS_MASK | PCI_SUB_CLASS_MASK ++ ++/** ++ * Compare two PCI ID values (either vendor or device). This is used ++ * internally to compare the fields of pci_id_match to the fields of ++ * pci_device. ++ */ ++#define PCI_ID_COMPARE(a, b) \ ++ (((a) == PCI_MATCH_ANY) || ((a) == (b))) ++ ++/** ++ */ ++struct pci_id_match { ++ /** ++ * Device/vendor matching controls ++ * ++ * Control the search based on the device, vendor, subdevice, or subvendor ++ * IDs. Setting any of these fields to PCI_MATCH_ANY will cause the field ++ * to not be used in the comparison. ++ */ ++ /*@{*/ ++ uint32_t vendor_id; ++ uint32_t device_id; ++ uint32_t subvendor_id; ++ uint32_t subdevice_id; ++ /*@}*/ ++ ++ ++ /** ++ * Device class matching controls ++ * ++ * Device's class and subclass. The class is at bits [15:8], subclass is at ++ * bits [7:0]. ++ */ ++ /*@{*/ ++ uint16_t device_class; ++ uint16_t device_class_mask; ++ /*@}*/ ++ ++ /** ++ * Match results ++ * ++ * Specifies the number of devices found that match this criteria. ++ */ ++ /*@{*/ ++ uint16_t num_matches; ++}; ++ ++#endif /* PCI_ENUM_H */ +\ No newline at end of file +diff --git a/src/pci-sysfs.c b/src/pci-sysfs.c +new file mode 100644 +index 0000000..210bf40 +--- /dev/null ++++ b/src/pci-sysfs.c +@@ -0,0 +1,529 @@ ++/* ++ * (C) Copyright IBM Corporation 2006 ++ * ++ * Copyright (c) 2014-2018 NVIDIA Corporation ++ * ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy ++ * of this software and associated documentation files (the "Software"), to deal ++ * in the Software without restriction, including without limitation the rights ++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++ * copies of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++ * THE SOFTWARE. ++ */ ++ ++/** ++ * pcienum-sysfs.c ++ * ++ * Based on libpciaccess/src/linux_sysfs.c from libpciaccess-0.12.1, which was ++ * found here: ++ * ++ * http://cgit.freedesktop.org/xorg/lib/libpciaccess ++ * ++ * Access PCI subsystem using Linux's sysfs interface. This interface is ++ * available starting somewhere in the late 2.5.x kernel phase, and is the ++ * preferred method on all 2.6.x kernels. ++ * ++ * Original author: Ian Romanick ++ */ ++ ++#if defined(NV_LINUX) ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "pci-enum.h" ++#include "pci-sysfs.h" ++ ++#define SYS_BUS_PCI "/sys/bus/pci/" ++#define SYS_BUS_PCI_DEVICES SYS_BUS_PCI "devices" ++#define SYS_BUS_PCI_RESCAN SYS_BUS_PCI "rescan" ++#define PCI_DBDF_FORMAT "%04x:%02x:%02x.%1u" ++#define SYSFS_PCI_BRIDGE_RESCAN_FMT SYS_BUS_PCI_DEVICES "/" PCI_DBDF_FORMAT "/rescan" ++#define SYSFS_RESCAN_STRING "1\n" ++#define SYSFS_RESCAN_STRING_SIZE 2 ++#define PCI_CAP_TTL_MAX 20 ++#define SYSFS_PATH_SIZE 256 ++ ++#define BAIL_ON_IO_ERR(buf, err, cnt, action) \ ++do { \ ++ if (((err) != 0) || ((cnt) < sizeof(buf))) \ ++ { \ ++ (err) = ((err) == 0) ? EIO : (err); \ ++ action; \ ++ } \ ++} while (0) ++ ++static int pci_sysfs_read_cfg(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, void *, ++ uint16_t size, uint16_t *); ++ ++static int find_matches(struct pci_id_match *match); ++ ++/** ++ * Attempt to access PCI subsystem using Linux's sysfs interface to enumerate ++ * the matched devices. ++ */ ++int ++pci_enum_match_id(struct pci_id_match *match) ++{ ++ int err = 0; ++ struct stat st; ++ ++ ++ /* ++ * If the directory "/sys/bus/pci/devices" exists, then the PCI subsystem ++ * can be accessed using this interface. ++ */ ++ match->num_matches = 0; ++ if (stat(SYS_BUS_PCI_DEVICES, &st) == 0) ++ { ++ err = find_matches(match); ++ } ++ else ++ { ++ err = errno; ++ } ++ ++ return err; ++} ++ ++ ++/** ++ * The sysfs lookup method uses the directory entries in /sys/bus/pci/devices ++ * to enumerate all PCI devices, and then uses a file in each that is mapped to ++ * the device's PCI config space to extract the data to match against. ++ */ ++static int ++find_matches(struct pci_id_match *match) ++{ ++ struct dirent *d; ++ DIR *sysfs_pci_dir; ++ int err = 0; ++ ++ sysfs_pci_dir = opendir(SYS_BUS_PCI_DEVICES); ++ if (sysfs_pci_dir == NULL) ++ { ++ return errno; ++ } ++ ++ while ((d = readdir(sysfs_pci_dir)) != NULL) ++ { ++ uint8_t config[48]; ++ uint16_t bytes; ++ unsigned dom, bus, dev, func; ++ uint16_t vendor_id, device_id, subvendor_id, subdevice_id; ++ uint16_t device_class; ++ ++ /* Ignore the . and .. dirents */ ++ if ((strcmp(d->d_name, ".") == 0) || (strcmp(d->d_name, "..") == 0)) ++ { ++ continue; ++ } ++ ++ sscanf(d->d_name, PCI_DBDF_FORMAT, ++ & dom, & bus, & dev, & func); ++ ++ err = pci_sysfs_read_cfg(dom, bus, dev, func, 0, config, 48, & bytes); ++ if ((bytes == 48) && !err) ++ { ++ vendor_id = (uint16_t)config[0] + ((uint16_t)config[1] << 8); ++ device_id = (uint16_t)config[2] + ((uint16_t)config[3] << 8); ++ device_class = (uint16_t)config[10] + ++ ((uint16_t)config[11] << 8); ++ subvendor_id = (uint16_t)config[44] + ++ ((uint16_t)config[45] << 8); ++ subdevice_id = (uint16_t)config[46] + ++ ((uint16_t)config[47] << 8); ++ ++ /* ++ * This logic, originally in common_iterator.c, will tell if ++ * this device is a match for the search criteria. ++ */ ++ if (PCI_ID_COMPARE(match->vendor_id, vendor_id) && ++ PCI_ID_COMPARE(match->device_id, device_id) && ++ PCI_ID_COMPARE(match->subvendor_id, subvendor_id) && ++ PCI_ID_COMPARE(match->subdevice_id, subdevice_id) && ++ ((device_class & match->device_class_mask) == ++ match->device_class)) ++ { ++ match->num_matches++; ++ } ++ } ++ ++ if (err) ++ { ++ break; ++ } ++ } ++ ++ closedir(sysfs_pci_dir); ++ return err; ++} ++ ++static int ++pci_sysfs_read_cfg(uint16_t domain, uint16_t bus, uint16_t device, ++ uint16_t function, uint16_t off, void *data, ++ uint16_t size, uint16_t *bytes_read) ++{ ++ char name[SYSFS_PATH_SIZE]; ++ uint16_t temp_size = size; ++ int err = 0; ++ int fd; ++ char *data_bytes = data; ++ ++ if (bytes_read != NULL) ++ { ++ *bytes_read = 0; ++ } ++ ++ /* ++ * Each device has a directory under sysfs. Within that directory there ++ * is a file named "config". This file used to access the PCI config ++ * space. It is used here to obtain most of the information about the ++ * device. ++ */ ++ snprintf(name, SYSFS_PATH_SIZE - 1, "%s/" PCI_DBDF_FORMAT "/config", ++ SYS_BUS_PCI_DEVICES, domain, bus, device, function); ++ ++ fd = open(name, O_RDONLY); ++ if (fd < 0) ++ { ++ return errno; ++ } ++ ++ if (off != 0) ++ { ++ if (lseek(fd, (off_t) off, SEEK_SET) < 0) ++ { ++ close(fd); ++ return errno; ++ } ++ } ++ ++ while (temp_size > 0) ++ { ++ const ssize_t bytes = read(fd, data_bytes, temp_size); ++ ++ /* ++ * If zero bytes were read, then we assume it's the end of the ++ * config file. ++ */ ++ if (bytes <= 0) ++ { ++ err = errno; ++ break; ++ } ++ ++ temp_size -= bytes; ++ data_bytes += bytes; ++ } ++ ++ if (bytes_read != NULL) ++ { ++ *bytes_read = size - temp_size; ++ } ++ ++ close(fd); ++ return err; ++} ++ ++static int ++pci_sysfs_write_cfg(uint16_t domain, uint16_t bus, uint16_t device, ++ uint16_t function, uint16_t off, void *data, ++ uint16_t size, uint16_t *bytes_written) ++{ ++ char name[SYSFS_PATH_SIZE]; ++ uint16_t temp_size = size; ++ int err = 0; ++ int fd; ++ char *data_bytes = data; ++ ++ if (bytes_written != NULL) ++ { ++ *bytes_written = 0; ++ } ++ ++ /* ++ * Each device has a directory under sysfs. Within that directory there ++ * is a file named "config". This file used to access the PCI config ++ * space. ++ */ ++ snprintf(name, SYSFS_PATH_SIZE - 1, "%s/" PCI_DBDF_FORMAT "/config", ++ SYS_BUS_PCI_DEVICES, domain, bus, device, function); ++ ++ fd = open(name, O_WRONLY); ++ if (fd < 0) ++ { ++ return errno; ++ } ++ ++ if (off != 0) ++ { ++ if (lseek(fd, (off_t) off, SEEK_SET) < 0) ++ { ++ close(fd); ++ return errno; ++ } ++ } ++ ++ while (temp_size > 0) ++ { ++ const ssize_t bytes = write(fd, data_bytes, temp_size); ++ ++ if (bytes < 0) ++ { ++ err = errno; ++ break; ++ } ++ /* ++ * If zero bytes were written, then we assume it's the end of the ++ * config file. ++ */ ++ if (bytes == 0) ++ { ++ break; ++ } ++ ++ temp_size -= bytes; ++ data_bytes += bytes; ++ } ++ ++ if (bytes_written != NULL) ++ { ++ *bytes_written = size - temp_size; ++ } ++ ++ close(fd); ++ return err; ++} ++ ++int ++pci_rescan(uint16_t domain, uint8_t bus, uint8_t slot, uint8_t function) ++{ ++ char const *node; ++ char node_buf[SYSFS_PATH_SIZE]; ++ int node_fd; ++ ssize_t cnt; ++ ++ if ((domain | bus | slot | function) == 0) ++ { ++ /* rescan the entire PCI tree */ ++ node = SYS_BUS_PCI_RESCAN; ++ } ++ else ++ { ++ snprintf(node_buf, sizeof(node_buf) - 1, SYSFS_PCI_BRIDGE_RESCAN_FMT, ++ domain, bus, slot, function); ++ node = node_buf; ++ } ++ ++ node_fd = open(node, O_WRONLY); ++ ++ if (node_fd < 0) ++ { ++ return errno; ++ } ++ ++ cnt = write(node_fd, SYSFS_RESCAN_STRING, SYSFS_RESCAN_STRING_SIZE); ++ ++ close(node_fd); ++ ++ return cnt == SYSFS_RESCAN_STRING_SIZE ? 0 : EIO; ++} ++ ++int ++pci_find_parent_bridge(pci_info_t *p_gpu_info, pci_info_t *p_bridge_info) ++{ ++ char gpu_path[SYSFS_PATH_SIZE]; ++ char bridge_path[PATH_MAX]; ++ char *p_node; ++ ++ snprintf(gpu_path, SYSFS_PATH_SIZE - 1, "%s/" PCI_DBDF_FORMAT "/..", SYS_BUS_PCI_DEVICES, ++ p_gpu_info->domain, p_gpu_info->bus, ++ p_gpu_info->dev, p_gpu_info->ftn); ++ ++ if (realpath(gpu_path, bridge_path) == NULL) ++ { ++ return errno; ++ } ++ ++ p_node = strrchr(bridge_path, '/'); ++ ++ if (p_node == NULL) ++ { ++ return ENOENT; ++ } ++ ++ ++p_node; ++ ++ if (sscanf(p_node, PCI_DBDF_FORMAT, ++ &p_bridge_info->domain, &p_bridge_info->bus, ++ &p_bridge_info->dev, &p_bridge_info->ftn) != 4) ++ { ++ return ENOENT; ++ } ++ ++ return 0; ++} ++ ++static int ++pci_find_pcie_caps(uint16_t domain, uint8_t bus, uint8_t device, uint8_t ftn, uint8_t *p_caps) ++{ ++ unsigned ttl; ++ uint8_t off; ++ uint8_t cap_id; ++ int err = ENXIO; ++ uint16_t cnt; ++ ++ for (off = PCI_CAPABILITY_LIST, ttl = PCI_CAP_TTL_MAX; ttl; --ttl) ++ { ++ err = pci_sysfs_read_cfg(domain, bus, device, ftn, off, ++ &off, sizeof(off), &cnt); ++ BAIL_ON_IO_ERR(off, err, cnt, break); ++ ++ /* Capabilities must reside above the std config header */ ++ if ((off < PCI_STD_HEADER_SIZEOF) || (off == 0xff)) ++ { ++ break; ++ } ++ ++ /* Clear the reserved bits */ ++ off &= ~3; ++ ++ err = pci_sysfs_read_cfg(domain, bus, device, ftn, off + PCI_CAP_LIST_ID, ++ &cap_id, sizeof(cap_id), &cnt); ++ BAIL_ON_IO_ERR(cap_id, err, cnt, break); ++ ++ if (cap_id == PCI_CAP_ID_EXP) ++ { ++ goto found; ++ } ++ ++ if (cap_id == 0xff) ++ { ++ break; ++ } ++ ++ off += PCI_CAP_LIST_NEXT; ++ } ++ return err; ++found: ++ *p_caps = off; ++ return 0; ++} ++ ++int ++pci_bridge_link_set_enable(uint16_t domain, uint8_t bus, uint8_t device, uint8_t ftn, int enable) ++{ ++ uint8_t pcie_caps = 0; ++ uint16_t reg; ++ uint32_t cap_reg; ++ uint16_t cnt; ++ int err; ++ struct timeval start; ++ struct timeval curr; ++ struct timeval diff; ++ struct timespec delay = {0, PCI_LINK_DELAY_NS}; ++ struct timespec dlllar_disable_delay = {0, PCI_LINK_DLLLAR_DISABLE_DELAY_NS}; ++ ++ err = pci_find_pcie_caps(domain, bus, device, ftn, &pcie_caps); ++ ++ if (err != 0) ++ { ++ return err; ++ } ++ ++ err = pci_sysfs_read_cfg(domain, bus, device, ftn, pcie_caps + PCI_EXP_LNKCTL, ++ ®, sizeof(reg), &cnt); ++ BAIL_ON_IO_ERR(reg, err, cnt, return err); ++ ++ if (enable) ++ { ++ reg &= ~PCI_EXP_LNKCTL_LD; ++ } ++ else ++ { ++ reg |= PCI_EXP_LNKCTL_LD; ++ } ++ ++ err = pci_sysfs_write_cfg(domain, bus, device, ftn, pcie_caps + PCI_EXP_LNKCTL, ++ ®, sizeof(reg), &cnt); ++ BAIL_ON_IO_ERR(reg, err, cnt, return err); ++ ++ if (enable) ++ { ++ /* ++ * Data Link Layer Link Active Reporting must be capable for ++ * zero power capable downstream port. But old controller might ++ * not implement it. In this case, we wait for 30 ms. ++ */ ++ err = pci_sysfs_read_cfg(domain, bus, device, ftn, pcie_caps + PCI_EXP_LNKCAP, ++ &cap_reg, sizeof(cap_reg), &cnt); ++ BAIL_ON_IO_ERR(cap_reg, err, cnt, return err); ++ ++ if (cap_reg & PCI_EXP_LNKCAP_DLLLARC) ++ { ++ /* wait for the link to go up and then sleep for 100 ms */ ++ ++ gettimeofday(&start, NULL); ++ ++ for (;;) ++ { ++ err = pci_sysfs_read_cfg(domain, bus, device, ftn, pcie_caps + PCI_EXP_LNKSTA, ++ ®, sizeof(reg), &cnt); ++ BAIL_ON_IO_ERR(reg, err, cnt, return err); ++ ++ if ((reg & PCI_EXP_LNKSTA_DLLLA) != 0) ++ { ++ break; ++ } ++ ++ gettimeofday(&curr, NULL); ++ timersub(&curr, &start, &diff); ++ ++ if ((diff.tv_sec > 0) || (diff.tv_usec >= PCI_LINK_WAIT_US)) ++ { ++ return ETIME; ++ } ++ } ++ } ++ else ++ { ++ /* ++ * Measured the time on DGX1 for link to become established in a bridge, ++ * where the DLLLA reporting is supported and its approximately ~9ms, ++ * so wait for 30ms where DLLLA reporting is not supported. ++ */ ++ PCI_NANOSLEEP(&dlllar_disable_delay, NULL); ++ } ++ ++ PCI_NANOSLEEP(&delay, NULL); ++ } ++ ++ return err; ++} ++ ++#endif /* defined(NV_LINUX) */ +\ No newline at end of file +diff --git a/src/pci-sysfs.h b/src/pci-sysfs.h +new file mode 100644 +index 0000000..1fc695b +--- /dev/null ++++ b/src/pci-sysfs.h +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 2016-2018, NVIDIA CORPORATION. ++ * ++ * 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, sublicense, and/or sell copies ++ * of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ * ++ * This file provides utility functions on Linux for interfacing ++ * with the sysfs/PCI kernel facility. ++ */ ++ ++#ifndef __PCI_SYSFS_H__ ++#define __PCI_SYSFS_H__ ++ ++#if defined(NV_LINUX) ++ ++#include ++ ++#if !defined(PCI_STD_HEADER_SIZEOF) ++#define PCI_STD_HEADER_SIZEOF 64 ++#endif ++#if !defined(PCI_CAP_ID_EXP) ++#define PCI_CAP_ID_EXP 0x10 /* PCI Express */ ++#endif ++#if !defined(PCI_EXP_LNKCAP) ++#define PCI_EXP_LNKCAP 12 /* Link Capabilities */ ++#endif ++#if !defined(PCI_EXP_LNKCAP_DLLLARC) ++#define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ ++#endif ++#if !defined(PCI_EXP_LNKCTL) ++#define PCI_EXP_LNKCTL 16 /* Link Control */ ++#endif ++#if !defined(PCI_EXP_LNKCTL_LD) ++#define PCI_EXP_LNKCTL_LD 0x0010 /* Link Disable */ ++#endif ++#if !defined(PCI_EXP_LNKSTA) ++#define PCI_EXP_LNKSTA 18 /* Link Status */ ++#endif ++#if !defined(PCI_EXP_LNKSTA_DLLLA) ++#define PCI_EXP_LNKSTA_DLLLA 0x2000 /* Data Link Layer Link Active */ ++#endif ++ ++#define PCI_LINK_WAIT_US 200000 /* 200 ms, must be less than 1000000 (1s) */ ++#define PCI_LINK_DELAY_NS 100000000 /* 100 ms */ ++#define PCI_LINK_DLLLAR_DISABLE_DELAY_NS 30000000 /* 30ms */ ++ ++#if (_POSIX_C_SOURCE >= 199309L) ++#define PCI_NANOSLEEP(ts, rem) nanosleep(ts, rem) ++#elif !(_POSIX_C_SOURCE >= 200809L) ++#define PCI_NANOSLEEP(ts, rem) usleep((ts)->tv_sec * 1000000 + ((ts)->tv_nsec + 999) / 1000) ++#else ++#define PCI_NANOSLEEP(ts, rem) sleep((ts)->tv_sec + ((ts)->tv_nsec + 999999999) / 1000000000) ++#endif ++ ++typedef struct { ++ unsigned domain; ++ unsigned bus; ++ unsigned dev; ++ unsigned ftn; ++} pci_info_t; ++ ++int pci_rescan(uint16_t domain, uint8_t bus, uint8_t slot, uint8_t function); ++int pci_find_parent_bridge(pci_info_t *p_gpu_info, pci_info_t *p_bridge_info); ++int pci_bridge_link_set_enable(uint16_t domain, uint8_t bus, uint8_t device, uint8_t ftn, int enable); ++ ++#endif /* NV_LINUX */ ++ ++#endif /* __PCI_SYSFS_H__ */ +\ No newline at end of file +-- +2.27.0 + diff --git a/package/libnvidia-container/0002-Remove-dependency-handling-from-Makefile.patch b/package/libnvidia-container/0002-Remove-dependency-handling-from-Makefile.patch new file mode 100644 index 00000000000..d4ba9dfe804 --- /dev/null +++ b/package/libnvidia-container/0002-Remove-dependency-handling-from-Makefile.patch @@ -0,0 +1,698 @@ +From 6752d8d5e315eb3f061498a9c35558f90f9600e2 Mon Sep 17 00:00:00 2001 +From: Christian Stewart +Date: Sat, 18 Jul 2020 15:26:22 -0700 +Subject: [PATCH] Remove dependency handling from Makefile + +Buildroot will handle this for the makefile. + +Signed-off-by: Christian Stewart +--- + Makefile | 54 +++------ + mk/nvidia-modprobe.mk | 55 --------- + src/nvc.c | 6 +- + src/nvidia-modprobe-utils.c | 225 ++++++++++++++++-------------------- + src/nvidia-modprobe-utils.h | 53 ++------- + 5 files changed, 128 insertions(+), 265 deletions(-) + delete mode 100644 mk/nvidia-modprobe.mk + +diff --git a/Makefile b/Makefile +index f1c56a9..80780d1 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,13 +2,13 @@ + # Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. + # + +-.PHONY: all tools shared static deps install uninstall dist depsclean mostlyclean clean distclean ++.PHONY: all tools shared static install uninstall dist mostlyclean clean distclean + .DEFAULT_GOAL := all +-STRIP := @echo skipping: strip ++ + ##### Global variables ##### + +-WITH_LIBELF ?= yes +-WITH_TIRPC ?= yes ++WITH_LIBELF ?= no ++WITH_TIRPC ?= no + WITH_SECCOMP ?= yes + + ##### Global definitions ##### +@@ -16,15 +16,14 @@ WITH_SECCOMP ?= yes + export prefix = /usr + export exec_prefix = $(prefix) + export bindir = $(exec_prefix)/bin +-export libdir = $(exec_prefix)/lib64 ++export libdir = $(exec_prefix)/lib + export docdir = $(prefix)/share/doc +-export libdbgdir = $(prefix)/lib64/debug$(libdir) ++export libdbgdir = $(prefix)/lib/debug$(libdir) + export includedir = $(prefix)/include + export pkgconfdir = $(libdir)/pkgconfig + + export PKG_DIR ?= $(CURDIR)/pkg + export SRCS_DIR ?= $(CURDIR)/src +-export DEPS_DIR ?= $(CURDIR)/deps + export DIST_DIR ?= $(CURDIR)/dist + export MAKE_DIR ?= $(CURDIR)/mk + export DEBUG_DIR ?= $(CURDIR)/.debug +@@ -120,9 +119,9 @@ LDFLAGS := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS) + LDLIBS := $(LDLIBS) + + # Library flags (recursively expanded to handle target-specific flags) +-LIB_CPPFLAGS = -DNV_LINUX -isystem $(DEPS_DIR)$(includedir) -include $(BUILD_DEFS) ++LIB_CPPFLAGS = -DNV_LINUX -include $(BUILD_DEFS) + LIB_CFLAGS = -fPIC +-LIB_LDFLAGS = -L$(DEPS_DIR)$(libdir) -shared -Wl,-soname=$(LIB_SONAME) ++LIB_LDFLAGS = -shared -Wl,-soname=$(LIB_SONAME) + # LIB_LDLIBS_STATIC = -l:libnvidia-modprobe-utils.a + LIB_LDLIBS_SHARED = -ldl -lcap -ltirpc + ifeq ($(WITH_LIBELF), yes) +@@ -132,7 +131,7 @@ else + LIB_LDLIBS_STATIC += -l:libelf.a + endif + ifeq ($(WITH_TIRPC), yes) +-LIB_CPPFLAGS += -isystem $(DEPS_DIR)$(includedir)/tirpc -DWITH_TIRPC ++LIB_CPPFLAGS += -DWITH_TIRPC + # LIB_LDLIBS_STATIC += -l:libtirpc.a + LIB_LDLIBS_SHARED += -lpthread + endif +@@ -176,15 +175,15 @@ $(LIB_RPC_SRCS): $(LIB_RPC_SPEC) + $(RM) $@ + cd $(dir $@) && $(RPCGEN) $(RPCGENFLAGS) -C -M -N -o $(notdir $@) $(LIB_RPC_SPEC) + +-$(LIB_OBJS): %.lo: %.c | deps ++$(LIB_OBJS): %.lo: %.c + $(CC) $(LIB_CFLAGS) $(LIB_CPPFLAGS) -MMD -MF $*.d -c $(OUTPUT_OPTION) $< + +-$(BIN_OBJS): %.o: %.c | shared ++$(BIN_OBJS): %.o: %.c + $(CC) $(BIN_CFLAGS) $(BIN_CPPFLAGS) -MMD -MF $*.d -c $(OUTPUT_OPTION) $< + + -include $(DEPENDENCIES) + +-$(LIB_SHARED): $(LIB_OBJS) ++$(LIB_SHARED): $(BUILD_DEFS) $(SRCS_DIR)/driver_rpc.h $(LIB_OBJS) + $(MKDIR) -p $(DEBUG_DIR) + $(CC) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(LIB_LDFLAGS) $(OUTPUT_OPTION) $^ $(LIB_SCRIPT) $(LIB_LDLIBS) + $(OBJCPY) --only-keep-debug $@ $(LIB_SONAME) +@@ -198,7 +197,7 @@ $(LIB_STATIC_OBJ): $(LIB_OBJS) + $(OBJCPY) --localize-hidden $@ + $(STRIP) --strip-unneeded -R .comment $@ + +-$(BIN_NAME): $(BIN_OBJS) ++$(BIN_NAME): $(BUILD_DEFS) $(SRCS_DIR)/driver_rpc.h $(LIB_SHARED) $(BIN_OBJS) + $(CC) $(BIN_CFLAGS) $(BIN_CPPFLAGS) $(BIN_LDFLAGS) $(OUTPUT_OPTION) $^ $(BIN_SCRIPT) $(BIN_LDLIBS) + $(STRIP) --strip-unneeded -R .comment $@ + +@@ -219,17 +218,6 @@ shared: $(LIB_SHARED) + + static: $(LIB_STATIC)($(LIB_STATIC_OBJ)) + +-deps: export DESTDIR:=$(DEPS_DIR) +-deps: $(LIB_RPC_SRCS) $(BUILD_DEFS) +- $(MKDIR) -p $(DEPS_DIR) +- # $(MAKE) -f $(MAKE_DIR)/nvidia-modprobe.mk install +-ifeq ($(WITH_LIBELF), no) +- # $(MAKE) -f $(MAKE_DIR)/elftoolchain.mk install +-endif +-ifeq ($(WITH_TIRPC), yes) +- # $(MAKE) -f $(MAKE_DIR)/libtirpc.mk install +-endif +- + install: all + $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(includedir) $(bindir) $(libdir) $(docdir) $(libdbgdir) $(pkgconfdir)) + # Install header files +@@ -237,8 +225,7 @@ install: all + # Install library files + $(INSTALL) -m 644 $(LIB_STATIC) $(DESTDIR)$(libdir) + $(INSTALL) -m 755 $(LIB_SHARED) $(DESTDIR)$(libdir) +- $(LN) -sf $(LIB_SONAME) $(DESTDIR)$(libdir)/$(LIB_SYMLINK) +- $(LDCONFIG) -n $(DESTDIR)$(libdir) ++ $(LN) -sf $(LIB_SHARED) $(DESTDIR)$(libdir)/$(LIB_SYMLINK) + # Install debugging symbols + # $(INSTALL) -m 644 $(DEBUG_DIR)/$(LIB_SONAME) $(DESTDIR)$(libdbgdir) + # Install configuration files +@@ -268,23 +255,12 @@ dist: install + $(TAR) --numeric-owner --owner=0 --group=0 -C $(dir $(DESTDIR)) -caf $(DESTDIR)_$(ARCH).tar.xz $(notdir $(DESTDIR)) + $(RM) -r $(DESTDIR) + +-depsclean: +- $(RM) $(BUILD_DEFS) +- -$(MAKE) -f $(MAKE_DIR)/nvidia-modprobe.mk clean +-ifeq ($(WITH_LIBELF), no) +- -$(MAKE) -f $(MAKE_DIR)/elftoolchain.mk clean +-endif +-ifeq ($(WITH_TIRPC), yes) +- -$(MAKE) -f $(MAKE_DIR)/libtirpc.mk clean +-endif +- + mostlyclean: + $(RM) $(LIB_OBJS) $(LIB_STATIC_OBJ) $(BIN_OBJS) $(DEPENDENCIES) + +-clean: mostlyclean depsclean ++clean: mostlyclean + + distclean: clean +- $(RM) -r $(DEPS_DIR) $(DIST_DIR) $(DEBUG_DIR) + $(RM) $(LIB_RPC_SRCS) $(LIB_STATIC) $(LIB_SHARED) $(BIN_NAME) + + deb: DESTDIR:=$(DIST_DIR)/$(LIB_NAME)_$(VERSION)_$(ARCH) +diff --git a/mk/nvidia-modprobe.mk b/mk/nvidia-modprobe.mk +deleted file mode 100644 +index ad399de..0000000 +--- a/mk/nvidia-modprobe.mk ++++ /dev/null +@@ -1,55 +0,0 @@ +-# +-# Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. +-# +- +-include $(MAKE_DIR)/common.mk +- +-##### Source definitions ##### +- +-VERSION := 396.51 +-PREFIX := nvidia-modprobe-$(VERSION) +-URL := https://github.com/NVIDIA/nvidia-modprobe/archive/$(VERSION).tar.gz +- +-SRCS_DIR := $(DEPS_DIR)/src/$(PREFIX) +-MODPROBE_UTILS := $(SRCS_DIR)/modprobe-utils +- +-LIB_STATIC := $(MODPROBE_UTILS)/libnvidia-modprobe-utils.a +-LIB_INCS := $(MODPROBE_UTILS)/nvidia-modprobe-utils.h \ +- $(MODPROBE_UTILS)/pci-enum.h +-LIB_SRCS := $(MODPROBE_UTILS)/nvidia-modprobe-utils.c \ +- $(MODPROBE_UTILS)/pci-sysfs.c +- +-##### Flags definitions ##### +- +-ARFLAGS := -rU +-CPPFLAGS := -D_FORTIFY_SOURCE=2 -DNV_LINUX +-CFLAGS := -O2 -g -fdata-sections -ffunction-sections -fstack-protector -fno-strict-aliasing -fPIC +- +-##### Private rules ##### +- +-LIB_OBJS := $(LIB_SRCS:.c=.o) +- +-$(SRCS_DIR)/.download_stamp: +- $(MKDIR) -p $(SRCS_DIR) +- $(CURL) --progress-bar -fSL $(URL) | \ +- $(TAR) -C $(SRCS_DIR) --strip-components=1 -xz $(PREFIX)/modprobe-utils +- @touch $@ +- +-$(LIB_SRCS): $(SRCS_DIR)/.download_stamp +- +-##### Public rules ##### +- +-.PHONY: all install clean +- +-all: $(LIB_STATIC) +- +-$(LIB_STATIC): $(LIB_OBJS) +- $(AR) rs $@ $^ +- +-install: all +- $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(includedir) $(libdir)) +- $(INSTALL) -m 644 $(LIB_INCS) $(DESTDIR)$(includedir) +- $(INSTALL) -m 644 $(LIB_STATIC) $(DESTDIR)$(libdir) +- +-clean: +- $(RM) $(LIB_OBJS) $(LIB_STATIC) +diff --git a/src/nvc.c b/src/nvc.c +index f1d9b62..74ea61c 100644 +--- a/src/nvc.c ++++ b/src/nvc.c +@@ -190,13 +190,13 @@ load_kernel_modules(struct error *err, const char *root) + } + + log_info("loading kernel module nvidia"); +- if (nvidia_modprobe(0, -1) == 0) ++ if (nvidia_modprobe(0) == 0) + log_err("could not load kernel module nvidia"); + else { +- if (nvidia_mknod(NV_CTL_DEVICE_MINOR, -1) == 0) ++ if (nvidia_mknod(NV_CTL_DEVICE_MINOR) == 0) + log_err("could not create kernel module device node"); + for (int i = 0; i < (int)devs.num_matches; ++i) { +- if (nvidia_mknod(i, -1) == 0) ++ if (nvidia_mknod(i) == 0) + log_err("could not create kernel module device node"); + } + } +diff --git a/src/nvidia-modprobe-utils.c b/src/nvidia-modprobe-utils.c +index d3f3233..fca21cf 100644 +--- a/src/nvidia-modprobe-utils.c ++++ b/src/nvidia-modprobe-utils.c +@@ -1,3 +1,29 @@ ++/* ++ * Copyright (c) 2013, NVIDIA CORPORATION. ++ * ++ * 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, sublicense, and/or sell copies ++ * of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ * ++ * This file provides utility functions on Linux for loading the ++ * NVIDIA kernel module and creating NVIDIA device files. ++ */ + + #if defined(NV_LINUX) + +@@ -27,9 +53,6 @@ + #define NV_NVIDIA_MODULE_NAME "nvidia" + #define NV_PROC_REGISTRY_PATH "/proc/driver/nvidia/params" + +-#define NV_NMODULE_NVIDIA_MODULE_NAME "nvidia%d" +-#define NV_NMODULE_PROC_REGISTRY_PATH "/proc/driver/nvidia/%d/params" +- + #define NV_UVM_MODULE_NAME "nvidia-uvm" + #define NV_UVM_DEVICE_NAME "/dev/nvidia-uvm" + #define NV_UVM_TOOLS_DEVICE_NAME "/dev/nvidia-uvm-tools" +@@ -41,6 +64,9 @@ + #define NV_NVLINK_MODULE_NAME "nvidia-nvlink" + #define NV_NVLINK_PROC_PERM_PATH "/proc/driver/nvidia-nvlink/permissions" + ++#define NV_NVSWITCH_MODULE_NAME "nvidia-nvswitch" ++#define NV_NVSWITCH_PROC_PERM_PATH "/proc/driver/nvidia-nvswitch/permissions" ++ + #define NV_DEVICE_FILE_MODE_MASK (S_IRWXU|S_IRWXG|S_IRWXO) + #define NV_DEVICE_FILE_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) + #define NV_DEVICE_FILE_UID 0 +@@ -54,84 +80,6 @@ + + #define NV_MIN(a, b) (((a) < (b)) ? (a) : (b)) + +-/* +- * Construct the nvidia kernel module name based on the input +- * module instance provided. If an error occurs, the null +- * terminator will be written to nv_module_name[0]. +- */ +-static __inline__ void assign_nvidia_kernel_module_name +-( +- char nv_module_name[NV_MAX_MODULE_NAME_SIZE], +- int module_instance +-) +-{ +- int ret; +- +- if (is_multi_module(module_instance)) +- { +- ret = snprintf(nv_module_name, NV_MAX_MODULE_NAME_SIZE, +- NV_NMODULE_NVIDIA_MODULE_NAME, module_instance); +- } +- else +- { +- ret = snprintf(nv_module_name, NV_MAX_MODULE_NAME_SIZE, +- NV_NVIDIA_MODULE_NAME); +- } +- +- if (ret <= 0) +- { +- goto fail; +- } +- +- nv_module_name[NV_MAX_MODULE_NAME_SIZE - 1] = '\0'; +- +- return; +- +-fail: +- +- nv_module_name[0] = '\0'; +-} +- +- +-/* +- * Construct the proc registry path name based on the input +- * module instance provided. If an error occurs, the null +- * terminator will be written to proc_path[0]. +- */ +-static __inline__ void assign_proc_registry_path +-( +- char proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE], +- int module_instance +-) +-{ +- int ret; +- +- if (is_multi_module(module_instance)) +- { +- ret = snprintf(proc_path, NV_MAX_PROC_REGISTRY_PATH_SIZE, +- NV_NMODULE_PROC_REGISTRY_PATH, module_instance); +- } +- else +- { +- ret = snprintf(proc_path, NV_MAX_PROC_REGISTRY_PATH_SIZE, +- NV_PROC_REGISTRY_PATH); +- } +- +- if (ret <= 0) +- { +- goto fail; +- } +- +- proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE - 1] = '\0'; +- +- return; +- +-fail: +- +- proc_path[0] = '\0'; +-} +- +- + /* + * Just like strcmp(3), except that differences between '-' and '_' are + * ignored. This is useful for comparing module names, where '-' and '_' +@@ -370,18 +318,20 @@ static int modprobe_helper(const int print_errors, const char *module_name) + return 0; + + default: +- if (waitpid(pid, &status, 0) < 0) +- { +- return 0; +- } +- if (WIFEXITED(status) && WEXITSTATUS(status) == 0) +- { +- return 1; +- } +- else +- { +- return 0; +- } ++ /* ++ * waitpid(2) is not always guaranteed to return success even if ++ * the child terminated normally. For example, if the process ++ * explicitly configured the handling of the SIGCHLD signal ++ * to SIG_IGN, then waitpid(2) will instead block until all ++ * children terminate and return the error ECHILD, regardless ++ * of the child's exit codes. ++ * ++ * Hence, ignore waitpid(2) error codes and instead check ++ * whether the desired kernel module is loaded. ++ */ ++ waitpid(pid, NULL, 0); ++ ++ return is_kernel_module_loaded(module_name); + } + + return 1; +@@ -391,13 +341,9 @@ static int modprobe_helper(const int print_errors, const char *module_name) + /* + * Attempt to load an NVIDIA kernel module + */ +-int nvidia_modprobe(const int print_errors, int module_instance) ++int nvidia_modprobe(const int print_errors) + { +- char nv_module_name[NV_MAX_MODULE_NAME_SIZE]; +- +- assign_nvidia_kernel_module_name(nv_module_name, module_instance); +- +- return modprobe_helper(print_errors, nv_module_name); ++ return modprobe_helper(print_errors, NV_NVIDIA_MODULE_NAME); + } + + +@@ -494,24 +440,22 @@ static int get_file_state_helper( + return state; + } + +-int nvidia_get_file_state(int minor, int module_instance) ++int nvidia_get_file_state(int minor) + { + char path[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN]; +- char proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE]; + mode_t mode; + uid_t uid; + gid_t gid; + int modification_allowed; + int state = 0; + +- assign_device_file_name(path, minor, module_instance); +- assign_proc_registry_path(proc_path, module_instance); ++ assign_device_file_name(path, minor); + + init_device_file_parameters(&uid, &gid, &mode, &modification_allowed, +- proc_path); ++ NV_PROC_REGISTRY_PATH); + + state = get_file_state_helper(path, NV_MAJOR_DEVICE_NUMBER, minor, +- proc_path, uid, gid, mode); ++ NV_PROC_REGISTRY_PATH, uid, gid, mode); + + return state; + } +@@ -522,8 +466,8 @@ int nvidia_get_file_state(int minor, int module_instance) + * permissions. Returns 1 if the file is successfully created; returns 0 + * if the file could not be created. + */ +-int mknod_helper(int major, int minor, const char *path, +- const char *proc_path) ++static int mknod_helper(int major, int minor, const char *path, ++ const char *proc_path) + { + dev_t dev = NV_MAKE_DEVICE(major, minor); + mode_t mode; +@@ -616,15 +560,13 @@ int mknod_helper(int major, int minor, const char *path, + * Attempt to create a device file with the specified minor number for + * the specified NVIDIA module instance. + */ +-int nvidia_mknod(int minor, int module_instance) ++int nvidia_mknod(int minor) + { + char path[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN]; +- char proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE]; + +- assign_device_file_name(path, minor, module_instance); +- assign_proc_registry_path(proc_path, module_instance); ++ assign_device_file_name(path, minor); + +- return mknod_helper(NV_MAJOR_DEVICE_NUMBER, minor, path, proc_path); ++ return mknod_helper(NV_MAJOR_DEVICE_NUMBER, minor, path, NV_PROC_REGISTRY_PATH); + } + + +@@ -633,7 +575,7 @@ int nvidia_mknod(int minor, int module_instance) + * device with the specified name. Returns the major number on success, + * or -1 on failure. + */ +-int get_chardev_major(const char *name) ++static int get_chardev_major(const char *name) + { + int ret = -1; + char line[NV_MAX_LINE_LENGTH]; +@@ -743,13 +685,9 @@ int nvidia_modeset_modprobe(void) + */ + int nvidia_modeset_mknod(void) + { +- char proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE]; +- +- assign_proc_registry_path(proc_path, NV_MODULE_INSTANCE_NONE); +- + return mknod_helper(NV_MAJOR_DEVICE_NUMBER, + NV_MODESET_MINOR_DEVICE_NUM, +- NV_MODESET_DEVICE_NAME, proc_path); ++ NV_MODESET_DEVICE_NAME, NV_PROC_REGISTRY_PATH); + } + + /* +@@ -770,25 +708,62 @@ int nvidia_nvlink_mknod(void) + NV_NVLINK_PROC_PERM_PATH); + } + ++/* ++ * Attempt to create the NVIDIA NVSwitch driver device files. ++ */ ++int nvidia_nvswitch_mknod(int minor) ++{ ++ int major = 0; ++ char name[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN]; ++ int ret; ++ ++ major = get_chardev_major(NV_NVSWITCH_MODULE_NAME); ++ ++ if (major < 0) ++ { ++ return 0; ++ } ++ ++ if (minor == NV_NVSWITCH_CTL_MINOR) ++ { ++ ret = snprintf(name, NV_MAX_CHARACTER_DEVICE_FILE_STRLEN, ++ NV_NVSWITCH_CTL_NAME); ++ } ++ else ++ { ++ ret = snprintf(name, NV_MAX_CHARACTER_DEVICE_FILE_STRLEN, ++ NV_NVSWITCH_DEVICE_NAME, minor); ++ } ++ ++ if (ret <= 0) ++ { ++ return 0; ++ } ++ ++ return mknod_helper(major, minor, name, NV_NVSWITCH_PROC_PERM_PATH); ++} ++ + int nvidia_vgpu_vfio_mknod(int minor_num) + { + int major = get_chardev_major(NV_VGPU_VFIO_MODULE_NAME); + char vgpu_dev_name[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN]; +- char proc_path[NV_MAX_PROC_REGISTRY_PATH_SIZE]; ++ int ret; + + if (major < 0) + { + return 0; + } + +- assign_proc_registry_path(proc_path, NV_MODULE_INSTANCE_NONE); +- +- snprintf(vgpu_dev_name, NV_MAX_CHARACTER_DEVICE_FILE_STRLEN, +- NV_VGPU_VFIO_DEVICE_NAME, minor_num); ++ ret = snprintf(vgpu_dev_name, NV_MAX_CHARACTER_DEVICE_FILE_STRLEN, ++ NV_VGPU_VFIO_DEVICE_NAME, minor_num); ++ if (ret <= 0) ++ { ++ return 0; ++ } + + vgpu_dev_name[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN - 1] = '\0'; + +- return mknod_helper(major, minor_num, vgpu_dev_name, proc_path); ++ return mknod_helper(major, minor_num, vgpu_dev_name, NV_PROC_REGISTRY_PATH); + } + +-#endif /* NV_LINUX */ +\ No newline at end of file ++#endif /* NV_LINUX */ +diff --git a/src/nvidia-modprobe-utils.h b/src/nvidia-modprobe-utils.h +index e06b4a4..5ab3355 100644 +--- a/src/nvidia-modprobe-utils.h ++++ b/src/nvidia-modprobe-utils.h +@@ -31,29 +31,17 @@ + #include + + #define NV_MAX_CHARACTER_DEVICE_FILE_STRLEN 128 +-#define NV_MODULE_INSTANCE_NONE -1 +-#define NV_MODULE_INSTANCE_ZERO 0 +-#define NV_MAX_MODULE_INSTANCES 8 + #define NV_CTL_DEVICE_NUM 255 + #define NV_MODESET_MINOR_DEVICE_NUM 254 +- +-#define NV_FRONTEND_CONTROL_DEVICE_MINOR_MAX NV_CTL_DEVICE_NUM ++#define NV_NVSWITCH_CTL_MINOR 255 + + #define NV_DEVICE_FILE_PATH "/dev/nvidia%d" + #define NV_CTRL_DEVICE_FILE_PATH "/dev/nvidiactl" + #define NV_MODESET_DEVICE_NAME "/dev/nvidia-modeset" + #define NV_VGPU_VFIO_DEVICE_NAME "/dev/nvidia-vgpu%d" + #define NV_NVLINK_DEVICE_NAME "/dev/nvidia-nvlink" +- +-#define NV_NMODULE_CTRL_DEVICE_FILE_PATH "/dev/nvidiactl%d" +- +-#define NV_FRONTEND_CONTROL_DEVICE_MINOR_MIN \ +- (NV_FRONTEND_CONTROL_DEVICE_MINOR_MAX - \ +- NV_MAX_MODULE_INSTANCES) +- +-#define NV_FRONTEND_IS_CONTROL_DEVICE(x) \ +- ((x <= NV_FRONTEND_CONTROL_DEVICE_MINOR_MAX) && \ +- (x > NV_FRONTEND_CONTROL_DEVICE_MINOR_MIN)) ++#define NV_NVSWITCH_CTL_NAME "/dev/nvidia-nvswitchctl" ++#define NV_NVSWITCH_DEVICE_NAME "/dev/nvidia-nvswitch%d" + + #if defined(NV_LINUX) + +@@ -76,31 +64,19 @@ static __inline__ int nvidia_test_file_state(int state, + return !!(state & (1 << value)); + } + +-int nvidia_get_file_state(int minor, int module_instance); +-int nvidia_modprobe(const int print_errors, int module_instance); +-int nvidia_mknod(int minor, int module_instance); ++int nvidia_get_file_state(int minor); ++int nvidia_modprobe(const int print_errors); ++int nvidia_mknod(int minor); + int nvidia_uvm_modprobe(void); + int nvidia_uvm_mknod(int base_minor); + int nvidia_modeset_modprobe(void); + int nvidia_modeset_mknod(void); + int nvidia_vgpu_vfio_mknod(int minor_num); + int nvidia_nvlink_mknod(void); +- +-int mknod_helper(int major, int minor, const char *path, const char *proc_path); +-int get_chardev_major(const char *name); ++int nvidia_nvswitch_mknod(int minor); + + #endif /* NV_LINUX */ + +-/* +- * Detect use of multiple kernel module instances. Use a single +- * module instance unless instance != NV_MODULE_INSTANCE_NONE +- */ +-static __inline__ int is_multi_module(int module_instance) +-{ +- return (module_instance != NV_MODULE_INSTANCE_NONE); +-} +- +- + /* + * Construct the device file name, based on 'minor'. If an error + * occurs, the nul terminator will be written to name[0]. +@@ -108,8 +84,7 @@ static __inline__ int is_multi_module(int module_instance) + static __inline__ void assign_device_file_name + ( + char name[NV_MAX_CHARACTER_DEVICE_FILE_STRLEN], +- int minor, +- int module_instance ++ int minor + ) + { + int ret; +@@ -119,20 +94,12 @@ static __inline__ void assign_device_file_name + goto fail; + } + +- if (!is_multi_module(module_instance) && minor == NV_CTL_DEVICE_NUM) ++ if (minor == NV_CTL_DEVICE_NUM) + { + ret = snprintf(name, + NV_MAX_CHARACTER_DEVICE_FILE_STRLEN, + NV_CTRL_DEVICE_FILE_PATH); + } +- else if (is_multi_module(module_instance) && +- NV_FRONTEND_IS_CONTROL_DEVICE(minor)) +- { +- ret = snprintf(name, +- NV_MAX_CHARACTER_DEVICE_FILE_STRLEN, +- NV_NMODULE_CTRL_DEVICE_FILE_PATH, +- module_instance); +- } + else + { + ret = snprintf(name, +@@ -154,4 +121,4 @@ fail: + name[0] = '\0'; + } + +-#endif /* __NVIDIA_MODPROBE_UTILS_H__ */ +\ No newline at end of file ++#endif /* __NVIDIA_MODPROBE_UTILS_H__ */ +-- +2.27.0 + diff --git a/package/libnvidia-container/Config.in b/package/libnvidia-container/Config.in new file mode 100644 index 00000000000..7a452c3635a --- /dev/null +++ b/package/libnvidia-container/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBNVIDIA_CONTAINER + bool "libnvidia-container" + depends on BR2_SHARED_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS # tirpc + depends on BR2_TOOLCHAIN_USES_GLIBC # fexecve + select BR2_PACKAGE_ELFUTILS + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_LIBTIRPC + select BR2_PACKAGE_NVIDIA_MODPROBE + help + The libnvidia-container package adds a library and CLI for + GPU-backed containers, agnostic to container runtime. + + https://github.com/NVIDIA/libnvidia-container + +comment "libnvidia-container needs a shared glibc toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAN_USES_GLIBC || \ + !BR2_SHARED_LIBS diff --git a/package/libnvidia-container/libnvidia-container.hash b/package/libnvidia-container/libnvidia-container.hash new file mode 100644 index 00000000000..d356eb2b1e4 --- /dev/null +++ b/package/libnvidia-container/libnvidia-container.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 fd447629fd65d171b68edb62fa2e581c67fdb450ff540f486987ab826150d06e libnvidia-container-1.2.0.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/package/libnvidia-container/libnvidia-container.mk b/package/libnvidia-container/libnvidia-container.mk new file mode 100644 index 00000000000..b040c0baaa2 --- /dev/null +++ b/package/libnvidia-container/libnvidia-container.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# libnvidia-container +# +################################################################################ + +LIBNVIDIA_CONTAINER_VERSION = 1.2.0 +LIBNVIDIA_CONTAINER_SITE = $(call github,NVIDIA,libnvidia-container,v$(LIBNVIDIA_CONTAINER_VERSION)) +LIBNVIDIA_CONTAINER_LICENSE = Apache-2.0 +LIBNVIDIA_CONTAINER_LICENSE_FILES = LICENSE + +LIBNVIDIA_CONTAINER_DEPENDENCIES = elfutils libcap libtirpc nvidia-modprobe \ + host-pkgconf host-elfutils host-libcap + +LIBNVIDIA_CONTAINER_MAKE_OPTS = \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \ + OBJCPY="$(TARGET_OBJCOPY)" \ + RPCGEN="$(HOST_DIR)/bin/rpcgen" \ + WITH_LIBELF=yes \ + WITH_TIRPC=no + +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) +LIBNVIDIA_CONTAINER_MAKE_OPTS += WITH_SECCOMP=yes +LIBNVIDIA_CONTAINER_DEPENDENCIES += libseccomp +else +LIBNVIDIA_CONTAINER_MAKE_OPTS += WITH_SECCOMP=no +endif + +define LIBNVIDIA_CONTAINER_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + $(TARGET_CONFIGURE_OPTS) \ + $(LIBNVIDIA_CONTAINER_MAKE_OPTS) \ + shared tools +endef + +define LIBNVIDIA_CONTAINER_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + $(TARGET_CONFIGURE_OPTS) \ + $(LIBNVIDIA_CONTAINER_MAKE_OPTS) \ + DESTDIR="$(TARGET_DIR)" \ + install +endef + +$(eval $(generic-package)) diff --git a/package/libraw/libraw.hash b/package/libraw/libraw.hash index 3337396f5fd..e8117cd1f1c 100644 --- a/package/libraw/libraw.hash +++ b/package/libraw/libraw.hash @@ -1,5 +1,5 @@ # Locally calculated -sha256 40a262d7cc71702711a0faec106118ee004f86c86cc228281d12d16da03e02f5 LibRaw-0.19.5.tar.gz -sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 LICENSE.LGPL -sha256 0e3098d2d54a12434715f6679ea408d57da5e8d613c385c58ecc6fe5d30cc81f LICENSE.CDDL -sha256 ed971b7f1f57fd8e7d28419ff7749cfe0f296e701687756e798a69555fd76646 README.md +sha256 1f0a383da2ce9f409087facd28261decbf6be72cc90c78cd003b0766e4d694a3 LibRaw-0.20.0.tar.gz +sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 LICENSE.LGPL +sha256 0e3098d2d54a12434715f6679ea408d57da5e8d613c385c58ecc6fe5d30cc81f LICENSE.CDDL +sha256 313415f7f48f6cd3cc78856626aab4bbe97dbb1e9a11db9c25396ca8d0e76cd9 README.md diff --git a/package/libraw/libraw.mk b/package/libraw/libraw.mk index 9a647f8d545..e33674e6f5e 100644 --- a/package/libraw/libraw.mk +++ b/package/libraw/libraw.mk @@ -4,15 +4,13 @@ # ################################################################################ -LIBRAW_VERSION = 0.19.5 +LIBRAW_VERSION = 0.20.0 LIBRAW_SOURCE = LibRaw-$(LIBRAW_VERSION).tar.gz LIBRAW_SITE = http://www.libraw.org/data LIBRAW_INSTALL_STAGING = YES LIBRAW_CONF_OPTS += \ --disable-examples \ - --disable-openmp \ - --disable-demosaic-pack-gpl2 \ - --disable-demosaic-pack-gpl3 + --disable-openmp LIBRAW_LICENSE = LGPL-2.1 or CDDL-1.0 LIBRAW_LICENSE_FILES = LICENSE.LGPL LICENSE.CDDL README.md LIBRAW_DEPENDENCIES = host-pkgconf @@ -43,4 +41,11 @@ else LIBRAW_CONF_OPTS += --disable-lcms endif +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBRAW_CONF_OPTS += --enable-zlib +LIBRAW_DEPENDENCIES += zlib +else +LIBRAW_CONF_OPTS += --disable-zlib +endif + $(eval $(autotools-package)) diff --git a/package/libssh/0001-libssh.h-bump-to-version-0.9.4.patch b/package/libssh/0001-libssh.h-bump-to-version-0.9.4.patch deleted file mode 100644 index d6ec50509e5..00000000000 --- a/package/libssh/0001-libssh.h-bump-to-version-0.9.4.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 8d8428cbbc2c00d078cfbc967e4e6fee7ff7bf0b Mon Sep 17 00:00:00 2001 -From: Heiko Thiery -Date: Wed, 15 Apr 2020 11:57:29 +0200 -Subject: [PATCH] libssh.h: bump to version 0.9.4 - -In the released version of libssh the version bump was not done -properly. Therefore the current release 0.9.4 reports 0.9.3. - -Signed-off-by: Heiko Thiery ---- - include/libssh/libssh.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h -index 79030131..e2a8d991 100644 ---- a/include/libssh/libssh.h -+++ b/include/libssh/libssh.h -@@ -79,7 +79,7 @@ - /* libssh version */ - #define LIBSSH_VERSION_MAJOR 0 - #define LIBSSH_VERSION_MINOR 9 --#define LIBSSH_VERSION_MICRO 3 -+#define LIBSSH_VERSION_MICRO 4 - - #define LIBSSH_VERSION_INT SSH_VERSION_INT(LIBSSH_VERSION_MAJOR, \ - LIBSSH_VERSION_MINOR, \ --- -2.20.1 - diff --git a/package/libssh/0002-channels-Avoid-returning-SSH_AGAIN-from-ssh_channel_.patch b/package/libssh/0002-channels-Avoid-returning-SSH_AGAIN-from-ssh_channel_.patch deleted file mode 100644 index 9cc93894799..00000000000 --- a/package/libssh/0002-channels-Avoid-returning-SSH_AGAIN-from-ssh_channel_.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 6417f5a3cac8537ac6f6ff7fc1642dfaa0917fb4 Mon Sep 17 00:00:00 2001 -From: Jakub Jelen -Date: Thu, 16 Apr 2020 11:13:34 +0200 -Subject: [PATCH] channels: Avoid returning SSH_AGAIN from - ssh_channel_poll_timeout() - -This addresses a regression introduced in 3bad0607, partially fixed in 022409e9, -but the function was still able to return SSH_AGAIN, which was not expected by -callers. - -Based on discussion in [1] and [2] - -[1] https://gitlab.com/libssh/libssh-mirror/-/merge_requests/101 -[2] https://www.libssh.org/archive/libssh/2020-03/0000029.html - -Signed-off-by: Jakub Jelen -Reviewed-by: Anderson Toshiyuki Sasaki - -[Backport from upstream commit: -6417f5a3cac8537ac6f6ff7fc1642dfaa0917fb4] -Signed-off-by: Heiko Thiery ---- - src/channels.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/channels.c b/src/channels.c -index bcc1c207..9fe309d0 100644 ---- a/src/channels.c -+++ b/src/channels.c -@@ -3116,6 +3116,12 @@ int ssh_channel_poll_timeout(ssh_channel channel, int timeout, int is_stderr) - session->session_state == SSH_SESSION_STATE_ERROR) { - rc = SSH_ERROR; - goto out; -+ } else if (rc == SSH_AGAIN) { -+ /* If the above timeout expired, it is ok and we do not need to -+ * attempt to check the read buffer. The calling functions do not -+ * expect us to return SSH_AGAIN either here. */ -+ rc = SSH_OK; -+ goto out; - } - len = ssh_buffer_get_len(stdbuf); - if (len > 0) { --- -2.20.1 - diff --git a/package/libssh/libssh.hash b/package/libssh/libssh.hash index 62b860300ae..bc6fa3f1f87 100644 --- a/package/libssh/libssh.hash +++ b/package/libssh/libssh.hash @@ -1,5 +1,5 @@ # Locally calculated after checking pgp signature -# https://www.libssh.org/files/0.9/libssh-0.9.3.tar.xz.asc +# https://www.libssh.org/files/0.9/libssh-0.9.5.tar.xz.asc # with key 8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D -sha256 150897a569852ac05aac831dc417a7ba8e610c86ca2e0154a99c6ade2486226b libssh-0.9.4.tar.xz +sha256 acffef2da98e761fc1fd9c4fddde0f3af60ab44c4f5af05cd1b2d60a3fa08718 libssh-0.9.5.tar.xz sha256 1656186e951db1c010a8485481fa94587f7e53a26d24976bef97945ad0c4df5a COPYING diff --git a/package/libssh/libssh.mk b/package/libssh/libssh.mk index abc9aec9a3c..67e3ad9f91f 100644 --- a/package/libssh/libssh.mk +++ b/package/libssh/libssh.mk @@ -5,7 +5,7 @@ ################################################################################ LIBSSH_VERSION_MAJOR = 0.9 -LIBSSH_VERSION = $(LIBSSH_VERSION_MAJOR).4 +LIBSSH_VERSION = $(LIBSSH_VERSION_MAJOR).5 LIBSSH_SOURCE = libssh-$(LIBSSH_VERSION).tar.xz LIBSSH_SITE = https://www.libssh.org/files/$(LIBSSH_VERSION_MAJOR) LIBSSH_LICENSE = LGPL-2.1 diff --git a/package/libxml-parser-perl/libxml-parser-perl.mk b/package/libxml-parser-perl/libxml-parser-perl.mk index fcde5fc9390..37cef2e4182 100644 --- a/package/libxml-parser-perl/libxml-parser-perl.mk +++ b/package/libxml-parser-perl/libxml-parser-perl.mk @@ -12,9 +12,14 @@ LIBXML_PARSER_PERL_LICENSE = Artistic or GPL-1.0+ LIBXML_PARSER_PERL_LICENSE_FILES = README LIBXML_PARSER_PERL_RUN_PERL = `which perl` +HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS = \ + $(HOST_CONFIGURE_OPTS) \ + LD="$(HOSTCC)" + define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS (cd $(@D) ; \ - $(HOST_CONFIGURE_OPTS) $(LIBXML_PARSER_PERL_RUN_PERL) Makefile.PL \ + $(HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS) \ + $(LIBXML_PARSER_PERL_RUN_PERL) Makefile.PL \ PREFIX=$(HOST_DIR) \ EXPATLIBPATH=$(HOST_DIR)/lib \ EXPATINCPATH=$(HOST_DIR)/include \ @@ -25,7 +30,7 @@ define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS endef define HOST_LIBXML_PARSER_PERL_BUILD_CMDS - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) + $(HOST_MAKE_ENV) $(MAKE) $(HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS) -C $(@D) endef define HOST_LIBXML_PARSER_PERL_INSTALL_CMDS diff --git a/package/libxml2/0003-Fix-out-of-bounds-read-with-xmllint--htmlout.patch b/package/libxml2/0003-Fix-out-of-bounds-read-with-xmllint--htmlout.patch new file mode 100644 index 00000000000..460f2a3ae6a --- /dev/null +++ b/package/libxml2/0003-Fix-out-of-bounds-read-with-xmllint--htmlout.patch @@ -0,0 +1,40 @@ +From 50f06b3efb638efb0abd95dc62dca05ae67882c2 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Fri, 7 Aug 2020 21:54:27 +0200 +Subject: [PATCH] Fix out-of-bounds read with 'xmllint --htmlout' + +Make sure that truncated UTF-8 sequences don't cause an out-of-bounds +array access. + +Thanks to @SuhwanSong and the Agency for Defense Development (ADD) for +the report. + +Fixes #178. + +[Retrieved from: +https://gitlab.gnome.org/GNOME/libxml2/-/commit/50f06b3efb638efb0abd95dc62dca05ae67882c2] +Signed-off-by: Fabrice Fontaine +--- + xmllint.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/xmllint.c b/xmllint.c +index f6a8e4636..c647486f3 100644 +--- a/xmllint.c ++++ b/xmllint.c +@@ -528,6 +528,12 @@ static void + xmlHTMLEncodeSend(void) { + char *result; + ++ /* ++ * xmlEncodeEntitiesReentrant assumes valid UTF-8, but the buffer might ++ * end with a truncated UTF-8 sequence. This is a hack to at least avoid ++ * an out-of-bounds read. ++ */ ++ memset(&buffer[sizeof(buffer)-4], 0, 4); + result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer); + if (result) { + xmlGenericError(xmlGenericErrorContext, "%s", result); +-- +GitLab + diff --git a/package/libxml2/libxml2.mk b/package/libxml2/libxml2.mk index acbdfb77286..e9379b05ae7 100644 --- a/package/libxml2/libxml2.mk +++ b/package/libxml2/libxml2.mk @@ -13,6 +13,8 @@ LIBXML2_LICENSE_FILES = COPYING LIBXML2_IGNORE_CVES += CVE-2020-7595 # 0002-Fix-memory-leak-in-xmlSchemaValidateStream.patch LIBXML2_IGNORE_CVES += CVE-2019-20388 +# 0003-Fix-out-of-bounds-read-with-xmllint--htmlout.patch +LIBXML2_IGNORE_CVES += CVE-2020-24977 LIBXML2_CONFIG_SCRIPTS = xml2-config # relocation truncated to fit: R_68K_GOT16O diff --git a/package/libzip/0002-Include-limits.h-for-INT_MAX.patch b/package/libzip/0002-Include-limits.h-for-INT_MAX.patch new file mode 100644 index 00000000000..c488f052898 --- /dev/null +++ b/package/libzip/0002-Include-limits.h-for-INT_MAX.patch @@ -0,0 +1,27 @@ +From fd89e242d16128dedef08f47d99ae56aa19b0591 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=98rjan=20Malde?= +Date: Wed, 15 Jul 2020 12:16:16 +0200 +Subject: [PATCH] Include limits.h for INT_MAX + +[Retrieved from: +https://github.com/nih-at/libzip/commit/fd89e242d16128dedef08f47d99ae56aa19b0591] +Signed-off-by: Paul Cercueil +--- + lib/zip_crypto_openssl.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/zip_crypto_openssl.c b/lib/zip_crypto_openssl.c +index 1cb00479..60f92758 100644 +--- a/lib/zip_crypto_openssl.c ++++ b/lib/zip_crypto_openssl.c +@@ -38,6 +38,7 @@ + #include "zip_crypto.h" + + #include ++#include + + #if OPENSSL_VERSION_NUMBER < 0x1010000fL || defined(LIBRESSL_VERSION_NUMBER) + #define USE_OPENSSL_1_0_API +-- +2.28.0 + diff --git a/package/linux-firmware/Config.in b/package/linux-firmware/Config.in index eba58014b62..8d7d7bd38df 100644 --- a/package/linux-firmware/Config.in +++ b/package/linux-firmware/Config.in @@ -29,6 +29,11 @@ config BR2_PACKAGE_LINUX_FIRMWARE_I915 help Firmware files for the Intel i915 video cards. +config BR2_PACKAGE_LINUX_FIRMWARE_NVIDIA + bool "Nvidia video card firmware" + help + Firmware files for the Nvidia video cards. + config BR2_PACKAGE_LINUX_FIRMWARE_RADEON bool "AMD Radeon video card firmware" help @@ -44,6 +49,11 @@ config BR2_PACKAGE_LINUX_FIRMWARE_QCOM_ADRENO help Firmware files for Qualcomm Adreno GPU firmware +config BR2_PACKAGE_LINUX_FIRMWARE_S5P_MFC + bool "Samsung S5P MFC" + help + Firmware files for Samsung S5P-MFC. + endmenu # Video menu "Bluetooth firmware" @@ -128,6 +138,12 @@ config BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX help Firmware files for the Broadcom bcm43xxx, SoftMAC and FullMAC. +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_22260 + bool "Intel iwlwifi 22260" + help + Firmware files for the Intel Wifi 22260 devices supported by + the iwlwifi kernel driver. + config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160 bool "Intel iwlwifi 3160" help diff --git a/package/linux-firmware/linux-firmware.hash b/package/linux-firmware/linux-firmware.hash index 2ebd11365f6..19e03b55b2f 100644 --- a/package/linux-firmware/linux-firmware.hash +++ b/package/linux-firmware/linux-firmware.hash @@ -1,5 +1,5 @@ # Locally calculated -sha256 83646c58fc4e3ee9a73f4fa74213c849109f48c719322346393f3e5b0fa55044 linux-firmware-20200122.tar.gz +sha256 3cbb7f363dc63686b1c6e325ed679f6faa4715f17fa06be11b705456e1d5dcb9 linux-firmware-20200918.tar.gz sha256 8116433f4004fc0c24d72b3d9e497808b724aa0e5e1cd63fc1bf66b715b1e2e9 LICENCE.Abilis sha256 8d5847d2971241d4d6a51c16e206379de53a6d4e203fa6f8e1c1e9279c7c4ad0 LICENSE.amdgpu sha256 2d6062d63b91eb750bf741498691604f75184b9fee97608ec537cd09bd6a42b4 LICENCE.Marvell @@ -30,6 +30,6 @@ sha256 8542aeabf2761935122d693561e16766ce1bcc2b0d003204f9040b7d6d929f2e LICENSE. sha256 be904cd28cb292b80cdb6cf412ab0d9159d431671e987ad433c1f62e0988a9bc LICENSE.qcom sha256 fc6223d4bfe9f2f9e2eddc44b9fe5721d0caf49f01cb08d602906add686d8c6f LICENSE.radeon sha256 2bdd2e716f05d9737d3f9a20f9a3a3c0caee0e866100ddb0673f1178e42f92b9 LICENSE.sdma_firmware -sha256 74d203d2fd433b73b63e8e31d8928e3817f6eaf3407c9e607802c20a5c02e6c4 WHENCE +sha256 542bfe0285c0435e5759e974b38846dd025e5eba8b3795dfa05dacb71d411213 WHENCE sha256 fa43e1b9a13b341a07adca9dbe73d0f9072d7966fdfe811c01f0dd2872d7309a qcom/NOTICE.txt sha256 bef9c828e84f21e7835b4de7daf954a327e1ff777871b58e116039b684c0d604 LICENCE.e100 diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk index cbad8d592a0..800681314c0 100644 --- a/package/linux-firmware/linux-firmware.mk +++ b/package/linux-firmware/linux-firmware.mk @@ -4,9 +4,10 @@ # ################################################################################ -LINUX_FIRMWARE_VERSION = 20200122 -LINUX_FIRMWARE_SITE = http://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git -LINUX_FIRMWARE_SITE_METHOD = git +LINUX_FIRMWARE_VERSION = 20200918 +LINUX_FIRMWARE_SITE = https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot +# LINUX_FIRMWARE_SITE = http://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git +# LINUX_FIRMWARE_SITE_METHOD = git # Intel SST DSP ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_INTEL_SST_DSP),y) @@ -24,6 +25,11 @@ LINUX_FIRMWARE_DIRS += i915 LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENSE.i915 endif +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_NVIDIA),y) +LINUX_FIRMWARE_DIRS += nvidia +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.nvidia +endif + ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_RADEON),y) LINUX_FIRMWARE_DIRS += radeon LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENSE.radeon @@ -45,6 +51,13 @@ LINUX_FIRMWARE_FILES += intel/ibt-* LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ibt_firmware endif +# Samsung +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_S5P_MFC),y) +LINUX_FIRMWARE_FILES += s5p-mfc* +# TODO: license file for s5p-mfc firmware ? +# LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.samsung_firmware +endif + # Qualcomm Atheros Rome 6174A Bluetooth ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_QUALCOMM_6174A_BT),y) LINUX_FIRMWARE_FILES += qca/rampatch_usb_00000302.bin qca/nvm_usb_00000302.bin @@ -371,6 +384,11 @@ LINUX_FIRMWARE_FILES += wil6210.* LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENSE.QualcommAtheros_ath10k endif +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_22260),y) +LINUX_FIRMWARE_FILES += iwlwifi-cc-a0-*.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160),y) LINUX_FIRMWARE_FILES += iwlwifi-3160-*.ucode LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host index a04866d8cb7..68334ed8c84 100644 --- a/package/linux-headers/Config.in.host +++ b/package/linux-headers/Config.in.host @@ -53,11 +53,11 @@ config BR2_KERNEL_HEADERS_4_19 config BR2_KERNEL_HEADERS_5_4 bool "Linux 5.4.x kernel headers" select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 - select BR2_KERNEL_HEADERS_LATEST config BR2_KERNEL_HEADERS_5_7 bool "Linux 5.7.x kernel headers" select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7 + select BR2_KERNEL_HEADERS_LATEST config BR2_KERNEL_HEADERS_VERSION bool "Manually specified Linux version" @@ -334,11 +334,11 @@ endchoice config BR2_DEFAULT_KERNEL_HEADERS string - default "4.4.234" if BR2_KERNEL_HEADERS_4_4 - default "4.9.234" if BR2_KERNEL_HEADERS_4_9 - default "4.14.195" if BR2_KERNEL_HEADERS_4_14 - default "4.19.142" if BR2_KERNEL_HEADERS_4_19 - default "5.4.61" if BR2_KERNEL_HEADERS_5_4 + default "4.4.238" if BR2_KERNEL_HEADERS_4_4 + default "4.9.238" if BR2_KERNEL_HEADERS_4_9 + default "4.14.200" if BR2_KERNEL_HEADERS_4_14 + default "4.19.150" if BR2_KERNEL_HEADERS_4_19 + default "5.4.70" if BR2_KERNEL_HEADERS_5_4 default "5.7.19" if BR2_KERNEL_HEADERS_5_7 default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION default "custom" if BR2_KERNEL_HEADERS_CUSTOM_TARBALL diff --git a/package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch b/package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch new file mode 100644 index 00000000000..4ace27bddc3 --- /dev/null +++ b/package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch @@ -0,0 +1,58 @@ +From fbd0d35995a23351d4b50ed0b814442a6873ded2 Mon Sep 17 00:00:00 2001 +From: Christian Stewart +Date: Fri, 17 Jul 2020 13:58:43 -0700 +Subject: [PATCH] Adjust flash.sh for flashing Buildroot-produced disk image + +Signed-off-by: Christian Stewart +--- + flash.sh | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/flash.sh b/flash.sh +index 38c0cbb..c27b41b 100755 +--- a/flash.sh ++++ b/flash.sh +@@ -1339,9 +1339,10 @@ elif [ "${target_rootdev}" == "internal" ] || \ + usage allunknown 1; + fi + +- cmdline+="root=PARTUUID=${rootfsuuid} rw rootwait rootfstype=ext4 " ++ # cmdline+="root=PARTUUID=${rootfsuuid} rw rootwait rootfstype=ext4 " ++ cmdline+="root=/dev/${target_rootdev} rw rootwait" + else +- cmdline+="root=/dev/${target_rootdev} rw rootwait rootfstype=ext4 " ++ cmdline+="root=/dev/${target_rootdev} rw rootwait" + fi; + + if [ "${CMDLINE_ADD}" != "" ]; then +@@ -1512,11 +1513,7 @@ if [ "${write_image_name}" != "" ]; then + fi + fi + +-if [ "${INITRD_IN_BOOTIMG}" = "yes" ]; then +- ramdisk=initrd; +-else +- ramdisk="/dev/null" +-fi ++ramdisk="/dev/null" + echo -n "Making Boot image... "; + MKBOOTARG+="--kernel ${kernel_image} "; + MKBOOTARG+="--ramdisk ${ramdisk} "; +@@ -1977,8 +1974,12 @@ if [ "${reuse_systemimg}" = "true" ] || [ "${skip_systemimg}" = "true" ]; then + elif [ "${rootdev_type}" = "internal" ]; then + APP_TAG+="-e s/APPFILE/${localsysfile}/ "; + if [ "${target_partname}" = "" -o "${target_partname}" = "APP" ]; then +- build_fsimg "$localsysfile" "$fillpat" \ +- "$rootfssize" "$rootfs_type" "$rootfs_dir" "$cmdline"; ++ echo "Skipping image build and setting target_partfile to INITRD." ++ # target_partfile=${INITRD} ++ # cp ${INITRD} ./system.img ++ ln -fs ${INITRD} ./system.img ++ #build_fsimg "$localsysfile" "$fillpat" \ ++ # "$rootfssize" "$rootfs_type" "$rootfs_dir" "$cmdline"; + fi; + elif [ "${rootdev_type}" = "network" -o "${rootdev_type}" = "external" ]; then + APP_TAG+="-e s/APPFILE/${localsysfile}/ "; +-- +2.27.0 + diff --git a/package/linux4tegra/Config.in b/package/linux4tegra/Config.in new file mode 100644 index 00000000000..71f29494dc6 --- /dev/null +++ b/package/linux4tegra/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_LINUX4TEGRA + bool "linux4tegra" + help + NVIDIA Linux4Tegra utilities and binaries. + + https://developer.nvidia.com/embedded/linux-tegra-archive + +if BR2_PACKAGE_LINUX4TEGRA + +choice + prompt "Platform" + default BR2_PACKAGE_LINUX4TEGRA_PLATFORM_T186REF + help + Select the platform variant for linux4tegra. + +config BR2_PACKAGE_LINUX4TEGRA_PLATFORM_T186REF + bool "t186ref" + help + Jetson AGX Xavier, Xavier NX, or TX2 + +config BR2_PACKAGE_LINUX4TEGRA_PLATFORM_T210REF + bool "t210ref" + help + Jetson Nano or Jetson TX1 + +endchoice + +endif # if BR2_PACKAGE_LINUX4TEGRA diff --git a/package/linux4tegra/linux4tegra.hash b/package/linux4tegra/linux4tegra.hash new file mode 100644 index 00000000000..5e5f9b02c8b --- /dev/null +++ b/package/linux4tegra/linux4tegra.hash @@ -0,0 +1,55 @@ +# locally computed +sha256 9a2d13b1f4b67fef97a428d54724b23e84e14636eedfa22f338c2d1ea62558e2 Tegra186_Linux_R32.4.3_aarch64.tbz2 +sha256 0c8590218be814eeec2a6f8b4fd01271893e4881ef2c66d130792c1d62737642 Tegra210_Linux_R32.4.3_aarch64.tbz2 +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526 bootloader/LICENSE +sha256 496f3bc5456694cce764d28a93565bb0d0967dbd95256759e4168a9587406949 bootloader/LICENSE.adsp +sha256 d4885fa44934935d6a178c84a16aec49dae1bd4f41f14bbbd781bafcf704885f bootloader/LICENSE.bpmp +sha256 fd4513e2857a0d91c521dfbb924733563b55d5a2d42d4fb688d2506ed34df0c4 bootloader/LICENSE.bpmp_t194 +sha256 205a391eb9cfc69854cc0c3082de204d30124607cedecbdd3f47420b5f37f302 bootloader/LICENSE.camera-rtcpu +sha256 3cc8cfbf77eb7f086d9b6f68de92251ebbcf13fd7a20fec2749cab30348bf9b1 bootloader/LICENSE.cboot +sha256 3cc8cfbf77eb7f086d9b6f68de92251ebbcf13fd7a20fec2749cab30348bf9b1 bootloader/LICENSE.cboot_t194 +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526 bootloader/LICENSE.chkbdinfo +sha256 7bf7d9fae6472452d585ec38dd684daa86dc83638984d1cb14ee35239a868543 bootloader/LICENSE.mce_c10_prod_cr +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526 bootloader/LICENSE.mkbctpart +sha256 9b0ccf575cfd9febc97b8f9967216f06341db2d44abc69df92c3127cc1a2608f bootloader/LICENSE.mkbootimg +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526 bootloader/LICENSE.mkgpt +sha256 cddaa9d5583a7705cd4734a6af4b421bca9016ba6af854c51efbfcbe19a4a893 bootloader/LICENSE.nv_smd_generator +sha256 7b699cea50c65de6679ea0617e8276cf24a523d6068e2502e637fadf9bc49713 bootloader/LICENSE.spe.bin +sha256 7b699cea50c65de6679ea0617e8276cf24a523d6068e2502e637fadf9bc49713 bootloader/LICENSE.spe_t194.bin +sha256 0ef77b4d7ffb0195540e394863dd969594ba8e21cb4b810822b4d42c1ab8ef72 bootloader/LICENSE.tos-mon-only.img.arm-trusted-firmware +sha256 0ef77b4d7ffb0195540e394863dd969594ba8e21cb4b810822b4d42c1ab8ef72 bootloader/LICENSE.tos-trusty.img.arm-trusted-firmware +sha256 5a316570e2f1d43b09e51432e613c408b240d0ea0ce30134a7de16c25b832130 bootloader/LICENSE.tos-trusty.img.trusty +sha256 0ef77b4d7ffb0195540e394863dd969594ba8e21cb4b810822b4d42c1ab8ef72 bootloader/LICENSE.tos-trusty_t194.img.arm-trusted-firmware +sha256 5a316570e2f1d43b09e51432e613c408b240d0ea0ce30134a7de16c25b832130 bootloader/LICENSE.tos-trusty_t194.img.trusty +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526 nv_tegra/LICENSE +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526 nv_tegra/LICENSE +sha256 a85e1af5d521f0d68aa08806292076bb9bda8a31a496f17063fafab121053e4d nv_tegra/LICENSE.brcm_patchram_plus +sha256 88e408dec7796e0440b0bf5131f88f0d97bc4014fc389562ec0d5cc7ed1c45ad nv_tegra/LICENSE.l4t-usb-device-mode-filesystem.img +sha256 1467d3bd35f6ad87ffb24c0e665c2d028dda6e943dff66b347f0051370dcf88d nv_tegra/LICENSE.libnvargus +sha256 7ea9279fe435e009307da026ea72a1f47ecbdeef3a6a7f6bb04a2dec7bbdfcd5 nv_tegra/LICENSE.libnvcam_imageencoder +sha256 c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245 nv_tegra/LICENSE.libnveventlib +sha256 1f1bf0c752f072a447b1013fc9d76268ddf098c37ddc63988d60e4973cbee2f4 nv_tegra/LICENSE.libnvscf +sha256 c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245 nv_tegra/LICENSE.libnvtracebuf +sha256 b4e0f72b067cd11afa0875d20144423a80b7293e4309cca43190cf8c1d4ba200 nv_tegra/LICENSE.libtegrav4l2 +sha256 8610954adbca6c6b85d8b1ae5613b44b0014e437d32fcad6683bb27541411686 nv_tegra/LICENSE.minigbm +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 nv_tegra/LICENSE.nvbootctrl +sha256 fa776c507a543cc43d9d66407cfe5d685f35207fd9631e7fd77ee4f42ef92be6 nv_tegra/LICENSE.nvdla +sha256 8b6a8553e4a1668a6267b9789bd69ffe105bffd8f2af59e2fc74a5910bb159ab nv_tegra/LICENSE.weston +sha256 a34730970264d619f352598bf30295ad505a60fc3a493add8aa851645ce3ea47 nv_tegra/LICENSE.weston-data +sha256 88e408dec7796e0440b0bf5131f88f0d97bc4014fc389562ec0d5cc7ed1c45ad nv_tegra/nvidia_configs/opt/nvidia/l4t-usb-device-mode/LICENSE.filesystem.img +sha256 a85e1af5d521f0d68aa08806292076bb9bda8a31a496f17063fafab121053e4d nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.brcm_patchram_plus +sha256 89786bfd7060f6a60feae03257da6f3206b0f777352cf750c67b3b560dd087a5 nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.cypress_wifibt +sha256 1467d3bd35f6ad87ffb24c0e665c2d028dda6e943dff66b347f0051370dcf88d nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvargus +sha256 7ea9279fe435e009307da026ea72a1f47ecbdeef3a6a7f6bb04a2dec7bbdfcd5 nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvcam_imageencoder +sha256 c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245 nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnveventlib +sha256 c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245 nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvtracebuf +sha256 dee27dbeddf4f7d093df765624022e72fb28c818d60fa3fd9d1dd77b392e4d31 nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4l2 +sha256 dee27dbeddf4f7d093df765624022e72fb28c818d60fa3fd9d1dd77b392e4d31 nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4lconvert +sha256 b4e0f72b067cd11afa0875d20144423a80b7293e4309cca43190cf8c1d4ba200 nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libtegrav4l2 +sha256 fbef9c34b63148c0e670e6ac07705b25bebcc1f963b48bf7447ee61cfaadcc1e nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libvulkan1 +sha256 8610954adbca6c6b85d8b1ae5613b44b0014e437d32fcad6683bb27541411686 nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.minigbm +sha256 fa776c507a543cc43d9d66407cfe5d685f35207fd9631e7fd77ee4f42ef92be6 nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.nvdla +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526 nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.realtek_8822ce_wifibt +sha256 f3f3ecff94537e7d5944fdbae7c6bd02d5eddca8fe1c29d8699ff2e54d26cebc nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.tegra_sensors +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.nvbootctrl +sha256 5f28c11f8b1b3f97b9d42c74b85371ebf4127f241b799279bcecd69f7ee542dc nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.tipc_test diff --git a/package/linux4tegra/linux4tegra.mk b/package/linux4tegra/linux4tegra.mk new file mode 100644 index 00000000000..6b080d63253 --- /dev/null +++ b/package/linux4tegra/linux4tegra.mk @@ -0,0 +1,120 @@ +################################################################################ +# +# linux4tegra +# +################################################################################ + +LINUX4TEGRA_VERSION = 32.4.3 + +ifeq ($(BR2_PACKAGE_LINUX4TEGRA_PLATFORM_T186REF),y) +LINUX4TEGRA_SITE = https://developer.nvidia.com/embedded/L4T/r32_Release_v4.3/t186ref_release_aarch64 +LINUX4TEGRA_SOURCE = Tegra186_Linux_R$(LINUX4TEGRA_VERSION)_aarch64.tbz2 +else # ifeq ($(BR2_PACKAGE_LINUX4TEGRA_PLATFORM_T210REF),y) +LINUX4TEGRA_SITE = https://developer.nvidia.com/embedded/L4T/r32_Release_v4.3/t210ref_release_aarch64 +LINUX4TEGRA_SOURCE = Tegra210_Linux_R$(LINUX4TEGRA_VERSION)_aarch64.tbz2 +endif + +LINUX4TEGRA_LICENSE = NVIDIA Software License, GPL-2.0, LGPL, Apache-2.0, MIT +LINUX4TEGRA_LICENSE_FILES = \ + bootloader/LICENSE \ + bootloader/LICENSE.adsp \ + bootloader/LICENSE.bpmp \ + bootloader/LICENSE.bpmp_t194 \ + bootloader/LICENSE.camera-rtcpu \ + bootloader/LICENSE.cboot \ + bootloader/LICENSE.cboot_t194 \ + bootloader/LICENSE.chkbdinfo \ + bootloader/LICENSE.mce_c10_prod_cr \ + bootloader/LICENSE.mkbctpart \ + bootloader/LICENSE.mkbootimg \ + bootloader/LICENSE.mkgpt \ + bootloader/LICENSE.nv_smd_generator \ + bootloader/LICENSE.spe.bin \ + bootloader/LICENSE.spe_t194.bin \ + bootloader/LICENSE.tos-mon-only.img.arm-trusted-firmware \ + bootloader/LICENSE.tos-trusty.img.arm-trusted-firmware \ + bootloader/LICENSE.tos-trusty.img.trusty \ + bootloader/LICENSE.tos-trusty_t194.img.arm-trusted-firmware \ + bootloader/LICENSE.tos-trusty_t194.img.trusty \ + nv_tegra/LICENSE \ + nv_tegra/LICENSE \ + nv_tegra/LICENSE.brcm_patchram_plus \ + nv_tegra/LICENSE.l4t-usb-device-mode-filesystem.img \ + nv_tegra/LICENSE.libnvargus \ + nv_tegra/LICENSE.libnvcam_imageencoder \ + nv_tegra/LICENSE.libnveventlib \ + nv_tegra/LICENSE.libnvscf \ + nv_tegra/LICENSE.libnvtracebuf \ + nv_tegra/LICENSE.libtegrav4l2 \ + nv_tegra/LICENSE.minigbm \ + nv_tegra/LICENSE.nvbootctrl \ + nv_tegra/LICENSE.nvdla \ + nv_tegra/LICENSE.weston \ + nv_tegra/LICENSE.weston-data \ + nv_tegra/nvidia_configs/opt/nvidia/l4t-usb-device-mode/LICENSE.filesystem.img \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.brcm_patchram_plus \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.cypress_wifibt \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvargus \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvcam_imageencoder \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnveventlib \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvtracebuf \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4l2 \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4lconvert \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libtegrav4l2 \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libvulkan1 \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.minigbm \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.nvdla \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.realtek_8822ce_wifibt \ + nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.tegra_sensors \ + nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.nvbootctrl \ + nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.tipc_test + +LINUX4TEGRA_INSTALL_IMAGES = YES + +define LINUX4TEGRA_EXTRACT_NVIDIA_DRIVERS + @mkdir -p $(@D)/nv_tegra/nvidia_drivers + $(call suitable-extractor,nvidia_drivers.tbz2) \ + $(@D)/nv_tegra/nvidia_drivers.tbz2 | \ + $(TAR) -C $(@D)/nv_tegra/nvidia_drivers $(TAR_OPTIONS) - +endef + +LINUX4TEGRA_POST_EXTRACT_HOOKS += LINUX4TEGRA_EXTRACT_NVIDIA_DRIVERS + +define LINUX4TEGRA_EXTRACT_NVIDIA_CONFIGS + @mkdir -p $(@D)/nv_tegra/nvidia_configs + $(call suitable-extractor,config.tbz2) \ + $(@D)/nv_tegra/config.tbz2 | \ + $(TAR) -C $(@D)/nv_tegra/nvidia_configs $(TAR_OPTIONS) - +endef + +LINUX4TEGRA_POST_EXTRACT_HOOKS += LINUX4TEGRA_EXTRACT_NVIDIA_CONFIGS + +define LINUX4TEGRA_EXTRACT_NVIDIA_TOOLS + @mkdir -p $(@D)/nv_tegra/nvidia_tools + $(call suitable-extractor,nv_tools.tbz2) \ + $(@D)/nv_tegra/nv_tools.tbz2 | \ + $(TAR) -C $(@D)/nv_tegra/nvidia_tools $(TAR_OPTIONS) - +endef + +LINUX4TEGRA_POST_EXTRACT_HOOKS += LINUX4TEGRA_EXTRACT_NVIDIA_TOOLS + +# symlink linux4tegra to the target dir. +define LINUX4TEGRA_INSTALL_IMAGES_CMDS + ln -fs $(@D) $(BINARIES_DIR)/linux4tegra +endef + +LINUX4TEGRA_RSYNC = \ + rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \ + --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \ + --keep-dirlinks --exclude=ld.so.conf.d + +define LINUX4TEGRA_INSTALL_TARGET_CMDS + # install nvidia_drivers + $(LINUX4TEGRA_RSYNC) $(@D)/nv_tegra/nvidia_drivers/ $(TARGET_DIR)/ + # install nvidia_configs + $(LINUX4TEGRA_RSYNC) $(@D)/nv_tegra/nvidia_configs/ $(TARGET_DIR)/ + # install nvidia_tools + $(LINUX4TEGRA_RSYNC) $(@D)/nv_tegra/nvidia_tools/ $(TARGET_DIR)/ +endef + +$(eval $(generic-package)) diff --git a/package/live555/live555.hash b/package/live555/live555.hash index 52ca0682888..5e65cacd7b8 100644 --- a/package/live555/live555.hash +++ b/package/live555/live555.hash @@ -1,5 +1,5 @@ # From http://www.live555.com/liveMedia/public/live555-latest-md5.txt -md5 327bc53f60361c6d703d52e86f476f11 live.2020.06.25.tar.gz +md5 4645d2a0c865505c85b48af5317bcb4a live.2020.08.19.tar.gz # Locally generated -sha256 f206309f10d281990889b7a0c92c26a7fa55ac0e8568bf594b9b27433b4db585 live.2020.06.25.tar.gz +sha256 af3af7f2510b0b45f38892c232abca2cee2ab36a62503e7085b47ed2c3c2c537 live.2020.08.19.tar.gz sha256 da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768 COPYING.LESSER diff --git a/package/live555/live555.mk b/package/live555/live555.mk index e7be6024c92..62181269548 100644 --- a/package/live555/live555.mk +++ b/package/live555/live555.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIVE555_VERSION = 2020.06.25 +LIVE555_VERSION = 2020.08.19 LIVE555_SOURCE = live.$(LIVE555_VERSION).tar.gz LIVE555_SITE = http://www.live555.com/liveMedia/public # There is a COPYING file with the GPL-3.0 license text, but none of @@ -27,8 +27,12 @@ LIVE555_CFLAGS += -fPIC endif ifeq ($(BR2_PACKAGE_OPENSSL),y) -LIVE555_DEPENDENCIES += openssl -LIVE555_LIBS = -lssl -lcrypto +LIVE555_DEPENDENCIES += host-pkgconf openssl +LIVE555_CONSOLE_LIBS = `$(PKG_CONFIG_HOST_BINARY) --libs openssl` +# passed to ar for static linking, which gets confused by -L +ifneq ($(BR2_STATIC_LIBS),y) +LIVE555_LIVEMEDIA_LIBS = $(LIVE555_CONSOLE_LIBS) +endif else LIVE555_CFLAGS += -DNO_OPENSSL endif @@ -48,8 +52,8 @@ define LIVE555_CONFIGURE_CMDS # Must have a whitespace at the end of LIBRARY_LINK, otherwise static link # fails echo 'LIBRARY_LINK = $(LIVE555_LIBRARY_LINK) ' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) - echo 'LIBS_FOR_CONSOLE_APPLICATION = $(LIVE555_LIBS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) - echo 'LIBS_FOR_LIVEMEDIA_LIB = $(LIVE555_LIBS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) + echo 'LIBS_FOR_CONSOLE_APPLICATION = $(LIVE555_CONSOLE_LIBS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) + echo 'LIBS_FOR_LIVEMEDIA_LIB = $(LIVE555_LIVEMEDIA_LIBS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) (cd $(@D); ./genMakefiles $(LIVE555_CONFIG_TARGET)) endef diff --git a/package/llvm/Config.in.host b/package/llvm/Config.in.host new file mode 100644 index 00000000000..4d73fb8c75d --- /dev/null +++ b/package/llvm/Config.in.host @@ -0,0 +1,18 @@ +config BR2_PACKAGE_HOST_LLVM + bool "host llvm" + depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS + depends on BR2_HOST_GCC_AT_LEAST_4_8 + help + The LLVM Project is a collection of modular and reusable + compiler and toolchain technologies. + + http://llvm.org + +config BR2_PACKAGE_HOST_LLVM_HOST_ARCH + string + default "AArch64" if BR2_HOSTARCH="aarch64" + default "X86" if BR2_HOSTARCH = "x86" || BR2_HOSTARCH = "x86_64" + default "ARM" if BR2_HOSTARCH = "arm" + +config BR2_PACKAGE_HOST_LLVM_ENABLE_HOST_ARCH + bool diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index 24d033d1244..53402b67be2 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -41,8 +41,9 @@ HOST_LLVM_CONF_OPTS += -DCMAKE_INSTALL_RPATH="$(HOST_DIR)/lib" LLVM_TARGET_ARCH = $(call qstrip,$(BR2_PACKAGE_LLVM_TARGET_ARCH)) # Build backend for target architecture. This include backends like AMDGPU. +HOST_LLVM_TARGETS_TO_BUILD = $(LLVM_TARGET_ARCH) LLVM_TARGETS_TO_BUILD = $(LLVM_TARGET_ARCH) -HOST_LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(LLVM_TARGETS_TO_BUILD))" +HOST_LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(HOST_LLVM_TARGETS_TO_BUILD))" LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(LLVM_TARGETS_TO_BUILD))" # LLVM target to use for native code generation. This is required for JIT generation. @@ -58,9 +59,15 @@ LLVM_CONF_OPTS += -DLLVM_TARGET_ARCH=$(LLVM_TARGET_ARCH) # output only $(LLVM_TARGET_ARCH) if not, and mesa3d won't build as # it thinks AMDGPU backend is not installed on the target. ifeq ($(BR2_PACKAGE_LLVM_AMDGPU),y) +HOST_LLVM_TARGETS_TO_BUILD += AMDGPU LLVM_TARGETS_TO_BUILD += AMDGPU endif +# Build backend for host architecture +ifeq ($(BR2_PACKAGE_HOST_LLVM_ENABLE_HOST_ARCH),y) +HOST_LLVM_TARGETS_TO_BUILD += $(call qstrip,$(BR2_PACKAGE_HOST_LLVM_HOST_ARCH)) +endif + # Use native llvm-tblgen from host-llvm (needed for cross-compilation) LLVM_CONF_OPTS += -DLLVM_TABLEGEN=$(HOST_DIR)/bin/llvm-tblgen @@ -214,8 +221,17 @@ HOST_LLVM_CONF_OPTS += \ # We need to activate LLVM_INCLUDE_TOOLS, otherwise it does not generate # libLLVM.so LLVM_CONF_OPTS += \ - -DLLVM_INCLUDE_TOOLS=ON \ + -DLLVM_INCLUDE_TOOLS=ON + +# The llvm-symbolizer binary is used by the Compiler-RT Fuzzer +# and AddressSanitizer tools for stack traces. +ifeq ($(BR2_PACKAGE_COMPILER_RT),y) +LLVM_CONF_OPTS += \ + -DLLVM_BUILD_TOOLS=ON +else +LLVM_CONF_OPTS += \ -DLLVM_BUILD_TOOLS=OFF +endif ifeq ($(BR2_PACKAGE_LLVM_RTTI),y) HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=ON diff --git a/package/localedef/2.31-49-g6f3459f9859a7b506c64fa1823769ab631072c6e/0001-HACK-only-build-and-install-localedef.patch b/package/localedef/2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d/0001-HACK-only-build-and-install-localedef.patch similarity index 100% rename from package/localedef/2.31-49-g6f3459f9859a7b506c64fa1823769ab631072c6e/0001-HACK-only-build-and-install-localedef.patch rename to package/localedef/2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d/0001-HACK-only-build-and-install-localedef.patch diff --git a/package/localedef/2.31-49-g6f3459f9859a7b506c64fa1823769ab631072c6e/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch b/package/localedef/2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch similarity index 100% rename from package/localedef/2.31-49-g6f3459f9859a7b506c64fa1823769ab631072c6e/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch rename to package/localedef/2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch diff --git a/package/localedef/2.31-49-g6f3459f9859a7b506c64fa1823769ab631072c6e/localedef.hash b/package/localedef/2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d/localedef.hash similarity index 70% rename from package/localedef/2.31-49-g6f3459f9859a7b506c64fa1823769ab631072c6e/localedef.hash rename to package/localedef/2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d/localedef.hash index 01c48b74b51..a1b2ae12fd0 100644 --- a/package/localedef/2.31-49-g6f3459f9859a7b506c64fa1823769ab631072c6e/localedef.hash +++ b/package/localedef/2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d/localedef.hash @@ -1,5 +1,5 @@ # Locally calculated (fetched from Github) -sha256 a105837271b66e92f1ed4a5f10f3bb9e993842d592f67d352c6637126bd3d58c glibc-2.31-49-g6f3459f9859a7b506c64fa1823769ab631072c6e.tar.gz +sha256 e1f2c9b424a4e0c00e7ad123a4204f7bc8afd3c504aeb8c79b1086509fd67176 glibc-2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d.tar.gz # Hashes for license files sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/localedef/localedef.mk b/package/localedef/localedef.mk index e3c571241c4..413e3acb651 100644 --- a/package/localedef/localedef.mk +++ b/package/localedef/localedef.mk @@ -7,13 +7,14 @@ # Use the same VERSION and SITE as target glibc # As in glibc.mk, generate version string using: # git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2- -LOCALEDEF_VERSION = 2.31-49-g6f3459f9859a7b506c64fa1823769ab631072c6e +LOCALEDEF_VERSION = 2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d LOCALEDEF_SOURCE = glibc-$(LOCALEDEF_VERSION).tar.gz LOCALEDEF_SITE = $(call github,bminor,glibc,$(LOCALEDEF_VERSION)) HOST_LOCALEDEF_DL_SUBDIR = glibc HOST_LOCALEDEF_DEPENDENCIES = \ $(BR2_MAKE_HOST_DEPENDENCY) \ + $(BR2_PYTHON3_HOST_DEPENDENCY) \ host-bison \ host-gawk diff --git a/package/ltp-testsuite/0001-cacheflush01-Rewrite-into-new-API.patch b/package/ltp-testsuite/0001-cacheflush01-Rewrite-into-new-API.patch new file mode 100644 index 00000000000..f9815624b98 --- /dev/null +++ b/package/ltp-testsuite/0001-cacheflush01-Rewrite-into-new-API.patch @@ -0,0 +1,225 @@ +From 48edd768850825a4d01e5e5e737122333fc55cdf Mon Sep 17 00:00:00 2001 +From: Petr Vorel +Date: Fri, 2 Oct 2020 21:29:58 +0200 +Subject: [PATCH] cacheflush01: Rewrite into new API + +This syscall is currently (v5.9) supported on these architectures: +arc, csky, mips, m68k, nds32, sh + +constants are missing for m68k, not sure if the testcase is valid for it. +Untested. + +Test for __LTP__NR_INVALID_SYSCALL saves adding autotools check for +. + +Signed-off-by: Petr Vorel +--- +[ upstream status: https://patchwork.ozlabs.org/project/ltp/patch/20201002202416.28972-1-petr.vorel@gmail.com/ ] + .../kernel/syscalls/cacheflush/cacheflush01.c | 173 ++++-------------- + 1 file changed, 40 insertions(+), 133 deletions(-) + +diff --git a/testcases/kernel/syscalls/cacheflush/cacheflush01.c b/testcases/kernel/syscalls/cacheflush/cacheflush01.c +index 29cf2014a..6ad8b953a 100644 +--- a/testcases/kernel/syscalls/cacheflush/cacheflush01.c ++++ b/testcases/kernel/syscalls/cacheflush/cacheflush01.c +@@ -1,157 +1,64 @@ +-/******************************************************************************/ +-/* Copyright (c) Maxin John , 2009 */ +-/* LKML Reference: http://lkml.org/lkml/2009/4/9/203 */ +-/* 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. */ +-/* */ +-/* You should have received a copy of the GNU General Public License */ +-/* along with this program; if not, write to the Free Software */ +-/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +-/* */ +-/******************************************************************************/ +-/******************************************************************************/ +-/* */ +-/* File: cacheflush01.c */ +-/* */ +-/* Description: The cacheflush_check() syscall */ +-/* Tests EINVAL error of cacheflush system call. */ +-/* Its expected behaviour is cacheflush() should return -EINVAL */ +-/* when cache parameter is not one of ICACHE, DCACHE, or BCACHE. */ +-/* */ +-/* Usage: */ +-/* cacheflush01 [-c n] [-e][-i n] [-I x] [-p x] [-t] */ +-/* where, -c n : Run n copies concurrently. */ +-/* -e : Turn on errno logging. */ +-/* -i n : Execute test n times. */ +-/* -I x : Execute test for x seconds. */ +-/* -P x : Pause for x seconds between iterations. */ +-/* -t : Turn on syscall timing. */ +-/* */ +-/* Total Tests: 1 */ +-/* */ +-/* Test Name: cacheflush01 */ +-/******************************************************************************/ ++// SPDX-License-Identifier: GPL-2.0-or-later + +-#include +-#include +-#include +-#include +- +-#include "test.h" ++#include "tst_test.h" + #include "lapi/syscalls.h" + + #if __NR_cacheflush != __LTP__NR_INVALID_SYSCALL ++ + #include +-#else ++ ++/* ++ * m68k does not have these constants ++ */ ++ + #ifndef ICACHE +-#define ICACHE (1<<0) /* flush instruction cache */ ++# define ICACHE (1<<0) + #endif ++ + #ifndef DCACHE +-#define DCACHE (1<<1) /* writeback and flush data cache */ ++# define DCACHE (1<<1) + #endif ++ + #ifndef BCACHE +-#define BCACHE (ICACHE|DCACHE) /* flush both caches */ +-#endif ++# define BCACHE (ICACHE|DCACHE) + #endif + +-char *TCID = "cacheflush01"; +-int TST_TOTAL = 1; ++#define CACHE_DESC(x) .cache = x, .desc = #x + +-/* Extern Global Functions */ +-/******************************************************************************/ +-/* */ +-/* Function: cleanup */ +-/* */ +-/* Description: Performs all one time clean up for this test on successful */ +-/* completion, premature exit or failure. Closes all temporary */ +-/* files, removes all temporary directories exits the test with */ +-/* appropriate return code by calling tst_exit() function. */ +-/* */ +-/* Input: None. */ +-/* */ +-/* Output: None. */ +-/* */ +-/* Return: On failure - Exits calling tst_exit(). Non '0' return code. */ +-/* On success - Exits calling tst_exit(). With '0' return code. */ +-/* */ +-/******************************************************************************/ +-void cleanup(void) +-{ ++static struct test_case_t { ++ int cache; ++ const char *desc; ++} test_cases[] = { ++ { CACHE_DESC(ICACHE) }, ++ { CACHE_DESC(DCACHE) }, ++ { CACHE_DESC(BCACHE) }, ++}; + +- tst_rmdir(); +-} ++static char *addr; + +-/* Local Functions */ +-/******************************************************************************/ +-/* */ +-/* Function: setup */ +-/* */ +-/* Description: Performs all one time setup for this test. This function is */ +-/* typically used to capture signals, create temporary dirs */ +-/* and temporary files that may be used in the course of this */ +-/* test. */ +-/* */ +-/* Input: None. */ +-/* */ +-/* Output: None. */ +-/* */ +-/* Return: On failure - Exits by calling cleanup(). */ +-/* On success - returns 0. */ +-/* */ +-/******************************************************************************/ +-void setup(void) ++static void setup(void) + { +- /* Capture signals if any */ +- /* Create temporary directories */ +- TEST_PAUSE; +- tst_tmpdir(); ++ addr = SAFE_MALLOC(getpagesize()); + } + +-int main(int ac, char **av) ++static void test_cacheflush(unsigned int i) + { ++ struct test_case_t *tc = &test_cases[i]; + +- char *addr = NULL; +- +- tst_parse_opts(ac, av, NULL, NULL); +- +- setup(); +- +- tst_count = 0; +- /* Create some user address range */ +- addr = malloc(getpagesize()); +- if (addr == NULL) { +- tst_brkm(TFAIL | TTERRNO, cleanup, "malloc failed"); +- } +- +- /* Invokes cacheflush() with proper parameters */ +- TEST(ltp_syscall(__NR_cacheflush, addr, getpagesize(), ICACHE)); +- if (TEST_RETURN == 0) { +- tst_resm(TPASS, "passed with no errno"); +- } else { +- tst_resm(TFAIL, "failed with unexpected errno"); +- } +- +- TEST(ltp_syscall(__NR_cacheflush, addr, getpagesize(), DCACHE)); +- if (TEST_RETURN == 0) { +- tst_resm(TPASS, "passed with no errno"); ++ TEST(tst_syscall(__NR_cacheflush, addr, getpagesize(), tc->cache)); ++ if (TST_RET == 0) { ++ tst_res(TPASS, "%s passed", tc->desc); + } else { +- tst_resm(TFAIL, "failed with unexpected errno"); ++ tst_res(TFAIL | TTERRNO, "%s failed", tc->desc); + } ++} + +- TEST(ltp_syscall(__NR_cacheflush, addr, getpagesize(), BCACHE)); +- if (TEST_RETURN == 0) { +- tst_resm(TPASS, "passed with no errno"); +- } else { +- tst_resm(TFAIL, "failed with unexpected errno"); +- } ++static struct tst_test test = { ++ .setup = setup, ++ .test = test_cacheflush, ++ .tcnt = ARRAY_SIZE(test_cases), ++}; + +- cleanup(); +- tst_exit(); +-} ++#else ++ TST_TEST_TCONF("system doesn't support cacheflush()"); ++#endif +-- +2.28.0 + diff --git a/package/ltp-testsuite/0001-fanotify.h-fix-build-with-uclibc.patch b/package/ltp-testsuite/0001-fanotify.h-fix-build-with-uclibc.patch new file mode 100644 index 00000000000..55317569705 --- /dev/null +++ b/package/ltp-testsuite/0001-fanotify.h-fix-build-with-uclibc.patch @@ -0,0 +1,41 @@ +From cb11e718ce04261cb6ff4c09442b949da33b8797 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 5 Sep 2020 17:55:45 +0200 +Subject: [PATCH] fanotify.h: fix build with uclibc + +MAX_HANDLE_SZ is used since version 20200515 and +https://github.com/linux-test-project/ltp/commit/d20a3e8f9a794e0659277acfa9fbcf7454ba4631 + +However, it is not defined by uclibc, so define it if needed to avoid +the following build failure: + +fanotify.h:171:11: error: 'MAX_HANDLE_SZ' undeclared here (not in a function) + 171 | char buf[MAX_HANDLE_SZ]; + +Fixes: + - http://autobuild.buildroot.org/results/fb0a67b15482e76b379b4b4d9c43b45bb0fccae1 + +Signed-off-by: Fabrice Fontaine +Reviewed-by: Cyril Hrubis +[Retrieved from: +https://github.com/linux-test-project/ltp/commit/cb11e718ce04261cb6ff4c09442b949da33b8797] +--- + testcases/kernel/syscalls/fanotify/fanotify.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h +index a9a431ca2f..d271578e97 100644 +--- a/testcases/kernel/syscalls/fanotify/fanotify.h ++++ b/testcases/kernel/syscalls/fanotify/fanotify.h +@@ -139,6 +139,11 @@ struct fanotify_event_info_fid { + #endif /* HAVE_STRUCT_FANOTIFY_EVENT_INFO_FID_FSID___VAL */ + + #ifdef HAVE_NAME_TO_HANDLE_AT ++ ++#ifndef MAX_HANDLE_SZ ++#define MAX_HANDLE_SZ 128 ++#endif ++ + /* + * Helper function used to obtain fsid and file_handle for a given path. + * Used by test files correlated to FAN_REPORT_FID functionality. diff --git a/package/lua/5.1.5/lua.hash b/package/lua/5.1.5/lua.hash new file mode 100644 index 00000000000..22ff8b7dad0 --- /dev/null +++ b/package/lua/5.1.5/lua.hash @@ -0,0 +1,6 @@ +# Hashes from: http://www.lua.org/ftp/ +md5 2e115fe26e435e33b0d5c022e4490567 lua-5.1.5.tar.gz +sha1 b3882111ad02ecc6b972f8c1241647905cb2e3fc lua-5.1.5.tar.gz + +# Locally computed +sha256 ee5e3e82af1e1b543c4f216e399d7c8cfee797711913f349e385101c4ae60a79 COPYRIGHT diff --git a/package/lua/5.3.5/0003-fix-revision-number.patch b/package/lua/5.3.5/0003-fix-revision-number.patch deleted file mode 100644 index ed2e0460eb2..00000000000 --- a/package/lua/5.3.5/0003-fix-revision-number.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix revision number - -In 0002-shared-libs-for-lua.patch, revision number is used to set -library name: -TO_SOLIB = liblua.so.$(R) - -However, library is built using PKG_VERSION which is passed only during -build step: -$(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? - -As a result, dynamic library is not installed in staging or target paths -since bump to lua 5.3.5 - -So, instead of replacing R by PKG_VERSION and passing this variable in -all steps, simply update R to 5 - -Signed-off-by: Fabrice Fontaine - -Index: b/Makefile -=================================================================== ---- a/Makefile -+++ b/Makefile -@@ -47,6 +47,6 @@ - - # Lua version and release. - V= 5.3 --R= $V.4 -+R= $V.5 - - # Targets start here. - all: $(PLAT) diff --git a/package/lua/5.3.5/0001-root-path.patch b/package/lua/5.3.6/0001-root-path.patch similarity index 100% rename from package/lua/5.3.5/0001-root-path.patch rename to package/lua/5.3.6/0001-root-path.patch diff --git a/package/lua/5.3.5/0002-shared-libs-for-lua.patch b/package/lua/5.3.6/0002-shared-libs-for-lua.patch similarity index 100% rename from package/lua/5.3.5/0002-shared-libs-for-lua.patch rename to package/lua/5.3.6/0002-shared-libs-for-lua.patch diff --git a/package/lua/5.3.5/0011-linenoise.patch b/package/lua/5.3.6/0003-linenoise.patch similarity index 100% rename from package/lua/5.3.5/0011-linenoise.patch rename to package/lua/5.3.6/0003-linenoise.patch diff --git a/package/lua/5.3.6/lua.hash b/package/lua/5.3.6/lua.hash new file mode 100644 index 00000000000..74849b31010 --- /dev/null +++ b/package/lua/5.3.6/lua.hash @@ -0,0 +1,6 @@ +# Hashes from: http://www.lua.org/ftp/ +md5 83f23dbd5230140a3770d5f54076948d lua-5.3.6.tar.gz +sha1 f27d20d6c81292149bc4308525a9d6733c224fa5 lua-5.3.6.tar.gz + +# Locally computed +sha256 2ddff2161e0c4487d744943565538743c0721485873092f6809d072a983b06ef doc/readme.html diff --git a/package/lua/lua.hash b/package/lua/lua.hash deleted file mode 100644 index 3e7812b7dc2..00000000000 --- a/package/lua/lua.hash +++ /dev/null @@ -1,8 +0,0 @@ -# Hashes from: http://www.lua.org/ftp/ -md5 4f4b4f323fd3514a68e0ab3da8ce3455 lua-5.3.5.tar.gz -sha1 112eb10ff04d1b4c9898e121d6bdf54a81482447 lua-5.3.5.tar.gz - -md5 2e115fe26e435e33b0d5c022e4490567 lua-5.1.5.tar.gz -sha1 b3882111ad02ecc6b972f8c1241647905cb2e3fc lua-5.1.5.tar.gz -# Locally computed -sha256 ee5e3e82af1e1b543c4f216e399d7c8cfee797711913f349e385101c4ae60a79 COPYRIGHT diff --git a/package/lua/lua.mk b/package/lua/lua.mk index ce75af6b023..ce57fd591a8 100644 --- a/package/lua/lua.mk +++ b/package/lua/lua.mk @@ -5,7 +5,7 @@ ################################################################################ ifeq ($(BR2_PACKAGE_LUA_5_3),y) -LUA_VERSION = 5.3.5 +LUA_VERSION = 5.3.6 else LUA_VERSION = 5.1.5 endif diff --git a/package/matchbox/0002-src-Fix-build-with-gcc-10.patch b/package/matchbox/0002-src-Fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..1556c6be24e --- /dev/null +++ b/package/matchbox/0002-src-Fix-build-with-gcc-10.patch @@ -0,0 +1,47 @@ +From 844f61069896fe3f549ab425d731c061028f697c Mon Sep 17 00:00:00 2001 +From: Adrian Bunk +Date: Tue, 12 May 2020 09:44:05 +0300 +Subject: src: Fix build with gcc 10 + +gcc 10 enables -fno-common by default which fails without these typedefs + +Signed-off-by: Adrian Bunk +Signed-off-by: Richard Purdie + +[Retrieved from: +http://git.yoctoproject.org/cgit/cgit.cgi/matchbox-window-manager/commit/?id=844f61069896fe3f549ab425d731c061028f697c] +Signed-off-by: Fabrice Fontaine +--- + src/mbtheme.h | 2 +- + src/structs.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/mbtheme.h b/src/mbtheme.h +index aa9a7c5..ad03bde 100644 +--- a/src/mbtheme.h ++++ b/src/mbtheme.h +@@ -46,7 +46,7 @@ typedef struct _mb_theme_param + + } MBThemeParam; + +-enum { ++typedef enum { + LAYER_GRADIENT_HORIZ = 1, + LAYER_GRADIENT_VERT, + LAYER_LABEL, +diff --git a/src/structs.h b/src/structs.h +index 24985e7..8f53e72 100644 +--- a/src/structs.h ++++ b/src/structs.h +@@ -148,7 +148,7 @@ + + /* Atoms, if you change these check ewmh_init() first */ + +-enum { ++typedef enum { + WM_STATE = 0, + WM_CHANGE_STATE, + WM_PROTOCOLS, +-- +cgit v1.2.2-1-g5e49 + diff --git a/package/memcached/0001-configure-Fix-cross-compilation-errors.patch b/package/memcached/0001-configure-Fix-cross-compilation-errors.patch deleted file mode 100644 index 5c5d9483250..00000000000 --- a/package/memcached/0001-configure-Fix-cross-compilation-errors.patch +++ /dev/null @@ -1,142 +0,0 @@ -From 1146bf07624b5820b942b84b68e66f0d3dd25914 Mon Sep 17 00:00:00 2001 -From: Ola Jeppsson -Date: Mon, 7 Oct 2019 18:07:30 -0400 -Subject: [PATCH] configure: Fix cross-compilation errors - -AC_RUN_IFELSE does not work when cross-compiling so we need to provide -fallback methods for those cases. - -I tried to use constructs that work with Autoconf 2.52. -Alas, I wasn't able to generate a working build system with that version. - -Autoconf 2.58 / Automake 1.7.9 is the earliest combo that I could get -to work (with and without this patch). -Perhaps it's time for a slight bump for the required version numbers? - -Cross-compiles sucessfully against: -riscv64-unknown-linux-gnu - -Downloaded from upstream PR: -https://github.com/memcached/memcached/pull/552 - -Signed-off-by: Bernd Kuhls ---- - configure.ac | 80 +++++++++++++++++++++++++++------------------------- - 1 file changed, 41 insertions(+), 39 deletions(-) - -diff --git a/configure.ac b/configure.ac -index fb78fc5..27dc939 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -264,23 +264,42 @@ return sizeof(void*) == 8 ? 0 : 1; - ],[ - CFLAGS="-m64 $org_cflags" - ],[ -- AC_MSG_ERROR([Don't know how to build a 64-bit object.]) -+ AC_MSG_ERROR([Don't know how to build a 64-bit object.]) -+ ],[ -+ dnl cross compile -+ AC_MSG_WARN([Assuming no extra CFLAGS are required for cross-compiling 64bit version.]) - ]) - fi - - dnl If data pointer is 64bit or not. --AC_RUN_IFELSE( -- [AC_LANG_PROGRAM([], [dnl --return sizeof(void*) == 8 ? 0 : 1; -- ]) --],[ -- have_64bit_ptr=yes --],[ -+AC_CHECK_HEADERS([stdint.h]) -+AS_IF([test -z "$have_64bit_ptr"], -+ [AC_RUN_IFELSE( -+ [AC_LANG_PROGRAM([], [return sizeof(void*) == 8 ? 0 : 1;])], -+ [have_64bit_ptr=yes ], -+ [have_64bit_ptr=no], -+ [dnl cross compile (this test requires C99) -+ AS_IF([test "x$ac_cv_header_stdint_h" = xyes], -+ [AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([ -+ #include -+ #if UINTPTR_MAX == 0xFFFFFFFFFFFFFFFFUL -+ /* 64 bit pointer */ -+ #else -+ #error 32 bit pointer -+ #endif -+ ], [])], -+ [have_64bit_ptr=yes], -+ [have_64bit_ptr=no])], -+ [have_64bit_ptr=unknown]) -+ ]) - ]) -- --if test $have_64bit_ptr = yes; then -+AS_IF([test "$have_64bit_ptr" = "unknown" ],[ -+ AC_MSG_ERROR([Cannot detect pointer size. Must pass have_64bit_ptr={yes,no} to configure.]) -+]) -+AS_IF([test "$have_64bit_ptr" = yes],[ - AC_DEFINE(HAVE_64BIT_PTR, 1, [data pointer is 64bit]) --fi -+]) - - # Issue 213: Search for clock_gettime to help people linking - # with a static version of libevent -@@ -570,30 +589,10 @@ fi - AC_C_SOCKLEN_T - - dnl Check if we're a little-endian or a big-endian system, needed by hash code --AC_DEFUN([AC_C_ENDIAN], --[AC_CACHE_CHECK(for endianness, ac_cv_c_endian, --[ -- AC_RUN_IFELSE( -- [AC_LANG_PROGRAM([], [dnl -- long val = 1; -- char *c = (char *) &val; -- exit(*c == 1); -- ]) -- ],[ -- ac_cv_c_endian=big -- ],[ -- ac_cv_c_endian=little -- ]) --]) --if test $ac_cv_c_endian = big; then -- AC_DEFINE(ENDIAN_BIG, 1, [machine is bigendian]) --fi --if test $ac_cv_c_endian = little; then -- AC_DEFINE(ENDIAN_LITTLE, 1, [machine is littleendian]) --fi --]) -- --AC_C_ENDIAN -+AC_C_BIGENDIAN( -+ [AC_DEFINE(ENDIAN_BIG, 1, [machine is bigendian])], -+ [AC_DEFINE(ENDIAN_LITTLE, 1, [machine is littleendian])], -+ [AC_MSG_ERROR([Cannot detect endianness. Must pass ac_cv_c_bigendian={yes,no} to configure.])]) - - AC_DEFUN([AC_C_HTONLL], - [ -@@ -670,12 +669,15 @@ AC_DEFUN([AC_C_ALIGNMENT], - ],[ - ac_cv_c_alignment=need - ],[ -- ac_cv_c_alignment=need -+ dnl cross compile -+ ac_cv_c_alignment=maybe - ]) - ]) --if test $ac_cv_c_alignment = need; then -- AC_DEFINE(NEED_ALIGN, 1, [Machine need alignment]) --fi -+AS_IF([test $ac_cv_c_alignment = need], -+ [AC_DEFINE(NEED_ALIGN, 1, [Machine need alignment])]) -+AS_IF([test $ac_cv_c_alignment = maybe], -+ [AC_MSG_WARN([Assuming aligned access is required when cross-compiling]) -+ AC_DEFINE(NEED_ALIGN, 1, [Machine need alignment])]) - ]) - - AC_C_ALIGNMENT --- -2.20.1 - diff --git a/package/memcached/0002-configure-Simplify-pointer-size-check.patch b/package/memcached/0002-configure-Simplify-pointer-size-check.patch deleted file mode 100644 index 1a5dc319632..00000000000 --- a/package/memcached/0002-configure-Simplify-pointer-size-check.patch +++ /dev/null @@ -1,76 +0,0 @@ -From ec7f3bc97c53578d5ca332b9e86c4d08d155c5a0 Mon Sep 17 00:00:00 2001 -From: Ola Jeppsson -Date: Mon, 7 Oct 2019 19:57:46 -0400 -Subject: [PATCH] configure: Simplify pointer size check - -Tested with: -Autoconf 2.59 / Automake 1.7.9 -Autoconf 2.69 / Automake 1.16.1 - -Downloaded from upstream PR: -https://github.com/memcached/memcached/pull/552 - -Signed-off-by: Bernd Kuhls ---- - configure.ac | 31 ++----------------------------- - restart.h | 2 +- - 2 files changed, 3 insertions(+), 30 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 27dc939..7e5bd5d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -271,35 +271,8 @@ return sizeof(void*) == 8 ? 0 : 1; - ]) - fi - --dnl If data pointer is 64bit or not. --AC_CHECK_HEADERS([stdint.h]) --AS_IF([test -z "$have_64bit_ptr"], -- [AC_RUN_IFELSE( -- [AC_LANG_PROGRAM([], [return sizeof(void*) == 8 ? 0 : 1;])], -- [have_64bit_ptr=yes ], -- [have_64bit_ptr=no], -- [dnl cross compile (this test requires C99) -- AS_IF([test "x$ac_cv_header_stdint_h" = xyes], -- [AC_COMPILE_IFELSE( -- [AC_LANG_PROGRAM([ -- #include -- #if UINTPTR_MAX == 0xFFFFFFFFFFFFFFFFUL -- /* 64 bit pointer */ -- #else -- #error 32 bit pointer -- #endif -- ], [])], -- [have_64bit_ptr=yes], -- [have_64bit_ptr=no])], -- [have_64bit_ptr=unknown]) -- ]) --]) --AS_IF([test "$have_64bit_ptr" = "unknown" ],[ -- AC_MSG_ERROR([Cannot detect pointer size. Must pass have_64bit_ptr={yes,no} to configure.]) --]) --AS_IF([test "$have_64bit_ptr" = yes],[ -- AC_DEFINE(HAVE_64BIT_PTR, 1, [data pointer is 64bit]) --]) -+dnl Check if data pointer is 64bit or not -+AC_CHECK_SIZEOF([void *]) - - # Issue 213: Search for clock_gettime to help people linking - # with a static version of libevent -diff --git a/restart.h b/restart.h -index 76cd0a8..9de5096 100644 ---- a/restart.h -+++ b/restart.h -@@ -4,7 +4,7 @@ - #define RESTART_TAG_MAXLEN 255 - - // Track the pointer size for restart fiddling. --#ifdef HAVE_64BIT_PTR -+#if SIZEOF_VOID_P == 8 - typedef uint64_t mc_ptr_t; - #else - typedef uint32_t mc_ptr_t; --- -2.20.1 - diff --git a/package/memcached/0003-hash-fix-build-failure-against-gcc-10.patch b/package/memcached/0003-hash-fix-build-failure-against-gcc-10.patch new file mode 100644 index 00000000000..564b191c1b3 --- /dev/null +++ b/package/memcached/0003-hash-fix-build-failure-against-gcc-10.patch @@ -0,0 +1,56 @@ +From 0447ae4cbbebb87d3f28bb92f7e219a47263b889 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Thu, 23 Jan 2020 22:16:36 +0000 +Subject: [PATCH] hash: fix build failure against gcc-10 + +On gcc-10 (and gcc-9 -fno-common) build fails as: + +``` +gcc -g -O2 -pthread -pthread -Wall -Werror -pedantic -Wmissing-prototypes \ + -Wmissing-declarations -Wredundant-decls -o memcached ... -levent +ld: memcached-hash.o:memcached/hash.h:5: + multiple definition of `hash'; memcached-memcached.o:memcached/hash.h:5: first defined here +``` + +gcc-10 will change the default from -fcommon to fno-common: +https://gcc.gnu.org/PR85678. + +The error also happens if CFLAGS=-fno-common passed explicitly. + +Reported-by: Brian Evans +Bug: https://bugs.gentoo.org/706196 +Signed-off-by: Sergei Trofimovich +[Retrieved from: +https://github.com/memcached/memcached/commit/0447ae4cbbebb87d3f28bb92f7e219a47263b889] +Signed-off-by: Fabrice Fontaine +--- + hash.c | 2 ++ + hash.h | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/hash.c b/hash.c +index a0c30369f..b5ff28ae4 100644 +--- a/hash.c ++++ b/hash.c +@@ -4,6 +4,8 @@ + #include "jenkins_hash.h" + #include "murmur3_hash.h" + ++hash_func hash; ++ + int hash_init(enum hashfunc_type type) { + switch(type) { + case JENKINS_HASH: +diff --git a/hash.h b/hash.h +index 059d1e2a6..3b2a98478 100644 +--- a/hash.h ++++ b/hash.h +@@ -2,7 +2,7 @@ + #define HASH_H + + typedef uint32_t (*hash_func)(const void *key, size_t length); +-hash_func hash; ++extern hash_func hash; + + enum hashfunc_type { + JENKINS_HASH=0, MURMUR3_HASH diff --git a/package/memcached/memcached.hash b/package/memcached/memcached.hash index 98e47d6c07d..e599cd2fa2f 100644 --- a/package/memcached/memcached.hash +++ b/package/memcached/memcached.hash @@ -1,6 +1,6 @@ -# From http://www.memcached.org/files/memcached-1.5.19.tar.gz.sha1 -sha1 14e6a02e743838696fcb620edf6a2fd7e60cabec memcached-1.5.19.tar.gz +# From http://www.memcached.org/files/memcached-1.5.22.tar.gz.sha1 +sha1 3fe5d3929130e860efcfde18d4d396a29db006b7 memcached-1.5.22.tar.gz # Locally computed -sha256 3ddcdaa2d14d215f3111a7448b79c889c57618a26e97ad989581f1880a5a4be0 memcached-1.5.19.tar.gz -sha256 bc887c4ad8051fe690ace9528fe37a2e0bb362e6d963331d82e845ca9b585a0c COPYING +sha256 c2b47e9d20575a2367087c229636ffc3fb699a6c3a7f3a22f44402f25f5f1f93 memcached-1.5.22.tar.gz +sha256 bc887c4ad8051fe690ace9528fe37a2e0bb362e6d963331d82e845ca9b585a0c COPYING diff --git a/package/memcached/memcached.mk b/package/memcached/memcached.mk index 9b362d2a36e..8a980677ce6 100644 --- a/package/memcached/memcached.mk +++ b/package/memcached/memcached.mk @@ -4,16 +4,13 @@ # ################################################################################ -MEMCACHED_VERSION = 1.5.19 +MEMCACHED_VERSION = 1.5.22 MEMCACHED_SITE = http://www.memcached.org/files MEMCACHED_DEPENDENCIES = libevent MEMCACHED_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' MEMCACHED_CONF_OPTS = --disable-coverage MEMCACHED_LICENSE = BSD-3-Clause MEMCACHED_LICENSE_FILES = COPYING -# 0001-configure-Fix-cross-compilation-errors.patch -# 0002-configure-Simplify-pointer-size-check.patch -MEMCACHED_AUTORECONF = YES ifeq ($(BR2_ENDIAN),"BIG") MEMCACHED_CONF_ENV += ac_cv_c_endian=big diff --git a/package/memtester/0002-fix-build-with-gcc-10.patch b/package/memtester/0002-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..8c9b3945bb7 --- /dev/null +++ b/package/memtester/0002-fix-build-with-gcc-10.patch @@ -0,0 +1,65 @@ +From acd226cd4073b77abce8783e19c5ef3bbf8074ef Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 11 Sep 2020 21:39:03 +0200 +Subject: [PATCH] fix build with gcc 10 + +Move mword8 and mword16 from types.h to tests.c to avoid the following +build failure with gcc 10 (which defaults to -fno-common): + +/srv/storage/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: tests.o: in function `.LANCHOR1': +tests.c:(.bss+0x4): multiple definition of `mword16'; memtester.o:memtester.c:(.bss+0xc): first defined here +/srv/storage/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: tests.o: in function `.LANCHOR1': +tests.c:(.bss+0x0): multiple definition of `mword8'; memtester.o:memtester.c:(.bss+0x10): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/e1c276603475a952847fd53724e56101cdccbbcb + +Signed-off-by: Fabrice Fontaine +[Upstream status: sent to charlesc@pyropus.ca] +--- + tests.c | 10 ++++++++++ + types.h | 10 ---------- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/tests.c b/tests.c +index be1b350..d3d25c7 100644 +--- a/tests.c ++++ b/tests.c +@@ -22,6 +22,16 @@ + #include "sizes.h" + #include "memtester.h" + ++union { ++ unsigned char bytes[UL_LEN/8]; ++ ul val; ++} mword8; ++ ++union { ++ unsigned short u16s[UL_LEN/16]; ++ ul val; ++} mword16; ++ + char progress[] = "-\\|/"; + #define PROGRESSLEN 4 + #define PROGRESSOFTEN 2500 +diff --git a/types.h b/types.h +index ad7ce73..dca7fc0 100644 +--- a/types.h ++++ b/types.h +@@ -24,13 +24,3 @@ struct test { + char *name; + int (*fp)(); + }; +- +-union { +- unsigned char bytes[UL_LEN/8]; +- ul val; +-} mword8; +- +-union { +- unsigned short u16s[UL_LEN/16]; +- ul val; +-} mword16; +-- +2.28.0 + diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in index a12ed641a66..ebfc422bf2c 100644 --- a/package/mesa3d/Config.in +++ b/package/mesa3d/Config.in @@ -370,7 +370,13 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU Support for Nvidia-based GPUs. config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON - bool "DRI radeon driver" + bool "DRI radeon r100 driver" + depends on BR2_i386 || BR2_x86_64 + # libdrm's radeon option depends on LIBDRM_HAS_ATOMIC. Propagating + # that dependency here causes a circular dependency that Kconfig + # can't see is just spurious. However, that dependency is about + # the toolchain having sync4 primitives, which is always a given + # for i386 and x86_64. select BR2_PACKAGE_MESA3D_DRI_DRIVER select BR2_PACKAGE_LIBDRM_RADEON help diff --git a/package/meson/meson.mk b/package/meson/meson.mk index f698226a45a..f763fdfe431 100644 --- a/package/meson/meson.mk +++ b/package/meson/meson.mk @@ -25,6 +25,10 @@ else ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y) HOST_MESON_TARGET_CPU_FAMILY = aarch64 else ifeq ($(BR2_i386),y) HOST_MESON_TARGET_CPU_FAMILY = x86 +else ifeq ($(BR2_m68k),y) +HOST_MESON_TARGET_CPU_FAMILY = m68k +else ifeq ($(BR2_microblazeel)$(BR2_microblazebe),y) +HOST_MESON_TARGET_CPU_FAMILY = microblaze else ifeq ($(BR2_mips)$(BR2_mipsel),y) HOST_MESON_TARGET_CPU_FAMILY = mips else ifeq ($(BR2_mips64)$(BR2_mips64el),y) @@ -35,6 +39,8 @@ else ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y) HOST_MESON_TARGET_CPU_FAMILY = ppc64 else ifeq ($(BR2_riscv),y) HOST_MESON_TARGET_CPU_FAMILY = riscv64 +else ifeq ($(BR2_sh4)$(BR2_sh4eb)$(BR2_sh4a)$(BR2_sh4aeb),y) +HOST_MESON_TARGET_CPU_FAMILY = sh4 else ifeq ($(BR2_sparc),y) HOST_MESON_TARGET_CPU_FAMILY = sparc else ifeq ($(BR2_sparc64),y) diff --git a/package/minidlna/0001-fix-build-with-gcc-10.patch b/package/minidlna/0001-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..521d17f0cab --- /dev/null +++ b/package/minidlna/0001-fix-build-with-gcc-10.patch @@ -0,0 +1,49 @@ +From 90e88764f0fb3d981cd0c3cfd07d63323cc64090 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Tue, 1 Sep 2020 22:55:24 +0200 +Subject: [PATCH] fix build with gcc 10 + +Define setjmp_buffer as static to avoid the following build failure with +gcc 10 (which defaults to -fno-common): + +/home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: image_utils.o:(.bss+0x0): multiple definition of `setjmp_buffer'; metadata.o:(.bss+0x0): first defined here +collect2: error: ld returned 1 exit status + +Fixes: + - http://autobuild.buildroot.org/results/8754bb4f7d749f999d5f8ddfec587470ceec4476 + +Signed-off-by: Fabrice Fontaine +--- + image_utils.c | 2 +- + metadata.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/image_utils.c b/image_utils.c +index 24cfd08..e8d9635 100644 +--- a/image_utils.c ++++ b/image_utils.c +@@ -190,7 +190,7 @@ jpeg_memory_src(j_decompress_ptr cinfo, const unsigned char * buffer, size_t buf + src->pub.bytes_in_buffer = bufsize; + } + +-jmp_buf setjmp_buffer; ++static jmp_buf setjmp_buffer; + /* Don't exit on error like libjpeg likes to do */ + static void + libjpeg_error_handler(j_common_ptr cinfo) +diff --git a/metadata.c b/metadata.c +index 9cd86dc..4781db7 100644 +--- a/metadata.c ++++ b/metadata.c +@@ -502,7 +502,7 @@ GetAudioMetadata(const char *path, const char *name) + } + + /* For libjpeg error handling */ +-jmp_buf setjmp_buffer; ++static jmp_buf setjmp_buffer; + static void + libjpeg_error_handler(j_common_ptr cinfo) + { +-- +2.28.0 + diff --git a/package/minidlna/0002-upnphttp.c-fix-CallStranger-a.k.a.-CVE-2020-12695.patch b/package/minidlna/0002-upnphttp.c-fix-CallStranger-a.k.a.-CVE-2020-12695.patch new file mode 100644 index 00000000000..7406ce2e9e0 --- /dev/null +++ b/package/minidlna/0002-upnphttp.c-fix-CallStranger-a.k.a.-CVE-2020-12695.patch @@ -0,0 +1,133 @@ +From 51bfbee51fd0376b5a66c944134af3e9972d8592 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sun, 6 Sep 2020 11:22:48 +0200 +Subject: [PATCH] upnphttp.c: fix CallStranger a.k.a. CVE-2020-12695 + +Import CheckCallback function from miniupnpd source code: +https://github.com/miniupnp/miniupnp/commit/0d9634658860c3c8c209e466cc0ef7002bad3b0a + +IPv6 code was kept even if minidlna does not support it currently. + +This code is licensed under BSD-3-Clause like minidlna. + +Signed-off-by: Fabrice Fontaine +[Upstream status: +https://sourceforge.net/p/minidlna/support-requests/71] +--- + upnphttp.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 82 insertions(+), 10 deletions(-) + +diff --git a/upnphttp.c b/upnphttp.c +index 974434e..3be793e 100644 +--- a/upnphttp.c ++++ b/upnphttp.c +@@ -742,6 +742,70 @@ check_event(struct upnphttp *h) + return type; + } + ++/** ++ * returns 0 if the callback header value is not valid ++ * 1 if it is valid. ++ */ ++static int ++checkCallbackURL(struct upnphttp * h) ++{ ++ char addrstr[48]; ++ int ipv6; ++ const char * p; ++ int i; ++ ++ if(!h->req_Callback || h->req_CallbackLen < 8) ++ return 0; ++ if(memcmp(h->req_Callback, "http://", 7) != 0) ++ return 0; ++ ipv6 = 0; ++ i = 0; ++ p = h->req_Callback + 7; ++ if(*p == '[') { ++ p++; ++ ipv6 = 1; ++ while(*p != ']' && i < (sizeof(addrstr)-1) ++ && p < (h->req_Callback + h->req_CallbackLen)) ++ addrstr[i++] = *(p++); ++ } else { ++ while(*p != '/' && *p != ':' && i < (sizeof(addrstr)-1) ++ && p < (h->req_Callback + h->req_CallbackLen)) ++ addrstr[i++] = *(p++); ++ } ++ addrstr[i] = '\0'; ++ if(ipv6) { ++ struct in6_addr addr; ++ if(inet_pton(AF_INET6, addrstr, &addr) <= 0) ++ return 0; ++#ifdef ENABLE_IPV6 ++ if(!h->ipv6 ++ || (0!=memcmp(&addr, &(h->clientaddr_v6), sizeof(struct in6_addr)))) ++ return 0; ++#else ++ return 0; ++#endif ++ } else { ++ struct in_addr addr; ++ if(inet_pton(AF_INET, addrstr, &addr) <= 0) ++ return 0; ++#ifdef ENABLE_IPV6 ++ if(h->ipv6) { ++ if(!IN6_IS_ADDR_V4MAPPED(&(h->clientaddr_v6))) ++ return 0; ++ if(0!=memcmp(&addr, ((const char *)&(h->clientaddr_v6) + 12), 4)) ++ return 0; ++ } else { ++ if(0!=memcmp(&addr, &(h->clientaddr), sizeof(struct in_addr))) ++ return 0; ++ } ++#else ++ if(0!=memcmp(&addr, &(h->clientaddr), sizeof(struct in_addr))) ++ return 0; ++#endif ++ } ++ return 1; ++} ++ + static void + ProcessHTTPSubscribe_upnphttp(struct upnphttp * h, const char * path) + { +@@ -759,17 +823,25 @@ ProcessHTTPSubscribe_upnphttp(struct upnphttp * h, const char * path) + * - respond HTTP/x.x 200 OK + * - Send the initial event message */ + /* Server:, SID:; Timeout: Second-(xx|infinite) */ +- sid = upnpevents_addSubscriber(path, h->req_Callback, +- h->req_CallbackLen, h->req_Timeout); +- h->respflags = FLAG_TIMEOUT; +- if (sid) +- { +- DPRINTF(E_DEBUG, L_HTTP, "generated sid=%s\n", sid); +- h->respflags |= FLAG_SID; +- h->req_SID = sid; +- h->req_SIDLen = strlen(sid); ++ /* Check that the callback URL is on the same IP as ++ * the request, and not on the internet, nor on ourself (DOS attack ?) */ ++ if(checkCallbackURL(h)) { ++ sid = upnpevents_addSubscriber(path, h->req_Callback, ++ h->req_CallbackLen, h->req_Timeout); ++ h->respflags = FLAG_TIMEOUT; ++ if (sid) ++ { ++ DPRINTF(E_DEBUG, L_HTTP, "generated sid=%s\n", sid); ++ h->respflags |= FLAG_SID; ++ h->req_SID = sid; ++ h->req_SIDLen = strlen(sid); ++ } ++ BuildResp_upnphttp(h, 0, 0); ++ } else { ++ DPRINTF(E_WARN, L_HTTP, "Invalid Callback in SUBSCRIBE %.*s", ++ h->req_CallbackLen, h->req_Callback); ++ BuildResp2_upnphttp(h, 412, "Precondition Failed", 0, 0); + } +- BuildResp_upnphttp(h, 0, 0); + } + else if (type == E_RENEW) + { +-- +2.28.0 + diff --git a/package/minidlna/minidlnad.service b/package/minidlna/minidlnad.service index f69476b303a..4e968d38585 100644 --- a/package/minidlna/minidlnad.service +++ b/package/minidlna/minidlnad.service @@ -5,7 +5,7 @@ After=network.target [Service] Type=forking ExecStart=/usr/sbin/minidlnad -PIDFile=/var/run/minidlna/minidlna.pid +PIDFile=/run/minidlna/minidlna.pid [Install] WantedBy=multi-user.target diff --git a/package/mongodb/mongodb.hash b/package/mongodb/mongodb.hash index efbdf33e797..ab13d776514 100644 --- a/package/mongodb/mongodb.hash +++ b/package/mongodb/mongodb.hash @@ -1,4 +1,4 @@ # Locally computed: -sha256 4a8633ec92383864bb4b791f9776ef6f4652bf36b2c5a73557d1217ba85bca2b mongodb-src-r4.2.9.tar.gz +sha256 f44a846514f8db8be2a662210ad7fefc059d8e17ab2c59aceeae8b0b173d8286 mongodb-src-r4.2.10.tar.gz sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 APACHE-2.0.txt sha256 09d99ca61eb07873d5334077acba22c33e7f7d0a9fa08c92734e0ac8430d6e27 LICENSE-Community.txt diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk index d4af320105d..6a1caf4fcb7 100644 --- a/package/mongodb/mongodb.mk +++ b/package/mongodb/mongodb.mk @@ -4,7 +4,7 @@ # ################################################################################ -MONGODB_VERSION = 4.2.9 +MONGODB_VERSION = 4.2.10 MONGODB_SITE = https://fastdl.mongodb.org/src MONGODB_SOURCE = mongodb-src-r$(MONGODB_VERSION).tar.gz diff --git a/package/mongrel2/0002-Do-not-run-tests.patch b/package/mongrel2/0001-Do-not-run-tests.patch similarity index 100% rename from package/mongrel2/0002-Do-not-run-tests.patch rename to package/mongrel2/0001-Do-not-run-tests.patch diff --git a/package/mongrel2/0003-Fix-Makefiles-for-cross-compilation.patch b/package/mongrel2/0002-Fix-Makefiles-for-cross-compilation.patch similarity index 100% rename from package/mongrel2/0003-Fix-Makefiles-for-cross-compilation.patch rename to package/mongrel2/0002-Fix-Makefiles-for-cross-compilation.patch diff --git a/package/mongrel2/0004-Rename-symbol-to-prevent-conflict.patch b/package/mongrel2/0003-Rename-symbol-to-prevent-conflict.patch similarity index 100% rename from package/mongrel2/0004-Rename-symbol-to-prevent-conflict.patch rename to package/mongrel2/0003-Rename-symbol-to-prevent-conflict.patch diff --git a/package/mongrel2/0004-fix-multiple-definition-error-when-building-with-gcc10.patch b/package/mongrel2/0004-fix-multiple-definition-error-when-building-with-gcc10.patch new file mode 100644 index 00000000000..e1b57884943 --- /dev/null +++ b/package/mongrel2/0004-fix-multiple-definition-error-when-building-with-gcc10.patch @@ -0,0 +1,25 @@ +From c51815b10c39c6e802bd1b56549f1d479b480fcc Mon Sep 17 00:00:00 2001 +From: Andrew Sun +Date: Sat, 18 Jul 2020 09:11:11 -0400 +Subject: [PATCH] fix multiple definition error when building with gcc10 + +[Retrieved from: +https://github.com/mongrel2/mongrel2/pull/343/commits/c51815b10c39c6e802bd1b56549f1d479b480fcc] +Signed-off-by: Fabrice Fontaine +--- + src/unixy.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/unixy.h b/src/unixy.h +index 045e7c28..4225220c 100644 +--- a/src/unixy.h ++++ b/src/unixy.h +@@ -38,7 +38,7 @@ + #include + #include + +-char *m2program; ++extern char *m2program; + + int Unixy_chroot(bstring path); + diff --git a/package/motion/0001-Fix-build-with-GCC-10.patch b/package/motion/0001-Fix-build-with-GCC-10.patch new file mode 100644 index 00000000000..a5684db965a --- /dev/null +++ b/package/motion/0001-Fix-build-with-GCC-10.patch @@ -0,0 +1,53 @@ +From a4a48baf86b18b792fb5e53648b4efd02b3db7b7 Mon Sep 17 00:00:00 2001 +From: Vasiliy Glazov +Date: Sun, 8 Mar 2020 03:00:21 +0300 +Subject: [PATCH] Fix build with GCC 10. + +[Retrieved (and backported) from: +https://github.com/Motion-Project/motion/commit/a4a48baf86b18b792fb5e53648b4efd02b3db7b7] +Signed-off-by: Fabrice Fontaine +--- + src/netcam.h | 2 +- + src/translate.c | 2 ++ + src/translate.h | 2 +- + 3 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/netcam.h b/netcam.h +index 2951d917..4ee0e1c8 100644 +--- a/netcam.h ++++ b/netcam.h +@@ -113,7 +113,7 @@ typedef struct netcam_image_buff { + } netcam_buff; + typedef netcam_buff *netcam_buff_ptr; + +-struct netcam_caps { /* netcam capabilities: */ ++extern struct netcam_caps { /* netcam capabilities: */ + unsigned char streaming; /* See the NCS_* defines */ + unsigned char content_length; /* 0 - unsupported */ + } caps; +diff --git a/translate.c b/translate.c +index 0c9f1105..a212d9de 100644 +--- a/translate.c ++++ b/translate.c +@@ -10,6 +10,8 @@ + #include "motion.h" + #include "translate.h" + ++int nls_enabled; ++ + void translate_locale_chg(const char *langcd){ + #ifdef HAVE_GETTEXT + /* This routine is for development testing only. It is not used for +diff --git a/translate.h b/translate.h +index 0832ffd8..eeba3745 100644 +--- a/translate.h ++++ b/translate.h +@@ -10,7 +10,7 @@ + #ifndef _INCLUDE_TRANSLATE_H_ + #define _INCLUDE_TRANSLATE_H_ + +-int nls_enabled; ++extern int nls_enabled; + + #ifdef HAVE_GETTEXT + # include diff --git a/package/mraa/0001-include-Declare-gVERSION-global-as-extern.patch b/package/mraa/0001-include-Declare-gVERSION-global-as-extern.patch new file mode 100644 index 00000000000..b3a1f5a03a0 --- /dev/null +++ b/package/mraa/0001-include-Declare-gVERSION-global-as-extern.patch @@ -0,0 +1,29 @@ +From dbb5961f106ec42cd70689d933674c9c37aedfe1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Mon, 13 Apr 2020 20:12:11 +0200 +Subject: [PATCH] include: Declare gVERSION global as 'extern'. + +Fixes build with '-fno-common'. + +[Retrieved from: +https://github.com/eclipse/mraa/pull/1012/commits/dbb5961f106ec42cd70689d933674c9c37aedfe1] +Signed-off-by: Fabrice Fontaine +--- + include/version.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/version.h b/include/version.h +index 47366ef6f..3a567a1d5 100644 +--- a/include/version.h ++++ b/include/version.h +@@ -11,8 +11,8 @@ + extern "C" { + #endif + +-const char* gVERSION; +-const char* gVERSION_SHORT; ++extern const char* gVERSION; ++extern const char* gVERSION_SHORT; + + #ifdef __cplusplus + } diff --git a/package/mraa/0002-CMakeLists.txt-add-BUILDCPP-option.patch b/package/mraa/0002-CMakeLists.txt-add-BUILDCPP-option.patch new file mode 100644 index 00000000000..fbadfe79ef7 --- /dev/null +++ b/package/mraa/0002-CMakeLists.txt-add-BUILDCPP-option.patch @@ -0,0 +1,193 @@ +From cb88e4dd1fbbb9d24e625dba2768b88ed99da309 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 13 Jun 2020 22:51:37 +0200 +Subject: [PATCH] CMakeLists.txt: add BUILDCPP option + +C++ is a mandatory dependency since version 1.4.0 and +https://github.com/eclipse/mraa/commit/122cab1f1e53b7c9c7cd82905b962071f9bad9dc + +As a result, build on embedded toolchains that do not support C++ fails +on: + +CMake Error at CMakeLists.txt:2 (project): + The CMAKE_CXX_COMPILER: + + /home/naourr/work/instance-1/output-1/per-package/mraa/host/bin/arm-linux-g++ + + is not a full path to an existing compiler tool. + +Fixes: + - http://autobuild.buildroot.org/results/31086422e03611c16ab59c4418e3669b580bc0c0 + +Signed-off-by: Fabrice Fontaine +[Retrieved from: +https://github.com/eclipse/mraa/commit/cb88e4dd1fbbb9d24e625dba2768b88ed99da309] +--- + CMakeLists.txt | 69 +++++++++++++++++++---------------- + src/java/CMakeLists.txt | 4 +- + src/javascript/CMakeLists.txt | 34 +++++++++-------- + 3 files changed, 59 insertions(+), 48 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 250d9106e..90c0dc920 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required (VERSION 2.8.11) +-project (mraa C CXX) ++project (mraa C) + + FIND_PACKAGE (Threads REQUIRED) + +@@ -11,6 +11,8 @@ else () + set (CMAKE_C_STANDARD 99) + endif () + ++option (BUILDCPP "Enable C++ (needed by FTDI4222 and tests)" ON) ++ + ############################################################################### + # Detect supported warning flags + # Modified from work By Dan Liew (fpbench - MIT) +@@ -33,15 +35,18 @@ set (MRAA_C_WARNING_FLAGS + -Werror=missing-parameter-type + ) + +-# Warning flags for the C++ compiler only +-set (MRAA_CXX_WARNING_FLAGS +- -Wnon-virtual-dtor +- -Woverloaded-virtual +- -Wreorder +-) +- + include (CheckCCompilerFlag) +-include (CheckCXXCompilerFlag) ++if (BUILDCPP) ++ # Warning flags for the C++ compiler only ++ set (MRAA_CXX_WARNING_FLAGS ++ -Wnon-virtual-dtor ++ -Woverloaded-virtual ++ -Wreorder ++ ) ++ ++ enable_language (CXX) ++ include (CheckCXXCompilerFlag) ++endif () + function (MRAA_SANITIZE_FLAG_NAME OUTPUT_VAR FLAG) + string (REPLACE "-" "_" SANITIZED_FLAG_NAME "${FLAG}") + string (REPLACE "/" "_" SANITIZED_FLAG_NAME "${SANITIZED_FLAG_NAME}") +@@ -62,28 +67,30 @@ foreach (flag ${MRAA_BOTH_WARNING_FLAGS} ${MRAA_C_WARNING_FLAGS}) + endif () + endforeach () + +-# Globally set C++ compiler warning flags that are supported and emit +-# a warning about unsupported flags +-foreach (flag ${MRAA_BOTH_WARNING_FLAGS} ${MRAA_CXX_WARNING_FLAGS}) +- MRAA_SANITIZE_FLAG_NAME (SANITIZED_FLAG_NAME "${flag}") +- CHECK_CXX_COMPILER_FLAG ("${flag}" HAS_CXX_${SANITIZED_FLAG_NAME}) +- if (HAS_CXX_${SANITIZED_FLAG_NAME}) +- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}") +- else () +- message (WARNING "C++ compiler does not support flag \"${flag}\"") +- endif () +-endforeach () +- +-# This function adds the c++11 flag to a c++ target (if supported) +-function(use_cxx_11 targetname) +- include(CheckCXXCompilerFlag) +- CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) +- if (COMPILER_SUPPORTS_CXX11) +- set_target_properties(${targetname} PROPERTIES COMPILE_FLAGS "-std=c++11") +- else() +- message(FATAL_ERROR "Target '${targetname}' requires c++11 which is not supported by this compiler") +- endif() +-endfunction() ++if (BUILDCPP) ++ # Globally set C++ compiler warning flags that are supported and emit ++ # a warning about unsupported flags ++ foreach (flag ${MRAA_BOTH_WARNING_FLAGS} ${MRAA_CXX_WARNING_FLAGS}) ++ MRAA_SANITIZE_FLAG_NAME (SANITIZED_FLAG_NAME "${flag}") ++ CHECK_CXX_COMPILER_FLAG ("${flag}" HAS_CXX_${SANITIZED_FLAG_NAME}) ++ if (HAS_CXX_${SANITIZED_FLAG_NAME}) ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}") ++ else () ++ message (WARNING "C++ compiler does not support flag \"${flag}\"") ++ endif () ++ endforeach () ++ ++ # This function adds the c++11 flag to a c++ target (if supported) ++ function(use_cxx_11 targetname) ++ include(CheckCXXCompilerFlag) ++ CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) ++ if (COMPILER_SUPPORTS_CXX11) ++ set_target_properties(${targetname} PROPERTIES COMPILE_FLAGS "-std=c++11") ++ else() ++ message(FATAL_ERROR "Target '${targetname}' requires c++11 which is not supported by this compiler") ++ endif() ++ endfunction() ++endif() + + # Set CMAKE_INSTALL_LIBDIR if not defined + include(GNUInstallDirs) +diff --git a/src/java/CMakeLists.txt b/src/java/CMakeLists.txt +index 231c755fa..cfa72a0df 100644 +--- a/src/java/CMakeLists.txt ++++ b/src/java/CMakeLists.txt +@@ -16,7 +16,9 @@ include_directories ( + set_source_files_properties (mraajava.i PROPERTIES SWIG_FLAGS ";-package;mraa;-I${CMAKE_BINARY_DIR}/src") + set_source_files_properties (mraajava.i PROPERTIES CPLUSPLUS ON) + +-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -DJAVACALLBACK") ++if (BUILDCPP) ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -DJAVACALLBACK") ++endif() + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DJAVACALLBACK") + + if (NOT DEFINED ENV{JAVA_HOME_NATIVE}) +diff --git a/src/javascript/CMakeLists.txt b/src/javascript/CMakeLists.txt +index 25fd36275..99a96b49d 100644 +--- a/src/javascript/CMakeLists.txt ++++ b/src/javascript/CMakeLists.txt +@@ -36,25 +36,27 @@ set_target_properties (mraajs PROPERTIES + ) + + message (STATUS "INFO - swig Version ${SWIG_VERSION}") +-message (STATUS "INFO - CXX compiler Version ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}") ++if (BUILDCPP) ++ message (STATUS "INFO - CXX compiler Version ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}") + +-if (${V8_VERSION_MAJOR} GREATER 3) +- message (STATUS "INFO - Using V8 version > 3 so requiring C++11 compiler") +- # Node 0.12.x V8 engine major version is '3'. +- # Node 2.1.0 V8 engine major version is '4'. +- set_property (TARGET mraajs PROPERTY CXX_STANDARD 11) +- set_property (TARGET mraajs PROPERTY CXX_STANDARD_REQUIRED ON) +- if (CMAKE_VERSION VERSION_LESS "3.1") +- message (WARNING "Need to use CMAKE version 3.1+, but it is ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}, using a workaround.") +- if (CMAKE_COMPILER_IS_GNUCXX) +- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7") +- message (FATAL_ERROR "GNU gcc compiler is also too old (need 4.7+, but ${CMAKE_CXX_COMPILER_VERSION}) and does not support C++11 standard.") ++ if (${V8_VERSION_MAJOR} GREATER 3) ++ message (STATUS "INFO - Using V8 version > 3 so requiring C++11 compiler") ++ # Node 0.12.x V8 engine major version is '3'. ++ # Node 2.1.0 V8 engine major version is '4'. ++ set_property (TARGET mraajs PROPERTY CXX_STANDARD 11) ++ set_property (TARGET mraajs PROPERTY CXX_STANDARD_REQUIRED ON) ++ if (CMAKE_VERSION VERSION_LESS "3.1") ++ message (WARNING "Need to use CMAKE version 3.1+, but it is ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}, using a workaround.") ++ if (CMAKE_COMPILER_IS_GNUCXX) ++ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7") ++ message (FATAL_ERROR "GNU gcc compiler is also too old (need 4.7+, but ${CMAKE_CXX_COMPILER_VERSION}) and does not support C++11 standard.") ++ endif () ++ set (MRAA_CXX11_WORKAROUND_OPTION "-std=gnu++11") ++ else () ++ set (MRAA_CXX11_WORKAROUND_OPTION "-std=c++11") + endif () +- set (MRAA_CXX11_WORKAROUND_OPTION "-std=gnu++11") +- else () +- set (MRAA_CXX11_WORKAROUND_OPTION "-std=c++11") ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MRAA_CXX11_WORKAROUND_OPTION} ") + endif () +- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MRAA_CXX11_WORKAROUND_OPTION} ") + endif () + endif () + diff --git a/package/mraa/Config.in b/package/mraa/Config.in index 745b235cb34..c845fe9f994 100644 --- a/package/mraa/Config.in +++ b/package/mraa/Config.in @@ -9,7 +9,6 @@ config BR2_PACKAGE_MRAA bool "mraa" depends on BR2_PACKAGE_MRAA_ARCH_SUPPORTS depends on !BR2_STATIC_LIBS - depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS help mraa is a C/C++ library with bindings to javascript & python @@ -19,7 +18,6 @@ config BR2_PACKAGE_MRAA http://iotdk.intel.com/docs/master/mraa -comment "mraa needs a toolchain w/ C++, threads, dynamic library" +comment "mraa needs a toolchain w/ threads, dynamic library" depends on BR2_PACKAGE_MRAA_ARCH_SUPPORTS - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ - || BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/mraa/mraa.mk b/package/mraa/mraa.mk index 89c539e793a..910339b3869 100644 --- a/package/mraa/mraa.mk +++ b/package/mraa/mraa.mk @@ -24,9 +24,10 @@ endif # USBPLAT only makes sense with FTDI4222, which requires the ftd2xx library, # which doesn't exist in buildroot - +# Disable C++ as it is used only by FTDI4222 and tests MRAA_CONF_OPTS += \ -DBUILDARCH=$(MRAA_ARCH) \ + -DBUILDCPP=OFF \ -DBUILDSWIG=OFF \ -DUSBPLAT=OFF \ -DFTDI4222=OFF \ diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk index 1186fa52d55..9f259b35d90 100644 --- a/package/mtd/mtd.mk +++ b/package/mtd/mtd.mk @@ -53,7 +53,7 @@ else MTD_CONF_OPTS += --without-xattr endif -HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-util-linux host-zstd +HOST_MTD_DEPENDENCIES = host-acl host-zlib host-lzo host-util-linux host-zstd HOST_MTD_CONF_OPTS = \ --with-jffs \ --with-ubifs \ diff --git a/package/musepack/0005-fix-build-with-gcc-10.patch b/package/musepack/0005-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..012dbab5423 --- /dev/null +++ b/package/musepack/0005-fix-build-with-gcc-10.patch @@ -0,0 +1,30 @@ +fix build with gcc 10 + +Define __Cc, __Dc and Res_bit as extern to avoid the following build +failure with gcc 10 (which defaults to -fno-common): + +/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: CMakeFiles/mpcdec_shared.dir/requant.o:(.rodata+0x0): multiple definition of `__Dc'; CMakeFiles/mpcdec_shared.dir/mpc_decoder.o:(.rodata+0x430): first defined here +/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: CMakeFiles/mpcdec_shared.dir/requant.o:(.rodata+0x28): multiple definition of `__Cc'; CMakeFiles/mpcdec_shared.dir/mpc_decoder.o:(.rodata+0x458): first defined here +/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: CMakeFiles/mpcdec_shared.dir/requant.o:(.rodata+0x74): multiple definition of `Res_bit'; CMakeFiles/mpcdec_shared.dir/mpc_decoder.o:(.rodata+0x4a4): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/9971da8c59484a6a26eb79d6e157461a47855dbf + +Signed-off-by: Fabrice Fontaine + +diff -Naur musepack_src_r475.orig/libmpcdec/requant.h musepack_src_r475/libmpcdec/requant.h +--- musepack_src_r475.orig/libmpcdec/requant.h 2020-09-10 08:31:50.696105246 +0200 ++++ musepack_src_r475/libmpcdec/requant.h 2020-09-10 08:32:52.944106476 +0200 +@@ -47,9 +47,9 @@ + + + /* C O N S T A N T S */ +-const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer +-const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients +-const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset ++extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer ++extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients ++extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset + + #define Cc (__Cc + 1) + #define Dc (__Dc + 1) diff --git a/package/neardal/0001-lib-neardal.h-fix-build-with-gcc-10.patch b/package/neardal/0001-lib-neardal.h-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..c9c4555022b --- /dev/null +++ b/package/neardal/0001-lib-neardal.h-fix-build-with-gcc-10.patch @@ -0,0 +1,35 @@ +From 08467411d7dfc2a2b7ede62e5fdc640748ea1db2 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 9 Sep 2020 19:14:52 +0200 +Subject: [PATCH] lib/neardal.h: fix build with gcc 10 + +Define neardal_output_cb as extern to avoid the following build failure +with gcc 10 (which defaults to -fno-common): + +/srv/storage/autobuild/run/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: ./.libs/neardal_adapter.o:(.bss+0x0): multiple definition of `neardal_output_cb'; ./.libs/neardal.o:(.bss+0x68): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/7efb100c899b67ffd570f73c202442f95ca5397e + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/connectivity/neardal/pull/10] +--- + lib/neardal.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/neardal.h b/lib/neardal.h +index d1cd18b..3e83595 100644 +--- a/lib/neardal.h ++++ b/lib/neardal.h +@@ -638,7 +638,7 @@ neardal_record *neardal_g_variant_to_record(GVariant *in); + + void neardal_trace(const char *func, FILE *fp, char *fmt, ...) + __attribute__((format(printf, 3, 4))); +-int (*neardal_output_cb)(FILE *fp, const char *fmt, va_list ap); ++extern int (*neardal_output_cb)(FILE *fp, const char *fmt, va_list ap); + + #ifdef __cplusplus + } +-- +2.28.0 + diff --git a/package/netatalk/0002-fix-ftbs-multiple-def-of-invalid_dircache_entries.patch b/package/netatalk/0002-fix-ftbs-multiple-def-of-invalid_dircache_entries.patch new file mode 100644 index 00000000000..e7ccc525538 --- /dev/null +++ b/package/netatalk/0002-fix-ftbs-multiple-def-of-invalid_dircache_entries.patch @@ -0,0 +1,25 @@ +From 32df6e155ccfc83216321925273c3e75e631ebe6 Mon Sep 17 00:00:00 2001 +From: Andrew Bauer +Date: Wed, 22 Jan 2020 09:59:47 -0600 +Subject: [PATCH] fix ftbs multiple def of invalid_dircache_entries + +[Retrieved from: +https://github.com/Netatalk/Netatalk/pull/125/commits/32df6e155ccfc83216321925273c3e75e631ebe6] +Signed-off-by: Fabrice Fontaine +--- + etc/afpd/directory.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/etc/afpd/directory.h b/etc/afpd/directory.h +index eb89c606..81bfa9cb 100644 +--- a/etc/afpd/directory.h ++++ b/etc/afpd/directory.h +@@ -91,7 +91,7 @@ struct maccess { + #define AR_UWRITE (1<<2) + #define AR_UOWN (1<<7) + +-q_t *invalid_dircache_entries; ++extern q_t *invalid_dircache_entries; + + typedef int (*dir_loop)(struct dirent *, char *, void *); + diff --git a/package/netperf/0001-src-nettest_omni.c-fix-compilation-with-GCC10.patch b/package/netperf/0001-src-nettest_omni.c-fix-compilation-with-GCC10.patch new file mode 100644 index 00000000000..261dfe9a0e6 --- /dev/null +++ b/package/netperf/0001-src-nettest_omni.c-fix-compilation-with-GCC10.patch @@ -0,0 +1,42 @@ +From b2fd0f324002d0cf52ae905b2a469bf1067f182a Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 5 Sep 2020 14:30:20 +0200 +Subject: [PATCH] src/nettest_omni.c: fix compilation with GCC10 + +GCC10 defaults to -fno-common, which breaks compilation when there are +multiple definitions of implicit "extern" variables. Remove the extra +definitions. + +Fix #42 + +Signed-off-by: Tony Ambardar +[Retrieved from: +https://github.com/openwrt/packages/blob/master/net/netperf/patches/010-gcc10_multiple_definition_fix.patch] +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/HewlettPackard/netperf/pull/48] +--- + src/nettest_omni.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/src/nettest_omni.c b/src/nettest_omni.c +index 852eeb1..862088a 100644 +--- a/src/nettest_omni.c ++++ b/src/nettest_omni.c +@@ -458,14 +458,6 @@ static int client_port_max = 65535; + + /* different options for the sockets */ + +-int +- loc_nodelay, /* don't/do use NODELAY locally */ +- rem_nodelay, /* don't/do use NODELAY remotely */ +- loc_sndavoid, /* avoid send copies locally */ +- loc_rcvavoid, /* avoid recv copies locally */ +- rem_sndavoid, /* avoid send copies remotely */ +- rem_rcvavoid; /* avoid recv_copies remotely */ +- + extern int + loc_tcpcork, + rem_tcpcork, +-- +2.28.0 + diff --git a/package/netsniff-ng/0001-mausezahn-remove-unused-MZ_SIZE_LONG_INT.patch b/package/netsniff-ng/0001-mausezahn-remove-unused-MZ_SIZE_LONG_INT.patch new file mode 100644 index 00000000000..b07682a76d1 --- /dev/null +++ b/package/netsniff-ng/0001-mausezahn-remove-unused-MZ_SIZE_LONG_INT.patch @@ -0,0 +1,41 @@ +From c6dd9abd8d7a5332d0c1078196528926054791ae Mon Sep 17 00:00:00 2001 +From: Tobias Klauser +Date: Mon, 15 Jun 2020 18:05:09 +0200 +Subject: [PATCH] mausezahn: remove unused MZ_SIZE_LONG_INT + +Signed-off-by: Tobias Klauser +[Retrieved from: +https://github.com/netsniff-ng/netsniff-ng/commit/c6dd9abd8d7a5332d0c1078196528926054791ae] +Signed-off-by: Fabrice Fontaine +--- + staging/mausezahn.c | 3 --- + staging/mz.h | 2 -- + 2 files changed, 5 deletions(-) + +diff --git a/staging/mausezahn.c b/staging/mausezahn.c +index 6c36166e..19d2937a 100644 +--- a/staging/mausezahn.c ++++ b/staging/mausezahn.c +@@ -192,9 +192,6 @@ int reset(void) + int i; + time_t t; + +- // Determine platform type sizes: +- MZ_SIZE_LONG_INT = sizeof(long int); +- + mz_default_config_path[0] = 0x00; + mz_default_log_path[0] = 0x00; + +diff --git a/staging/mz.h b/staging/mz.h +index 5afe57d1..c7a131d8 100644 +--- a/staging/mz.h ++++ b/staging/mz.h +@@ -108,8 +108,6 @@ static inline void verbose_l2(const char *format, ...) + #define IPADDRSIZE 46 + + +-int MZ_SIZE_LONG_INT; +- + char mz_default_config_path[256]; + char mz_default_log_path[256]; + diff --git a/package/netsniff-ng/0002-mausezahn-make-needlessly-global-variables-static.patch b/package/netsniff-ng/0002-mausezahn-make-needlessly-global-variables-static.patch new file mode 100644 index 00000000000..d944406f37f --- /dev/null +++ b/package/netsniff-ng/0002-mausezahn-make-needlessly-global-variables-static.patch @@ -0,0 +1,139 @@ +From bfa3c89317869ffe1e90b7e01e7cacad7a7ea10e Mon Sep 17 00:00:00 2001 +From: Tobias Klauser +Date: Thu, 13 Aug 2020 12:09:28 +0200 +Subject: [PATCH] mausezahn: make needlessly global variables static + +Move variables only used withing a single compilation unit from mz.h and +make them static. This avoids "multiple definition of symbol" linker +errors with gcc-10. + +Updates #216 + +Signed-off-by: Tobias Klauser +[Retrieved from: +https://github.com/netsniff-ng/netsniff-ng/commit/bfa3c89317869ffe1e90b7e01e7cacad7a7ea10e] +Signed-off-by: Fabrice Fontaine +--- + staging/dns.c | 2 ++ + staging/mz.h | 28 +--------------------------- + staging/rcv_rtp.c | 19 +++++++++++++++++++ + staging/rtp.c | 1 - + 4 files changed, 22 insertions(+), 28 deletions(-) + +diff --git a/staging/dns.c b/staging/dns.c +index bfa61d84..83227e25 100644 +--- a/staging/dns.c ++++ b/staging/dns.c +@@ -89,6 +89,8 @@ + "| arcount (or arc) ........... Number of RRs in additional records section 0 / 0\n" \ + "\n" + ++static u_int8_t gbuf[MAX_PAYLOAD_SIZE]; // This is only a generic global buffer to handover data more easily ++static u_int32_t gbuf_s; + + int dns_get_query (char* argval); + int dns_get_answer (char* argval); +diff --git a/staging/mz.h b/staging/mz.h +index c7a131d8..42e64cfc 100644 +--- a/staging/mz.h ++++ b/staging/mz.h +@@ -285,11 +285,6 @@ FILE *fp, *fp2; // global multipurpose file pointer + long double total_d; + clock_t mz_start, mz_stop; + +-enum rtp_display_mode { +- BAR, NCURSES, TEXT +-} rtp_dm; +- +- + int mz_rand; + int bwidth; + +@@ -298,14 +293,7 @@ struct mz_timestamp { + u_int32_t nsec; + }; + +-struct mz_timestamp +- tv, +- timeTX[TIME_COUNT_MAX], +- timeRX[TIME_COUNT_MAX]; +- + int32_t +- time0, +- jitter_rfc, + jitter[TIME_COUNT_MAX]; + + int +@@ -322,14 +310,8 @@ u_int16_t + sqnr_next; + + u_int32_t +- drop, // packet drop count +- dis, // packet disorder count + gind, // a global index to run through deltaRX, deltaTX, and jitter +- gind_max, // the amount of entries used in the (ugly oversized) arrays; per default set to TIME_COUNT +- gtotal; // counts number of file write cycles (see "got_rtp_packet()") +- +- +-char rtp_filter_str[64]; ++ gind_max; // the amount of entries used in the (ugly oversized) arrays; per default set to TIME_COUNT + + struct tx_struct + { +@@ -496,14 +478,6 @@ struct tx_struct + + } tx; // NOTE: tx elements are considered as default values for MOPS + +- +- +- +- +-u_int8_t gbuf[MAX_PAYLOAD_SIZE]; // This is only a generic global buffer to handover data more easily +-u_int32_t gbuf_s; // +- +- + // ************************************ + // + // Prototypes: General Tools +diff --git a/staging/rcv_rtp.c b/staging/rcv_rtp.c +index 0a911552..f43b92cd 100644 +--- a/staging/rcv_rtp.c ++++ b/staging/rcv_rtp.c +@@ -39,6 +39,25 @@ + #include "mz.h" + #include "mops.h" + ++static enum rtp_display_mode { ++ BAR, NCURSES, TEXT ++} rtp_dm; ++ ++static int32_t ++ time0, ++ jitter_rfc; ++ ++static struct mz_timestamp ++ timeTX[TIME_COUNT_MAX], ++ timeRX[TIME_COUNT_MAX]; ++ ++static u_int32_t ++ drop, // packet drop count ++ dis, // packet disorder count ++ gtotal; // counts number of file write cycles (see "got_rtp_packet()") ++ ++static char rtp_filter_str[64]; ++ + // Initialize the rcv_rtp process: Read user parameters and initialize globals + int rcv_rtp_init(void) + { +diff --git a/staging/rtp.c b/staging/rtp.c +index 54a195eb..da40884b 100644 +--- a/staging/rtp.c ++++ b/staging/rtp.c +@@ -56,7 +56,6 @@ + "|\n" + + +- + int create_rtp_packet(void) + { + u_int8_t byte1, byte2; diff --git a/package/netsniff-ng/0003-mausezahn-move-variable-definitions-cli-h-to-cli-c.patch b/package/netsniff-ng/0003-mausezahn-move-variable-definitions-cli-h-to-cli-c.patch new file mode 100644 index 00000000000..12662d78fc3 --- /dev/null +++ b/package/netsniff-ng/0003-mausezahn-move-variable-definitions-cli-h-to-cli-c.patch @@ -0,0 +1,77 @@ +From 0d5aa3246c20dad2d76165559fb575136b7216e8 Mon Sep 17 00:00:00 2001 +From: Tobias Klauser +Date: Wed, 19 Aug 2020 12:04:47 +0200 +Subject: [PATCH] mausezahn: move variable definitions cli.h to cli.c + +Move variable definitions to avoid "multiple definition of symbol" +linker errors with gcc-10. + +Updates #216 + +Signed-off-by: Tobias Klauser +[Retrieved from: +https://github.com/netsniff-ng/netsniff-ng/commit/0d5aa3246c20dad2d76165559fb575136b7216e8] +Signed-off-by: Fabrice Fontaine +--- + staging/cli.c | 13 +++++++++++++ + staging/cli.h | 20 ++++++++++---------- + 2 files changed, 23 insertions(+), 10 deletions(-) + +diff --git a/staging/cli.c b/staging/cli.c +index 5b5a1592..dbfdb550 100644 +--- a/staging/cli.c ++++ b/staging/cli.c +@@ -23,6 +23,19 @@ + #include "mops.h" + #include "llist.h" + ++struct cli_def *gcli; ++ ++char mz_username[32]; ++char mz_password[32]; ++char mz_enable[32]; ++char mz_listen_addr[16]; ++int mz_port; ++struct mops *clipkt; // actual packet used by CLI thread ++ ++int clidev; ++ ++int cli_debug; ++ + void mz_cli_init(void) + { + amp_head = automops_init(); +diff --git a/staging/cli.h b/staging/cli.h +index 1a0156fd..2ec153a0 100644 +--- a/staging/cli.h ++++ b/staging/cli.h +@@ -54,19 +54,19 @@ + #define MZ_DEFAULT_ENABLE_PASSWORD "mops" + #define MZ_DEFAULT_PORT 25542 // Towel day and 42 + +-struct cli_def *gcli; +- +-char mz_username[32]; +-char mz_password[32]; +-char mz_enable[32]; +-char mz_listen_addr[16]; +-int mz_port; +-struct mops *clipkt; // actual packet used by CLI thread ++extern struct cli_def *gcli; ++ ++extern char mz_username[32]; ++extern char mz_password[32]; ++extern char mz_enable[32]; ++extern char mz_listen_addr[16]; ++extern int mz_port; ++extern struct mops *clipkt; // actual packet used by CLI thread + +-int clidev; ++extern int clidev; + + // ================================================================= +-int cli_debug; ++extern int cli_debug; + + // Flags from 0x0000 to 0xFFFF + // cli_debug & 8000 => Developer specific debugs diff --git a/package/netsniff-ng/0004-mausezahn-move-variable-definitions-from-mops-h-to-mops-c.patch b/package/netsniff-ng/0004-mausezahn-move-variable-definitions-from-mops-h-to-mops-c.patch new file mode 100644 index 00000000000..834ee93a9b8 --- /dev/null +++ b/package/netsniff-ng/0004-mausezahn-move-variable-definitions-from-mops-h-to-mops-c.patch @@ -0,0 +1,69 @@ +From 3178ceb8c7e0a94ed29bbd1e277f03bb0d5a3d44 Mon Sep 17 00:00:00 2001 +From: Tobias Klauser +Date: Wed, 19 Aug 2020 12:58:51 +0200 +Subject: [PATCH] mausezahn: move variable definitions from mops.h to mops.c + +Move variable definitions to avoid "multiple definition of symbol" +linker errors with gcc-10. + +Updates #216 + +Signed-off-by: Tobias Klauser +[Retrieved from: +https://github.com/netsniff-ng/netsniff-ng/commit/3178ceb8c7e0a94ed29bbd1e277f03bb0d5a3d44] +Signed-off-by: Fabrice Fontaine +--- + staging/mops.c | 5 ++++- + staging/mops.h | 8 ++++---- + 2 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/staging/mops.c b/staging/mops.c +index 599d317f..fc00e29a 100644 +--- a/staging/mops.c ++++ b/staging/mops.c +@@ -46,8 +46,11 @@ + #include "mz.h" + #include "mops.h" + ++unsigned int min_frame_s; ++unsigned int max_frame_s; + +- ++struct automops * amp_head; ++struct mops *mp_head; // This global will point to the head of the mops list + + // Creates first element, aka "head" element + // This element can also be used! See mops_alloc_packet! +diff --git a/staging/mops.h b/staging/mops.h +index 96953e66..cf19f098 100644 +--- a/staging/mops.h ++++ b/staging/mops.h +@@ -114,8 +114,8 @@ + // These are initialized with the definitions MIN_MOPS_FRAME_SIZE and + // MAX_MOPS_FRAME_SIZE above but can be overridden by the user (without + // extending these limits) +-unsigned int min_frame_s; +-unsigned int max_frame_s; ++extern unsigned int min_frame_s; ++extern unsigned int max_frame_s; + + struct mops_counter + { +@@ -246,7 +246,7 @@ struct automops { + }; + + +-struct automops * amp_head; ++extern struct automops * amp_head; + + + struct mops +@@ -688,7 +688,7 @@ struct mops_ext_syslog //TODO + + ///////////////////////////////////////////////////////////////// + +-struct mops *mp_head; // This global will point to the head of the mops list ++extern struct mops *mp_head; // This global will point to the head of the mops list + + ///////////////////////////////////////////////////////////////// + // MOPS Prototypes: diff --git a/package/netsniff-ng/0005-mausezahn-move-variable-definitions-from-llist-h-to-llist-c.patch b/package/netsniff-ng/0005-mausezahn-move-variable-definitions-from-llist-h-to-llist-c.patch new file mode 100644 index 00000000000..99eba8e7da4 --- /dev/null +++ b/package/netsniff-ng/0005-mausezahn-move-variable-definitions-from-llist-h-to-llist-c.patch @@ -0,0 +1,47 @@ +From 6f20cd366ea73b8b9cf49568e9b95cd79922daed Mon Sep 17 00:00:00 2001 +From: Tobias Klauser +Date: Wed, 19 Aug 2020 13:13:34 +0200 +Subject: [PATCH] mausezahn: move variable definitions from llist.h to llist.c + +Move variable definitions to avoid "multiple definition of symbol" +linker errors with gcc-10. + +Updates #216 + +Signed-off-by: Tobias Klauser +[Retrieved from: +https://github.com/netsniff-ng/netsniff-ng/commit/6f20cd366ea73b8b9cf49568e9b95cd79922daed] +Signed-off-by: Fabrice Fontaine +--- + staging/llist.c | 2 ++ + staging/llist.h | 4 ++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/staging/llist.c b/staging/llist.c +index d729e465..9ef2d1a2 100644 +--- a/staging/llist.c ++++ b/staging/llist.c +@@ -40,6 +40,8 @@ + * + */ + ++struct mz_ll *packet_sequences; ++struct mz_ll *cli_seq; // currently edited packet sequence used by CLI + + // Create new list element - may be the first one (list==NULL) + // +diff --git a/staging/llist.h b/staging/llist.h +index 49a87c7d..d9e59b86 100644 +--- a/staging/llist.h ++++ b/staging/llist.h +@@ -49,8 +49,8 @@ struct mz_ll { + void *data; // points to your data + }; + +-struct mz_ll *packet_sequences; +-struct mz_ll *cli_seq; // currently edited packet sequence used by CLI ++extern struct mz_ll *packet_sequences; ++extern struct mz_ll *cli_seq; // currently edited packet sequence used by CLI + + // prototypes + struct mz_ll * mz_ll_create_new_element(struct mz_ll *list); diff --git a/package/netsniff-ng/0006-mausezahn-move-variable-definitions-from-mz-h-to-mausezahn-c.patch b/package/netsniff-ng/0006-mausezahn-move-variable-definitions-from-mz-h-to-mausezahn-c.patch new file mode 100644 index 00000000000..d8db7dffdd4 --- /dev/null +++ b/package/netsniff-ng/0006-mausezahn-move-variable-definitions-from-mz-h-to-mausezahn-c.patch @@ -0,0 +1,184 @@ +From 56f8f399a20275a4a73ebc4450bd8eeba7ee1656 Mon Sep 17 00:00:00 2001 +From: Tobias Klauser +Date: Wed, 19 Aug 2020 13:13:54 +0200 +Subject: [PATCH] mausezahn: move variable definitions from mz.h to mausezahn.c + +Move variable definitions to avoid "multiple definition of symbol" +linker errors with gcc-10. + +Fixes #216 + +Signed-off-by: Tobias Klauser +[Retrieved from: +https://github.com/netsniff-ng/netsniff-ng/commit/56f8f399a20275a4a73ebc4450bd8eeba7ee1656] +Signed-off-by: Fabrice Fontaine +--- + staging/mausezahn.c | 46 ++++++++++++++++++++++++++++++++++++++++ + staging/mz.h | 51 +++++++++++++++++++++++++-------------------- + 2 files changed, 74 insertions(+), 23 deletions(-) + +diff --git a/staging/mausezahn.c b/staging/mausezahn.c +index 19d2937a..cae57a1b 100644 +--- a/staging/mausezahn.c ++++ b/staging/mausezahn.c +@@ -32,8 +32,54 @@ + #include "die.h" + #include "dev.h" + ++enum operating_modes mode; ++ ++int ipv6_mode; ++int quiet; // don't even print 'important standard short messages' ++int verbose; // report character ++int simulate; // if 1 then don't really send frames ++ ++char path[256]; ++char filename[256]; ++FILE *fp, *fp2; // global multipurpose file pointer ++ ++long double total_d; ++clock_t mz_start, mz_stop; ++ ++int mz_rand; ++int bwidth; ++ ++int32_t ++ jitter[TIME_COUNT_MAX]; ++ ++int ++ rtp_log, ++ time0_flag, // If set then time0 has valid data ++ sqnr0_flag; ++ ++u_int8_t ++ mz_ssrc[4]; // holds RTP stream identifier for rcv_rtp() ++ ++u_int16_t ++ sqnr_cur, ++ sqnr_last, ++ sqnr_next; ++ ++u_int32_t ++ gind, // a global index to run through deltaRX, deltaTX, and jitter ++ gind_max; // the amount of entries used in the (ugly oversized) arrays; per default set to TIME_COUNT ++ ++struct tx_struct tx; // NOTE: tx elements are considered as default values for MOPS ++ ++struct device_struct device_list[MZ_MAX_DEVICES]; ++ ++int device_list_entries; ++ + int verbose_level = 0; + ++char mz_default_config_path[256]; ++char mz_default_log_path[256]; ++ + static const char *short_options = "46hqvVSxra:A:b:B:c:d:E:f:F:l:p:P:R:t:T:M:Q:X:"; + + static void signal_handler(int number) +diff --git a/staging/mz.h b/staging/mz.h +index 42e64cfc..33e74e60 100644 +--- a/staging/mz.h ++++ b/staging/mz.h +@@ -108,8 +108,8 @@ static inline void verbose_l2(const char *format, ...) + #define IPADDRSIZE 46 + + +-char mz_default_config_path[256]; +-char mz_default_log_path[256]; ++extern char mz_default_config_path[256]; ++extern char mz_default_log_path[256]; + + + struct arp_table_struct { +@@ -159,9 +159,11 @@ struct device_struct + struct pcap *p_arp; // pcap handle + struct arp_table_struct *arp_table; // dedicated ARP table + int ps; // packet socket +-} device_list[MZ_MAX_DEVICES]; ++}; ++ ++extern struct device_struct device_list[MZ_MAX_DEVICES]; + +-int device_list_entries; ++extern int device_list_entries; + + + #pragma pack(1) +@@ -270,46 +272,47 @@ enum operating_modes + SYSLOG, + LLDP, + IGMP +-} mode; ++}; + ++extern enum operating_modes mode; + +-int ipv6_mode; +-int quiet; // don't even print 'important standard short messages' +-int verbose; // report character +-int simulate; // if 1 then don't really send frames ++extern int ipv6_mode; ++extern int quiet; // don't even print 'important standard short messages' ++extern int verbose; // report character ++extern int simulate; // if 1 then don't really send frames + +-char path[256]; +-char filename[256]; +-FILE *fp, *fp2; // global multipurpose file pointer ++extern char path[256]; ++extern char filename[256]; ++extern FILE *fp, *fp2; // global multipurpose file pointer + +-long double total_d; +-clock_t mz_start, mz_stop; ++extern long double total_d; ++extern clock_t mz_start, mz_stop; + +-int mz_rand; +-int bwidth; ++extern int mz_rand; ++extern int bwidth; + + struct mz_timestamp { + u_int32_t sec; + u_int32_t nsec; + }; + +-int32_t +- jitter[TIME_COUNT_MAX]; ++extern int32_t ++ jitter[TIME_COUNT_MAX]; + +-int ++extern int + rtp_log, + time0_flag, // If set then time0 has valid data + sqnr0_flag; + +-u_int8_t ++extern u_int8_t + mz_ssrc[4]; // holds RTP stream identifier for rcv_rtp() + +-u_int16_t ++extern u_int16_t + sqnr_cur, + sqnr_last, + sqnr_next; + +-u_int32_t ++extern u_int32_t + gind, // a global index to run through deltaRX, deltaTX, and jitter + gind_max; // the amount of entries used in the (ugly oversized) arrays; per default set to TIME_COUNT + +@@ -476,7 +479,9 @@ struct tx_struct + rtp_sqnr, + rtp_stmp; + +-} tx; // NOTE: tx elements are considered as default values for MOPS ++}; ++ ++extern struct tx_struct tx; // NOTE: tx elements are considered as default values for MOPS + + // ************************************ + // diff --git a/package/nginx/nginx.service b/package/nginx/nginx.service index 320df9a80e1..9fd215fd3e6 100644 --- a/package/nginx/nginx.service +++ b/package/nginx/nginx.service @@ -4,7 +4,7 @@ After=syslog.target network.target [Service] Type=forking -PIDFile=/var/run/nginx.pid +PIDFile=/run/nginx.pid ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;' ExecStart=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;' diff --git a/package/nodejs/nodejs.hash b/package/nodejs/nodejs.hash index 60d69a86381..33fb4078827 100644 --- a/package/nodejs/nodejs.hash +++ b/package/nodejs/nodejs.hash @@ -1,5 +1,5 @@ -# From https://nodejs.org/dist/v12.18.0/SHASUMS256.txt -sha256 d4688636a378367f5157f02bd5c13902f5c193356f8f7a35c99dfa383b03b13f node-v12.18.0.tar.xz +# From https://nodejs.org/dist/v12.18.4/SHASUMS256.txt +sha256 25f03cb18e53b6d0959d0c219e701a85eb4693f526bdda7c72bc6199b364f609 node-v12.18.4.tar.xz # Hash for license file -sha256 cd2e5817a25d7d28efba927b01056cae04a616b673014159f9eafeb008a0e747 LICENSE +sha256 0dc03af08b95ea0c1e27f8fd591dee4383eb6f2c304db6eb6cdfb6751f7da87b LICENSE diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk index e384d4c8a0f..b159b102537 100644 --- a/package/nodejs/nodejs.mk +++ b/package/nodejs/nodejs.mk @@ -4,7 +4,7 @@ # ################################################################################ -NODEJS_VERSION = 12.18.0 +NODEJS_VERSION = 12.18.4 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) NODEJS_DEPENDENCIES = host-python host-nodejs c-ares \ diff --git a/package/nss-pam-ldapd/nslcd.service b/package/nss-pam-ldapd/nslcd.service index 6c0d71b241a..5a000a8e4c1 100644 --- a/package/nss-pam-ldapd/nslcd.service +++ b/package/nss-pam-ldapd/nslcd.service @@ -4,7 +4,7 @@ After=syslog.target network.target [Service] Type=forking -PIDFile=/var/run/nslcd/nslcd.pid +PIDFile=/run/nslcd/nslcd.pid ExecStart=/usr/sbin/nslcd [Install] diff --git a/package/nvidia-container-runtime/Config.in b/package/nvidia-container-runtime/Config.in new file mode 100644 index 00000000000..c029002149e --- /dev/null +++ b/package/nvidia-container-runtime/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_NVIDIA_CONTAINER_RUNTIME + bool "nvidia-container-runtime" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC # fexecve + help + NVIDIA Container Runtime is a fork of runc which adds + support for mounting GPUs into containers. + + https://github.com/NVIDIA/nvidia-container-runtime + +comment "nvidia-container-runtime needs a glibc toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS && \ + BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAN_USES_GLIBC diff --git a/package/nvidia-container-runtime/config.toml b/package/nvidia-container-runtime/config.toml new file mode 100644 index 00000000000..21ee9a22b5f --- /dev/null +++ b/package/nvidia-container-runtime/config.toml @@ -0,0 +1,20 @@ +# see below: +# https://raw.githubusercontent.com/NVIDIA/nvidia-container-toolkit/master/config/config.toml.debian + +disable-require = false +#swarm-resource = "DOCKER_RESOURCE_GPU" + +[nvidia-container-cli] +#root = "/run/nvidia/driver" +#path = "/usr/bin/nvidia-container-cli" +environment = [] +#debug = "/var/log/nvidia-container-toolkit.log" +#ldcache = "/etc/ld.so.cache" +load-kmods = true +#no-cgroups = false +#user = "root:video" +ldconfig = "@/sbin/ldconfig" +#alpha-merge-visible-devices-envvars = false + +[nvidia-container-runtime] +#debug = "/var/log/nvidia-container-runtime.log" diff --git a/package/nvidia-container-runtime/daemon.json b/package/nvidia-container-runtime/daemon.json new file mode 100644 index 00000000000..bc01c904ce5 --- /dev/null +++ b/package/nvidia-container-runtime/daemon.json @@ -0,0 +1,12 @@ +{ + "experimental": true, + "exec-opts": [ + "native.cgroupdriver=systemd" + ], + "runtimes": { + "nvidia": { + "runtimeArgs": [], + "path": "/usr/bin/nvidia-container-runtime" + } + } +} diff --git a/package/nvidia-container-runtime/nvidia-container-runtime.hash b/package/nvidia-container-runtime/nvidia-container-runtime.hash new file mode 100644 index 00000000000..38d46632762 --- /dev/null +++ b/package/nvidia-container-runtime/nvidia-container-runtime.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 c3a2bb76ae1893499e81388e43b791a90c9bced52c473378bbe4333e07604439 nvidia-container-runtime-3.3.0.tar.gz +sha256 552a739c3b25792263f731542238b92f6f8d07e9a488eae27e6c4690038a8243 LICENSE diff --git a/package/nvidia-container-runtime/nvidia-container-runtime.mk b/package/nvidia-container-runtime/nvidia-container-runtime.mk new file mode 100644 index 00000000000..a1d785e20a9 --- /dev/null +++ b/package/nvidia-container-runtime/nvidia-container-runtime.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# nvidia-container-runtime +# +################################################################################ + +NVIDIA_CONTAINER_RUNTIME_VERSION = 3.3.0 +NVIDIA_CONTAINER_RUNTIME_SITE = $(call github,NVIDIA,nvidia-container-runtime,v$(NVIDIA_CONTAINER_RUNTIME_VERSION)) +NVIDIA_CONTAINER_RUNTIME_LICENSE = Apache-2.0 +NVIDIA_CONTAINER_RUNTIME_LICENSE_FILES = LICENSE + +NVIDIA_CONTAINER_RUNTIME_LDFLAGS = -X main.gitCommit=$(NVIDIA_CONTAINER_RUNTIME_VERSION) +NVIDIA_CONTAINER_RUNTIME_TAGS = cgo static_build + +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) +NVIDIA_CONTAINER_RUNTIME_TAGS += seccomp +NVIDIA_CONTAINER_RUNTIME_DEPENDENCIES += libseccomp host-pkgconf +endif + +NVIDIA_CONTAINER_RUNTIME_GOMOD = github.com/NVIDIA/nvidia-container-runtime +NVIDIA_CONTAINER_RUNTIME_BUILD_TARGETS = src +NVIDIA_CONTAINER_RUNTIME_BIN_NAME = nvidia-container-runtime + +define NVIDIA_CONTAINER_RUNTIME_INSTALL_SUPPORT + $(INSTALL) -D -m 644 $(NVIDIA_CONTAINER_RUNTIME_PKGDIR)/config.toml \ + $(TARGET_DIR)/etc/nvidia-container-runtime/config.toml + $(INSTALL) -D -m 644 $(NVIDIA_CONTAINER_RUNTIME_PKGDIR)/daemon.json \ + $(TARGET_DIR)/etc/docker/daemon.json +endef + +NVIDIA_CONTAINER_RUNTIME_POST_INSTALL_TARGET_HOOKS += NVIDIA_CONTAINER_RUNTIME_INSTALL_SUPPORT + +$(eval $(golang-package)) diff --git a/package/nvidia-container-toolkit/Config.in b/package/nvidia-container-toolkit/Config.in new file mode 100644 index 00000000000..ff75b152a2b --- /dev/null +++ b/package/nvidia-container-toolkit/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_NVIDIA_CONTAINER_TOOLKIT + bool "nvidia-container-toolkit" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC # fexecve + select BR2_PACKAGE_LIBNVIDIA_CONTAINER + select BR2_PACKAGE_NVIDIA_CONTAINER_RUNTIME + help + NVIDIA Container Toolkit is a OCI-spec hook for + support for mounting GPUs into containers. + + https://github.com/NVIDIA/nvidia-container-toolkit + +comment "nvidia-container-toolkit needs a glibc toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS && \ + BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAN_USES_GLIBC diff --git a/package/nvidia-container-toolkit/nvidia-container-toolkit.hash b/package/nvidia-container-toolkit/nvidia-container-toolkit.hash new file mode 100644 index 00000000000..6473e8bb81e --- /dev/null +++ b/package/nvidia-container-toolkit/nvidia-container-toolkit.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 f386cba53b818e557583a18e7d84a6772d2eb1fa32778854557f7a210f44153e nvidia-container-toolkit-1.2.1.tar.gz +sha256 552a739c3b25792263f731542238b92f6f8d07e9a488eae27e6c4690038a8243 LICENSE diff --git a/package/nvidia-container-toolkit/nvidia-container-toolkit.mk b/package/nvidia-container-toolkit/nvidia-container-toolkit.mk new file mode 100644 index 00000000000..e9cbe6a0575 --- /dev/null +++ b/package/nvidia-container-toolkit/nvidia-container-toolkit.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# nvidia-container-toolkit +# +################################################################################ + +NVIDIA_CONTAINER_TOOLKIT_VERSION = 1.2.1 +NVIDIA_CONTAINER_TOOLKIT_SITE = $(call github,NVIDIA,nvidia-container-toolkit,v$(NVIDIA_CONTAINER_TOOLKIT_VERSION)) + +NVIDIA_CONTAINER_TOOLKIT_LICENSE = Apache-2.0 +NVIDIA_CONTAINER_TOOLKIT_LICENSE_FILES = LICENSE + +NVIDIA_CONTAINER_TOOLKIT_DEPENDENCIES = nvidia-container-runtime libnvidia-container + +NVIDIA_CONTAINER_TOOLKIT_GOMOD = github.com/NVIDIA/container-toolkit +NVIDIA_CONTAINER_TOOLKIT_BUILD_TARGETS = pkg +NVIDIA_CONTAINER_TOOLKIT_BIN_NAME = nvidia-container-toolkit +NVIDIA_CONTAINER_TOOLKIT_TAGS = cgo static_build + +define NVIDIA_CONTAINER_TOOLKIT_INSTALL_SUPPORT + ln -fs /usr/bin/$(NVIDIA_CONTAINER_TOOLKIT_BIN_NAME) \ + $(TARGET_DIR)/usr/bin/nvidia-container-runtime-hook + $(INSTALL) -D -m 644 $(@D)/oci-nvidia-hook.json \ + $(TARGET_DIR)/usr/share/containers/oci/hooks.d/oci-nvidia-hook.json + $(INSTALL) -D -m 755 $(@D)/oci-nvidia-hook \ + $(TARGET_DIR)/usr/libexec/oci/hooks.d/oci-nvidia-hook +endef + +NVIDIA_CONTAINER_TOOLKIT_POST_INSTALL_TARGET_HOOKS += NVIDIA_CONTAINER_TOOLKIT_INSTALL_SUPPORT + +$(eval $(golang-package)) diff --git a/package/nvidia-driver/0001-Add-ignore-CC-mismatch-unconditonally-to-conftest.patch b/package/nvidia-driver/0001-Add-ignore-CC-mismatch-unconditonally-to-conftest.patch new file mode 100644 index 00000000000..8b0d1fed1cd --- /dev/null +++ b/package/nvidia-driver/0001-Add-ignore-CC-mismatch-unconditonally-to-conftest.patch @@ -0,0 +1,25 @@ +From c4233ad92256006f7db42efe7cdaf08079d74977 Mon Sep 17 00:00:00 2001 +From: Christian Stewart +Date: Sat, 22 Aug 2020 23:58:51 -0700 +Subject: [PATCH] Add ignore CC mismatch unconditonally to conftest + +Signed-off-by: Christian Stewart +--- + kernel/conftest.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/kernel/conftest.sh b/kernel/conftest.sh +index a4ebf81..4ad452e 100755 +--- a/kernel/conftest.sh ++++ b/kernel/conftest.sh +@@ -3882,6 +3882,7 @@ case "$5" in + IGNORE_CC_MISMATCH=1 + fi + ++ IGNORE_CC_MISMATCH=1 + if [ -n "$IGNORE_CC_MISMATCH" ]; then + exit 0 + fi +-- +2.28.0 + diff --git a/package/nvidia-driver/Config.in b/package/nvidia-driver/Config.in index 9631b3e70c4..6e941a82003 100644 --- a/package/nvidia-driver/Config.in +++ b/package/nvidia-driver/Config.in @@ -14,6 +14,9 @@ config BR2_PACKAGE_NVIDIA_DRIVER if BR2_PACKAGE_NVIDIA_DRIVER +config BR2_PACKAGE_NVIDIA_DRIVER_ALPHA + bool "Use latest alpha version" + comment "nvidia-driver X.org drivers needs a modular Xorg server" depends on !BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR diff --git a/package/nvidia-driver/nvidia-driver.hash b/package/nvidia-driver/nvidia-driver.hash index 79ac052610d..a961a2b30f9 100644 --- a/package/nvidia-driver/nvidia-driver.hash +++ b/package/nvidia-driver/nvidia-driver.hash @@ -1,4 +1,5 @@ # Locally computed -sha256 6f4af70ee3d03ed31c497a5d555164c56057b53ecedfc0d2c8de4b0b90728805 NVIDIA-Linux-x86-390.67.run -sha256 6df2ca1a7420b6751bcaf257d321b14f4e5f7ca54d77a43514912a3792ece65a NVIDIA-Linux-x86_64-390.67.run +sha256 7bf67323a393e857a09f979f155baa1ed13183653add0c344edf4d409f977878 NVIDIA-Linux-x86-390.138.run +sha256 d50c77fc4fda2a5c5ab2af64524da8a3214077bd7daf0dbf7c1986e0ca05d711 NVIDIA-Linux-x86_64-450.57.run +sha256 e4e1499b15aedc7c0b5c0d30c170858ed1625ab2701d3bb11747ac8c8371da0f NVIDIA-Linux-x86_64-455.28.run sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526 LICENSE diff --git a/package/nvidia-driver/nvidia-driver.mk b/package/nvidia-driver/nvidia-driver.mk index 44e34cb7b46..3b224b5f142 100644 --- a/package/nvidia-driver/nvidia-driver.mk +++ b/package/nvidia-driver/nvidia-driver.mk @@ -4,8 +4,18 @@ # ################################################################################ -NVIDIA_DRIVER_VERSION = 390.67 -NVIDIA_DRIVER_SUFFIX = $(if $(BR2_x86_64),_64) +NVIDIA_DRIVER_VERSION = 450.57 + +ifeq ($(BR2_x86_64),y) +NVIDIA_DRIVER_SUFFIX = _64 +else +NVIDIA_DRIVER_VERSION = 390.138 +endif # BR2_x86_64 + +ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_ALPHA),y) +NVIDIA_DRIVER_VERSION = 455.28 +endif + NVIDIA_DRIVER_SITE = http://download.nvidia.com/XFree86/Linux-x86$(NVIDIA_DRIVER_SUFFIX)/$(NVIDIA_DRIVER_VERSION) NVIDIA_DRIVER_SOURCE = NVIDIA-Linux-x86$(NVIDIA_DRIVER_SUFFIX)-$(NVIDIA_DRIVER_VERSION).run NVIDIA_DRIVER_LICENSE = NVIDIA Software License diff --git a/package/nvidia-modprobe/Config.in b/package/nvidia-modprobe/Config.in new file mode 100644 index 00000000000..35953a33d48 --- /dev/null +++ b/package/nvidia-modprobe/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_NVIDIA_MODPROBE + bool "nvidia-modprobe" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC + help + nvidia-modprobe package adds a utility and headers for + probing the NVIDIA hardware at runtime. + + https://github.com/NVIDIA/nvidia-modprobe + +comment "nvidia-modprobe needs a glibc toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAN_USES_GLIBC diff --git a/package/nvidia-modprobe/nvidia-modprobe.hash b/package/nvidia-modprobe/nvidia-modprobe.hash new file mode 100644 index 00000000000..99908680f00 --- /dev/null +++ b/package/nvidia-modprobe/nvidia-modprobe.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 396b4102d3075a2dee3024652fae206a1b38ace54b8efb1e2c20757a11ec19f1 nvidia-modprobe-450.57.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/nvidia-modprobe/nvidia-modprobe.mk b/package/nvidia-modprobe/nvidia-modprobe.mk new file mode 100644 index 00000000000..7eeee6716cf --- /dev/null +++ b/package/nvidia-modprobe/nvidia-modprobe.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# nvidia-modprobe +# +################################################################################ + +NVIDIA_MODPROBE_VERSION = 450.57 +NVIDIA_MODPROBE_SITE = $(call github,NVIDIA,nvidia-modprobe,$(NVIDIA_MODPROBE_VERSION)) +NVIDIA_MODPROBE_LICENSE = GPL-2 +NVIDIA_MODPROBE_LICENSE_FILES = COPYING + +NVIDIA_MODPROBE_DEPENDENCIES = host-pkgconf +NVIDIA_MODPROBE_INSTALL_STAGING = YES + +define NVIDIA_MODPROBE_BUILD_CMDS + mkdir -p $(@D)/bin + $(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + -I $(@D)/common-utils -I $(@D)/modprobe-utils \ + -o $(@D)/bin/nvidia-modprobe \ + -DNV_LINUX=true -DPROGRAM_NAME=\"nvidia-modprobe\" \ + -DNVIDIA_VERSION=\"$(NVIDIA_MODPROBE_VERSION)\" \ + $(@D)/nvidia-modprobe.c $(@D)/modprobe-utils/nvidia-modprobe-utils.c \ + $(@D)/modprobe-utils/pci-sysfs.c $(@D)/common-utils/common-utils.c \ + $(@D)/common-utils/msg.c $(@D)/common-utils/nvgetopt.c +endef + +define NVIDIA_MODPROBE_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/modprobe-utils/nvidia-modprobe-utils.h \ + $(STAGING_DIR)/usr/include/nvidia-modprobe-utils/nvidia-modprobe-utils.h + $(INSTALL) -D -m 644 $(@D)/modprobe-utils/pci-enum.h \ + $(STAGING_DIR)/usr/include/nvidia-modprobe-utils/pci-enum.h + $(INSTALL) -D -m 644 $(@D)/common-utils/common-utils.h \ + $(STAGING_DIR)/usr/include/nvidia-modprobe-utils/nvidia-common-utils.h + $(INSTALL) -D -m 644 $(@D)/common-utils/msg.h \ + $(STAGING_DIR)/usr/include/nvidia-modprobe-utils/msg.h + $(INSTALL) -D -m 644 $(@D)/common-utils/nvgetopt.h \ + $(STAGING_DIR)/usr/include/nvidia-modprobe-utils/nvgetopt.h +endef + +define NVIDIA_MODPROBE_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/bin/nvidia-modprobe \ + $(TARGET_DIR)/usr/bin/nvidia-modprobe +endef + +$(eval $(generic-package)) diff --git a/package/open-plc-utils/0002-plc-plc.h-fix-build-with-gcc-10.patch b/package/open-plc-utils/0002-plc-plc.h-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..063bfc536cf --- /dev/null +++ b/package/open-plc-utils/0002-plc-plc.h-fix-build-with-gcc-10.patch @@ -0,0 +1,37 @@ +From 27222be0b8db59cae30a5fcca93255daea147bb6 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 23 Sep 2020 19:05:23 +0200 +Subject: [PATCH] plc/plc.h: fix build with gcc 10 + +Drop plcproperty from plc/plc.h to avoid the following build failure +with gcc 10 (which defaults to -fno-common): + +/home/buildroot/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: rules.o:(.bss+0x0): multiple definition of `plcproperty'; pibruin.o:(.bss+0x0): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/6b3064b64dea3d4aaf219f787429c25918101483 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/qca/open-plc-utils/pull/141] +--- + plc/plc.h | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/plc/plc.h b/plc/plc.h +index 1fa32b53..208cf91a 100644 +--- a/plc/plc.h ++++ b/plc/plc.h +@@ -496,9 +496,7 @@ struct __packed plcproperty + uint8_t DATA_FORMAT; + uint32_t DATA_LENGTH; + uint8_t DATA_BUFFER [128]; +-} +- +-plcproperty; ++}; + + #ifndef __GNUC__ + #pragma pack (pop) +-- +2.28.0 + diff --git a/package/openswan/0001-fix-build-with-gcc-10.patch b/package/openswan/0001-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..eb474b56aa3 --- /dev/null +++ b/package/openswan/0001-fix-build-with-gcc-10.patch @@ -0,0 +1,49 @@ +From 3324d5ab1d00920ea46f453240da1356e0639e98 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Thu, 24 Sep 2020 21:55:31 +0200 +Subject: [PATCH] fix build with gcc 10 + +Define kw_host_list and kw_connaddrfamily_list as extern to avoid the following +build failure with gcc 10 (which defaults to -fno-common): + +/home/peko/autobuild/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: initiate.o:/home/peko/autobuild/instance-1/output-1/build/openswan-2.6.51.5/include/pluto_constants.h:650: multiple definition of `kw_host_list'; connections.o:/home/peko/autobuild/instance-1/output-1/build/openswan-2.6.51.5/include/pluto_constants.h:650: first defined here + +Fixes: + - http://autobuild.buildroot.org/results/650fc0046fd063c70e17ce5ebd9592195657434d + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/xelerance/Openswan/pull/444] +--- + include/ipsecconf/keywords.h | 2 +- + include/pluto_constants.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/ipsecconf/keywords.h b/include/ipsecconf/keywords.h +index e32be7968..02e8e073e 100644 +--- a/include/ipsecconf/keywords.h ++++ b/include/ipsecconf/keywords.h +@@ -314,7 +314,7 @@ struct config_parsed { + bool got_default; + }; + +-const struct keyword_enum_values kw_connaddrfamily_list; ++extern const struct keyword_enum_values kw_connaddrfamily_list; + + extern struct keyword_def ipsec_conf_keywords_v2[]; + extern const int ipsec_conf_keywords_v2_count; +diff --git a/include/pluto_constants.h b/include/pluto_constants.h +index c35dd9576..dcbd3b5b4 100644 +--- a/include/pluto_constants.h ++++ b/include/pluto_constants.h +@@ -665,7 +665,7 @@ enum keyword_host { + KH_IPADDR = LOOSE_ENUM_OTHER, + }; + /* keyword_name(&kw_host_list, type, buffer[KEYWORD_NAME_BUFLEN]) */ +-struct keyword_enum_values kw_host_list; ++extern struct keyword_enum_values kw_host_list; + #define KH_ISWILDCARD(type) ((type) == KH_ANY || (type) == KH_DEFAULTROUTE) + #define KH_ISKNOWNADDR(type) ((type) == KH_IPADDR || (type)==KH_IFACE) + +-- +2.28.0 + diff --git a/package/opentyrian/0001-Move-definitions-that-don-t-need-to-be-exposed-from-opl-h-to-opl-c.patch b/package/opentyrian/0001-Move-definitions-that-don-t-need-to-be-exposed-from-opl-h-to-opl-c.patch new file mode 100644 index 00000000000..f41758ce307 --- /dev/null +++ b/package/opentyrian/0001-Move-definitions-that-don-t-need-to-be-exposed-from-opl-h-to-opl-c.patch @@ -0,0 +1,365 @@ +From 962ee8fc46ca51691bde1c8c1022dacbe8a037ed Mon Sep 17 00:00:00 2001 +From: Carl Reinke +Date: Sun, 14 Jun 2020 14:11:00 -0600 +Subject: [PATCH] Move definitions that don't need to be exposed from opl.h to + opl.c + +[Retrieved from: +https://github.com/opentyrian/opentyrian/commit/962ee8fc46ca51691bde1c8c1022dacbe8a037ed] +Signed-off-by: Fabrice Fontaine +--- + src/opl.c | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++- + src/opl.h | 157 ++---------------------------------------------------- + 2 files changed, 154 insertions(+), 156 deletions(-) + +diff --git a/src/opl.c b/src/opl.c +index a4071c5..f15474c 100644 +--- a/src/opl.c ++++ b/src/opl.c +@@ -23,12 +23,161 @@ + * Copyright (C) 1998-2001 Ken Silverman + * Ken Silverman's official web site: "http://www.advsys.net/ken" + */ +- ++#include "opl.h" + + #include ++#include + #include // rand() + #include // memset() +-#include "opl.h" ++ ++#define fltype double ++ ++ /* ++ define attribution that inlines/forces inlining of a function (optional) ++ */ ++#define OPL_INLINE inline ++ ++ ++#undef NUM_CHANNELS ++#if defined(OPLTYPE_IS_OPL3) ++#define NUM_CHANNELS 18 ++#else ++#define NUM_CHANNELS 9 ++#endif ++ ++#define MAXOPERATORS (NUM_CHANNELS*2) ++ ++ ++#define FL05 ((fltype)0.5) ++#define FL2 ((fltype)2.0) ++#define PI ((fltype)3.1415926535897932384626433832795) ++ ++ ++#define FIXEDPT 0x10000 // fixed-point calculations using 16+16 ++#define FIXEDPT_LFO 0x1000000 // fixed-point calculations using 8+24 ++ ++#define WAVEPREC 1024 // waveform precision (10 bits) ++ ++#define INTFREQU ((fltype)(14318180.0 / 288.0)) // clocking of the chip ++ ++ ++#define OF_TYPE_ATT 0 ++#define OF_TYPE_DEC 1 ++#define OF_TYPE_REL 2 ++#define OF_TYPE_SUS 3 ++#define OF_TYPE_SUS_NOKEEP 4 ++#define OF_TYPE_OFF 5 ++ ++#define ARC_CONTROL 0x00 ++#define ARC_TVS_KSR_MUL 0x20 ++#define ARC_KSL_OUTLEV 0x40 ++#define ARC_ATTR_DECR 0x60 ++#define ARC_SUSL_RELR 0x80 ++#define ARC_FREQ_NUM 0xa0 ++#define ARC_KON_BNUM 0xb0 ++#define ARC_PERC_MODE 0xbd ++#define ARC_FEEDBACK 0xc0 ++#define ARC_WAVE_SEL 0xe0 ++ ++#define ARC_SECONDSET 0x100 // second operator set for OPL3 ++ ++ ++#define OP_ACT_OFF 0x00 ++#define OP_ACT_NORMAL 0x01 // regular channel activated (bitmasked) ++#define OP_ACT_PERC 0x02 // percussion channel activated (bitmasked) ++ ++#define BLOCKBUF_SIZE 512 ++ ++ ++ // vibrato constants ++#define VIBTAB_SIZE 8 ++#define VIBFAC 70/50000 // no braces, integer mul/div ++ ++ // tremolo constants and table ++#define TREMTAB_SIZE 53 ++#define TREM_FREQ ((fltype)(3.7)) // tremolo at 3.7hz ++ ++ ++ /* operator struct definition ++ For OPL2 all 9 channels consist of two operators each, carrier and modulator. ++ Channel x has operators x as modulator and operators (9+x) as carrier. ++ For OPL3 all 18 channels consist either of two operators (2op mode) or four ++ operators (4op mode) which is determined through register4 of the second ++ adlib register set. ++ Only the channels 0,1,2 (first set) and 9,10,11 (second set) can act as ++ 4op channels. The two additional operators for a channel y come from the ++ 2op channel y+3 so the operatorss y, (9+y), y+3, (9+y)+3 make up a 4op ++ channel. ++ */ ++typedef struct operator_struct { ++ Bit32s cval, lastcval; // current output/last output (used for feedback) ++ Bit32u tcount, wfpos, tinc; // time (position in waveform) and time increment ++ fltype amp, step_amp; // and amplification (envelope) ++ fltype vol; // volume ++ fltype sustain_level; // sustain level ++ Bit32s mfbi; // feedback amount ++ fltype a0, a1, a2, a3; // attack rate function coefficients ++ fltype decaymul, releasemul; // decay/release rate functions ++ Bit32u op_state; // current state of operator (attack/decay/sustain/release/off) ++ Bit32u toff; ++ Bit32s freq_high; // highest three bits of the frequency, used for vibrato calculations ++ Bit16s* cur_wform; // start of selected waveform ++ Bit32u cur_wmask; // mask for selected waveform ++ Bit32u act_state; // activity state (regular, percussion) ++ bool sus_keep; // keep sustain level when decay finished ++ bool vibrato,tremolo; // vibrato/tremolo enable bits ++ ++ // variables used to provide non-continuous envelopes ++ Bit32u generator_pos; // for non-standard sample rates we need to determine how many samples have passed ++ Bits cur_env_step; // current (standardized) sample position ++ Bits env_step_a,env_step_d,env_step_r; // number of std samples of one step (for attack/decay/release mode) ++ Bit8u step_skip_pos_a; // position of 8-cyclic step skipping (always 2^x to check against mask) ++ Bits env_step_skip_a; // bitmask that determines if a step is skipped (respective bit is zero then) ++ ++#if defined(OPLTYPE_IS_OPL3) ++ bool is_4op,is_4op_attached; // base of a 4op channel/part of a 4op channel ++ Bit32s left_pan,right_pan; // opl3 stereo panning amount ++#endif ++} op_type; ++ ++// per-chip variables ++static op_type op[MAXOPERATORS]; ++ ++static Bits int_samplerate; ++ ++static Bit8u status; ++static Bit32u opl_index; ++#if defined(OPLTYPE_IS_OPL3) ++static Bit8u adlibreg[512]; // adlib register set (including second set) ++static Bit8u wave_sel[44]; // waveform selection ++#else ++static Bit8u adlibreg[256]; // adlib register set ++static Bit8u wave_sel[22]; // waveform selection ++#endif ++ ++ ++ // vibrato/tremolo increment/counter ++static Bit32u vibtab_pos; ++static Bit32u vibtab_add; ++static Bit32u tremtab_pos; ++static Bit32u tremtab_add; ++ ++ ++// enable an operator ++void enable_operator(Bitu regbase, op_type* op_pt, Bit32u act_type); ++ ++// functions to change parameters of an operator ++void change_frequency(Bitu chanbase, Bitu regbase, op_type* op_pt); ++ ++void change_attackrate(Bitu regbase, op_type* op_pt); ++void change_decayrate(Bitu regbase, op_type* op_pt); ++void change_releaserate(Bitu regbase, op_type* op_pt); ++void change_sustainlevel(Bitu regbase, op_type* op_pt); ++void change_waveform(Bitu regbase, op_type* op_pt); ++void change_keepsustain(Bitu regbase, op_type* op_pt); ++void change_vibrato(Bitu regbase, op_type* op_pt); ++void change_feedback(Bitu chanbase, op_type* op_pt); ++ + + static Bit32u generator_add; // should be a chip parameter + +diff --git a/src/opl.h b/src/opl.h +index c8e643b..cbb56ad 100644 +--- a/src/opl.h ++++ b/src/opl.h +@@ -25,11 +25,8 @@ + * Ken Silverman's official web site: "http://www.advsys.net/ken" + */ + +- +-#define fltype double +- +-#include + #include ++ + typedef uintptr_t Bitu; + typedef intptr_t Bits; + typedef uint32_t Bit32u; +@@ -39,154 +36,6 @@ typedef int16_t Bit16s; + typedef uint8_t Bit8u; + typedef int8_t Bit8s; + +- +-/* +- define attribution that inlines/forces inlining of a function (optional) +-*/ +-#define OPL_INLINE inline +- +- +-#undef NUM_CHANNELS +-#if defined(OPLTYPE_IS_OPL3) +-#define NUM_CHANNELS 18 +-#else +-#define NUM_CHANNELS 9 +-#endif +- +-#define MAXOPERATORS (NUM_CHANNELS*2) +- +- +-#define FL05 ((fltype)0.5) +-#define FL2 ((fltype)2.0) +-#define PI ((fltype)3.1415926535897932384626433832795) +- +- +-#define FIXEDPT 0x10000 // fixed-point calculations using 16+16 +-#define FIXEDPT_LFO 0x1000000 // fixed-point calculations using 8+24 +- +-#define WAVEPREC 1024 // waveform precision (10 bits) +- +-#define INTFREQU ((fltype)(14318180.0 / 288.0)) // clocking of the chip +- +- +-#define OF_TYPE_ATT 0 +-#define OF_TYPE_DEC 1 +-#define OF_TYPE_REL 2 +-#define OF_TYPE_SUS 3 +-#define OF_TYPE_SUS_NOKEEP 4 +-#define OF_TYPE_OFF 5 +- +-#define ARC_CONTROL 0x00 +-#define ARC_TVS_KSR_MUL 0x20 +-#define ARC_KSL_OUTLEV 0x40 +-#define ARC_ATTR_DECR 0x60 +-#define ARC_SUSL_RELR 0x80 +-#define ARC_FREQ_NUM 0xa0 +-#define ARC_KON_BNUM 0xb0 +-#define ARC_PERC_MODE 0xbd +-#define ARC_FEEDBACK 0xc0 +-#define ARC_WAVE_SEL 0xe0 +- +-#define ARC_SECONDSET 0x100 // second operator set for OPL3 +- +- +-#define OP_ACT_OFF 0x00 +-#define OP_ACT_NORMAL 0x01 // regular channel activated (bitmasked) +-#define OP_ACT_PERC 0x02 // percussion channel activated (bitmasked) +- +-#define BLOCKBUF_SIZE 512 +- +- +-// vibrato constants +-#define VIBTAB_SIZE 8 +-#define VIBFAC 70/50000 // no braces, integer mul/div +- +-// tremolo constants and table +-#define TREMTAB_SIZE 53 +-#define TREM_FREQ ((fltype)(3.7)) // tremolo at 3.7hz +- +- +-/* operator struct definition +- For OPL2 all 9 channels consist of two operators each, carrier and modulator. +- Channel x has operators x as modulator and operators (9+x) as carrier. +- For OPL3 all 18 channels consist either of two operators (2op mode) or four +- operators (4op mode) which is determined through register4 of the second +- adlib register set. +- Only the channels 0,1,2 (first set) and 9,10,11 (second set) can act as +- 4op channels. The two additional operators for a channel y come from the +- 2op channel y+3 so the operatorss y, (9+y), y+3, (9+y)+3 make up a 4op +- channel. +-*/ +-typedef struct operator_struct { +- Bit32s cval, lastcval; // current output/last output (used for feedback) +- Bit32u tcount, wfpos, tinc; // time (position in waveform) and time increment +- fltype amp, step_amp; // and amplification (envelope) +- fltype vol; // volume +- fltype sustain_level; // sustain level +- Bit32s mfbi; // feedback amount +- fltype a0, a1, a2, a3; // attack rate function coefficients +- fltype decaymul, releasemul; // decay/release rate functions +- Bit32u op_state; // current state of operator (attack/decay/sustain/release/off) +- Bit32u toff; +- Bit32s freq_high; // highest three bits of the frequency, used for vibrato calculations +- Bit16s* cur_wform; // start of selected waveform +- Bit32u cur_wmask; // mask for selected waveform +- Bit32u act_state; // activity state (regular, percussion) +- bool sus_keep; // keep sustain level when decay finished +- bool vibrato,tremolo; // vibrato/tremolo enable bits +- +- // variables used to provide non-continuous envelopes +- Bit32u generator_pos; // for non-standard sample rates we need to determine how many samples have passed +- Bits cur_env_step; // current (standardized) sample position +- Bits env_step_a,env_step_d,env_step_r; // number of std samples of one step (for attack/decay/release mode) +- Bit8u step_skip_pos_a; // position of 8-cyclic step skipping (always 2^x to check against mask) +- Bits env_step_skip_a; // bitmask that determines if a step is skipped (respective bit is zero then) +- +-#if defined(OPLTYPE_IS_OPL3) +- bool is_4op,is_4op_attached; // base of a 4op channel/part of a 4op channel +- Bit32s left_pan,right_pan; // opl3 stereo panning amount +-#endif +-} op_type; +- +-// per-chip variables +-Bitu chip_num; +-op_type op[MAXOPERATORS]; +- +-Bits int_samplerate; +- +-Bit8u status; +-Bit32u opl_index; +-#if defined(OPLTYPE_IS_OPL3) +-Bit8u adlibreg[512]; // adlib register set (including second set) +-Bit8u wave_sel[44]; // waveform selection +-#else +-Bit8u adlibreg[256]; // adlib register set +-Bit8u wave_sel[22]; // waveform selection +-#endif +- +- +-// vibrato/tremolo increment/counter +-Bit32u vibtab_pos; +-Bit32u vibtab_add; +-Bit32u tremtab_pos; +-Bit32u tremtab_add; +- +- +-// enable an operator +-void enable_operator(Bitu regbase, op_type* op_pt, Bit32u act_type); +- +-// functions to change parameters of an operator +-void change_frequency(Bitu chanbase, Bitu regbase, op_type* op_pt); +- +-void change_attackrate(Bitu regbase, op_type* op_pt); +-void change_decayrate(Bitu regbase, op_type* op_pt); +-void change_releaserate(Bitu regbase, op_type* op_pt); +-void change_sustainlevel(Bitu regbase, op_type* op_pt); +-void change_waveform(Bitu regbase, op_type* op_pt); +-void change_keepsustain(Bitu regbase, op_type* op_pt); +-void change_vibrato(Bitu regbase, op_type* op_pt); +-void change_feedback(Bitu chanbase, op_type* op_pt); +- + // general functions + void adlib_init(Bit32u samplerate); + void adlib_write(Bitu idx, Bit8u val); +@@ -195,8 +44,8 @@ void adlib_getsample(Bit16s* sndptr, Bits numsamples); + Bitu adlib_reg_read(Bitu port); + void adlib_write_index(Bitu port, Bit8u val); + +-#endif /* OPL_H */ +- + #define opl_init() adlib_init(OUTPUT_QUALITY * 11025) + #define opl_write(reg, val) adlib_write(reg, val) + #define opl_update(buf, num) adlib_getsample(buf, num) ++ ++#endif /* OPL_H */ diff --git a/package/openvmtools/vmtoolsd.service b/package/openvmtools/vmtoolsd.service index cb97357ec22..1d2a3566cfa 100644 --- a/package/openvmtools/vmtoolsd.service +++ b/package/openvmtools/vmtoolsd.service @@ -5,8 +5,8 @@ ConditionVirtualization=vmware [Service] Type=forking -PIDFile=/var/run/vmtoolsd.pid -ExecStart=/usr/bin/vmtoolsd -b /var/run/vmtoolsd.pid +PIDFile=/run/vmtoolsd.pid +ExecStart=/usr/bin/vmtoolsd -b /run/vmtoolsd.pid Restart=on-failure KillMode=process KillSignal=SIGKILL diff --git a/package/php/0002-iconv-tweak-iconv-detection.patch b/package/php/0002-iconv-tweak-iconv-detection.patch index 1aa84001365..a12041603d3 100644 --- a/package/php/0002-iconv-tweak-iconv-detection.patch +++ b/package/php/0002-iconv-tweak-iconv-detection.patch @@ -15,6 +15,8 @@ Signed-off-by: Gustavo Zacarias [Gustavo: update for 5.6.10] Signed-off-by: Adam Duskett [aduskett@gmail.com: Update for 7.3.0] +Signed-off-by: Bernd Kuhls +[Bernd: rebased for 7.4.10] --- build/php.m4 | 2 +- ext/iconv/config.m4 | 22 ---------------------- @@ -24,7 +26,7 @@ diff --git a/build/php.m4 b/build/php.m4 index 9586c490..8b3d47ed 100644 --- a/build/php.m4 +++ b/build/php.m4 -@@ -1971,7 +1971,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [ +@@ -1965,7 +1965,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [ dnl Check external libs for iconv funcs. if test "$found_iconv" = "no"; then diff --git a/package/php/0003-configure-disable-the-phar-tool.patch b/package/php/0003-configure-disable-the-phar-tool.patch index 7cc3637973c..aface92d776 100644 --- a/package/php/0003-configure-disable-the-phar-tool.patch +++ b/package/php/0003-configure-disable-the-phar-tool.patch @@ -12,6 +12,8 @@ Signed-off-by: Gustavo Zacarias [Gustavo: update for autoreconf/configure.in] Signed-off-by: Adam Duskett [Aduskett: update for 7.3.0] +Signed-off-by: Bernd Kuhls +[Bernd: rebased for 7.4.10] --- configure.ac | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) @@ -20,7 +22,7 @@ diff --git a/configure.ac b/configure.ac index 0dfab302..6026fb66 100644 --- a/configure.ac +++ b/configure.ac -@@ -1430,13 +1430,8 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag" +@@ -1453,13 +1453,8 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag" INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)" diff --git a/package/php/php.hash b/package/php/php.hash index d648d90c04b..77a0feb555f 100644 --- a/package/php/php.hash +++ b/package/php/php.hash @@ -1,5 +1,5 @@ # From https://www.php.net/downloads.php -sha256 23733f4a608ad1bebdcecf0138ebc5fd57cf20d6e0915f98a9444c3f747dc57b php-7.4.9.tar.xz +sha256 5d31675a9b9c21b5bd03389418218c30b26558246870caba8eb54f5856e2d6ce php-7.4.11.tar.xz # License file sha256 0967ad6cf4b7fe81d38709d7aaef3fecb3bd685be7eebb37b864aa34c991baa7 LICENSE diff --git a/package/php/php.mk b/package/php/php.mk index d9516ae1270..6b528cdc334 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -4,7 +4,7 @@ # ################################################################################ -PHP_VERSION = 7.4.9 +PHP_VERSION = 7.4.11 PHP_SITE = http://www.php.net/distributions PHP_SOURCE = php-$(PHP_VERSION).tar.xz PHP_INSTALL_STAGING = YES diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk index 2494ce028cf..5c5427bf33e 100644 --- a/package/pkg-golang.mk +++ b/package/pkg-golang.mk @@ -23,22 +23,6 @@ GO_BIN = $(HOST_DIR)/bin/go -# We pass an empty GOBIN, otherwise "go install: cannot install -# cross-compiled binaries when GOBIN is set" -GO_COMMON_ENV = \ - PATH=$(BR_PATH) \ - GOBIN= \ - CGO_ENABLED=$(HOST_GO_CGO_ENABLED) - -GO_TARGET_ENV = \ - $(HOST_GO_TARGET_ENV) \ - $(GO_COMMON_ENV) - -GO_HOST_ENV = \ - CGO_CFLAGS="$(HOST_CFLAGS)" \ - CGO_LDFLAGS="$(HOST_LDFLAGS)" \ - $(GO_COMMON_ENV) - ################################################################################ # inner-golang-package -- defines how the configuration, compilation and # installation of a Go package should be done, implements a few hooks to tune @@ -56,8 +40,6 @@ GO_HOST_ENV = \ define inner-golang-package -$(2)_WORKSPACE ?= _gopath - $(2)_BUILD_OPTS += \ -ldflags "$$($(2)_LDFLAGS)" \ -tags "$$($(2)_TAGS)" \ @@ -79,25 +61,35 @@ endif $(2)_INSTALL_BINS ?= $(1) -# Source files in Go should be extracted in a precise folder in the hierarchy -# of GOPATH. It usually resolves around domain/vendor/software. By default, we -# derive domain/vendor/software from the upstream URL of the project, but we -# allow $(2)_SRC_SUBDIR to be overridden if needed. +# Source files in Go usually use an import path resolved around +# domain/vendor/software. We infer domain/vendor/software from the upstream URL +# of the project. $(2)_SRC_DOMAIN = $$(call domain,$$($(2)_SITE)) $(2)_SRC_VENDOR = $$(word 1,$$(subst /, ,$$(call notdomain,$$($(2)_SITE)))) $(2)_SRC_SOFTWARE = $$(word 2,$$(subst /, ,$$(call notdomain,$$($(2)_SITE)))) -$(2)_SRC_SUBDIR ?= $$($(2)_SRC_DOMAIN)/$$($(2)_SRC_VENDOR)/$$($(2)_SRC_SOFTWARE) -$(2)_SRC_PATH = $$(@D)/$$($(2)_WORKSPACE)/src/$$($(2)_SRC_SUBDIR) +# $(2)_GOMOD is the root Go module path for the project, inferred if not set. +# If the go.mod file does not exist, one is written with this root path. +$(2)_GOMOD ?= $$($(2)_SRC_DOMAIN)/$$($(2)_SRC_VENDOR)/$$($(2)_SRC_SOFTWARE) -# Configure step. Only define it if not already defined by the package .mk -# file. -ifndef $(2)_CONFIGURE_CMDS -define $(2)_CONFIGURE_CMDS - mkdir -p $$(dir $$($(2)_SRC_PATH)) - ln -sf $$(@D) $$($(2)_SRC_PATH) +# Generate a go.mod file if it doesn't exist. Note: Go is configured +# to use the "vendor" dir and not make network calls. +define $(2)_GEN_GOMOD + if [ ! -f $$(@D)/go.mod ]; then \ + printf "module $$($(2)_GOMOD)\n" > $$(@D)/go.mod; \ + fi endef -endif +$(2)_POST_PATCH_HOOKS += $(2)_GEN_GOMOD + +# WIP - download dependencies with the Go tool if vendor does not exist. +define $(2)_DOWNLOAD_GOMOD + if [ ! -d $$(@D)/vendor ]; then \ + cd $$(@D); \ + $$(GO_BIN) mod vendor; \ + fi +endef + +$(2)_POST_PATCH_HOOKS += $(2)_DOWNLOAD_GOMOD # Build step. Only define it if not already defined by the package .mk # file. @@ -111,26 +103,24 @@ endif # Build package for target define $(2)_BUILD_CMDS $$(foreach d,$$($(2)_BUILD_TARGETS),\ - cd $$($(2)_SRC_PATH); \ - $$(GO_TARGET_ENV) \ - GOPATH="$$(@D)/$$($(2)_WORKSPACE)" \ + cd $$(@D); \ + $$(HOST_GO_TARGET_ENV) \ $$($(2)_GO_ENV) \ $$(GO_BIN) build -v $$($(2)_BUILD_OPTS) \ -o $$(@D)/bin/$$(or $$($(2)_BIN_NAME),$$(notdir $$(d))) \ - ./$$(d) + $$($(2)_GOMOD)/$$(d) ) endef else # Build package for host define $(2)_BUILD_CMDS $$(foreach d,$$($(2)_BUILD_TARGETS),\ - cd $$($(2)_SRC_PATH); \ - $$(GO_HOST_ENV) \ - GOPATH="$$(@D)/$$($(2)_WORKSPACE)" \ + cd $$(@D); \ + $$(HOST_GO_HOST_ENV) \ $$($(2)_GO_ENV) \ $$(GO_BIN) build -v $$($(2)_BUILD_OPTS) \ -o $$(@D)/bin/$$(or $$($(2)_BIN_NAME),$$(notdir $$(d))) \ - ./$$(d) + $$($(2)_GOMOD)/$$(d) ) endef endif diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk index e827bb5f3c4..3a34ba703b2 100644 --- a/package/pkg-meson.mk +++ b/package/pkg-meson.mk @@ -195,7 +195,7 @@ define PKG_MESON_INSTALL_CROSS_CONF -e "s%@TARGET_CXXFLAGS@%$(call make-sq-comma-list,$(TARGET_CXXFLAGS))@PKG_TARGET_CFLAGS@%g" \ -e 's%@HOST_DIR@%$(HOST_DIR)%g' \ -e 's%@STAGING_DIR@%$(STAGING_DIR)%g' \ - -e 's%@STATIC@%$$(if $$(BR2_STATIC_LIBS),true,false)%g' \ + -e 's%@STATIC@%$(if $(BR2_STATIC_LIBS),true,false)%g' \ $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \ > $(HOST_DIR)/etc/meson/cross-compilation.conf.in sed -e 's%@PKG_TARGET_CFLAGS@%%g' \ @@ -205,4 +205,4 @@ define PKG_MESON_INSTALL_CROSS_CONF > $(HOST_DIR)/etc/meson/cross-compilation.conf endef -TOOLCHAIN_POST_INSTALL_STAGING_HOOKS += PKG_MESON_INSTALL_CROSS_CONF +TOOLCHAIN_TARGET_FINALIZE_HOOKS += PKG_MESON_INSTALL_CROSS_CONF diff --git a/package/postgresql/pg_config b/package/postgresql/pg_config index 642252f27f4..59a9e6cfad1 100644 --- a/package/postgresql/pg_config +++ b/package/postgresql/pg_config @@ -11,12 +11,18 @@ case "$1" in --includedir) echo "$prefix/include" ;; + --includedir-server) + echo "$prefix/include/postgresql/server" + ;; --libdir) echo "$prefix/lib" ;; --version) echo "PostgreSQL @POSTGRESQL_VERSION@" ;; + --configure) + echo "@POSTGRESQL_CONF_OPTIONS@" + ;; *) - echo "Usage: $0 {--includedir|--libdir|--version}" + echo "Usage: $0 {--includedir|--includedir-server|--libdir|--version|--configure}" esac diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk index 18c7b2ade4e..3630b5a385a 100644 --- a/package/postgresql/postgresql.mk +++ b/package/postgresql/postgresql.mk @@ -115,6 +115,7 @@ POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP define POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG $(INSTALL) -m 0755 -D package/postgresql/pg_config \ $(STAGING_DIR)/usr/bin/pg_config + $(SED) "s|@POSTGRESQL_CONF_OPTIONS@|$(POSTGRESQL_CONF_OPTS)|g" $(STAGING_DIR)/usr/bin/pg_config $(SED) "s|@POSTGRESQL_VERSION@|$(POSTGRESQL_VERSION)|g" $(STAGING_DIR)/usr/bin/pg_config endef diff --git a/package/postgresql/postgresql.service b/package/postgresql/postgresql.service index 53e6f84f00f..539eea89641 100644 --- a/package/postgresql/postgresql.service +++ b/package/postgresql/postgresql.service @@ -15,7 +15,6 @@ Group=postgres StandardOutput=syslog StandardError=syslog SyslogIdentifier=postgres -PIDFile=/var/lib/pgsql/postmaster.pid ExecStartPre=/bin/sh -c "if [ ! -f /var/lib/pgsql/PG_VERSION ]; then /usr/bin/pg_ctl initdb -D /var/lib/pgsql; fi" ExecStart=/usr/bin/postgres -D /var/lib/pgsql diff --git a/package/python-aenum/python-aenum.mk b/package/python-aenum/python-aenum.mk index 1d5322ef416..97fcbb5e867 100644 --- a/package/python-aenum/python-aenum.mk +++ b/package/python-aenum/python-aenum.mk @@ -11,4 +11,13 @@ PYTHON_AENUM_SETUP_TYPE = setuptools PYTHON_AENUM_LICENSE = BSD-3-Clause PYTHON_AENUM_LICENSE_FILES = aenum/LICENSE +ifeq ($(BR2_PACKAGE_PYTHON),y) +# only needed/valid for python 3.x +define PYTHON_AENUM_RM_PY3_FILE + rm -f $(TARGET_DIR)/usr/lib/python*/site-packages/aenum/test_v3.py +endef + +PYTHON_AENUM_POST_INSTALL_TARGET_HOOKS += PYTHON_AENUM_RM_PY3_FILE +endif + $(eval $(python-package)) diff --git a/package/python-cycler/Config.in b/package/python-cycler/Config.in index 854873c9698..813bc69dd4c 100644 --- a/package/python-cycler/Config.in +++ b/package/python-cycler/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_PYTHON_CYCLER bool "python-cycler" - depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 help Creates a Cycler objects much like cycler, but includes input validation. diff --git a/package/python-engineio/python-engineio.mk b/package/python-engineio/python-engineio.mk index 36ca3268770..d0e073fa95e 100644 --- a/package/python-engineio/python-engineio.mk +++ b/package/python-engineio/python-engineio.mk @@ -10,4 +10,14 @@ PYTHON_ENGINEIO_SETUP_TYPE = setuptools PYTHON_ENGINEIO_LICENSE = MIT PYTHON_ENGINEIO_LICENSE_FILES = LICENSE +ifeq ($(BR2_PACKAGE_PYTHON),y) +# only needed/valid for python 3.x +define PYTHON_ENGINEIO_RM_PY3_FILES + rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/engineio/async_drivers \ + $(TARGET_DIR)/usr/lib/python*/site-packages/engineio/asyncio_*.py +endef + +PYTHON_ENGINEIO_POST_INSTALL_TARGET_HOOKS += PYTHON_ENGINEIO_RM_PY3_FILES +endif + $(eval $(python-package)) diff --git a/package/python-fire/python-fire.mk b/package/python-fire/python-fire.mk index 343abbca7dc..f6a2e073f09 100644 --- a/package/python-fire/python-fire.mk +++ b/package/python-fire/python-fire.mk @@ -11,4 +11,13 @@ PYTHON_FIRE_SETUP_TYPE = setuptools PYTHON_FIRE_LICENSE = Apache-2.0 PYTHON_FIRE_LICENSE_FILES = LICENSE +ifeq ($(BR2_PACKAGE_PYTHON),y) +# only needed/valid for python 3.x +define PYTHON_FIRE_RM_PY3_FILE + rm -f $(TARGET_DIR)/usr/lib/python*/site-packages/fire/test_components_py3.py +endef + +PYTHON_FIRE_POST_INSTALL_TARGET_HOOKS += PYTHON_FIRE_RM_PY3_FILE +endif + $(eval $(python-package)) diff --git a/package/python-pymodbus/python-pymodbus.mk b/package/python-pymodbus/python-pymodbus.mk index d96e21a55ca..9135a4d0c47 100644 --- a/package/python-pymodbus/python-pymodbus.mk +++ b/package/python-pymodbus/python-pymodbus.mk @@ -11,4 +11,13 @@ PYTHON_PYMODBUS_SETUP_TYPE = setuptools PYTHON_PYMODBUS_LICENSE = BSD-3-Clause PYTHON_PYMODBUS_LICENSE_FILES = doc/LICENSE +ifeq ($(BR2_PACKAGE_PYTHON),y) +# only needed/valid for python 3.x +define PYTHON_PYMODBUS_RM_PY3_FILES + rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/pymodbus/client/asynchronous/asyncio +endef + +PYTHON_PYMODBUS_POST_INSTALL_TARGET_HOOKS += PYTHON_PYMODBUS_RM_PY3_FILES +endif + $(eval $(python-package)) diff --git a/package/python-scapy/0001-Small-Python-2-fix.patch b/package/python-scapy/0001-Small-Python-2-fix.patch new file mode 100644 index 00000000000..562838d53ba --- /dev/null +++ b/package/python-scapy/0001-Small-Python-2-fix.patch @@ -0,0 +1,26 @@ +From 0c3d5e417bbd923c4729d15572c3d693d58aff81 Mon Sep 17 00:00:00 2001 +From: Gabriel +Date: Wed, 21 Aug 2019 18:18:14 +0800 +Subject: [PATCH] Small Python 2 fix + +Signed-off-by: Peter Korsgaard +--- + scapy/tools/generate_ethertypes.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scapy/tools/generate_ethertypes.py b/scapy/tools/generate_ethertypes.py +index 5bc5cdf9..47c38c4f 100644 +--- a/scapy/tools/generate_ethertypes.py ++++ b/scapy/tools/generate_ethertypes.py +@@ -20,7 +20,7 @@ URL = "https://raw.githubusercontent.com/openbsd/src/master/sys/net/ethertypes.h + with urllib.request.urlopen(URL) as stream: + DATA = stream.read() + +-reg = rb".*ETHERTYPE_([^\s]+)\s.0x([0-9A-Fa-f]+).*\/\*(.*)\*\/" ++reg = br".*ETHERTYPE_([^\s]+)\s.0x([0-9A-Fa-f]+).*\/\*(.*)\*\/" + COMPILED = b"""# + # Ethernet frame types + # This file describes some of the various Ethernet +-- +2.20.1 + diff --git a/package/python-semver/python-semver.hash b/package/python-semver/python-semver.hash index 510b42cac9f..5c13764e571 100644 --- a/package/python-semver/python-semver.hash +++ b/package/python-semver/python-semver.hash @@ -1,5 +1,5 @@ # md5, sha256 from https://pypi.org/pypi/semver/json -md5 a8466a3a0487a90e97a4199ad174d3e9 semver-2.10.1.tar.gz -sha256 b08a84f604ef579e474ce448672a05c8d50d1ee0b24cee9fb58a12b260e4d0dc semver-2.10.1.tar.gz +md5 3e11ae9782121e8ffe9f8a8b763a8cb5 semver-2.10.2.tar.gz +sha256 c0a4a9d1e45557297a722ee9bac3de2ec2ea79016b6ffcaca609b0bc62cf4276 semver-2.10.2.tar.gz # Locally computed sha256 cda490c32e61d3884dc17791fc8078f2a3e564fba98dd18b4dc64eb2720b2b6f LICENSE.txt diff --git a/package/python-semver/python-semver.mk b/package/python-semver/python-semver.mk index fec02546ba7..32ed6b971fb 100644 --- a/package/python-semver/python-semver.mk +++ b/package/python-semver/python-semver.mk @@ -4,9 +4,9 @@ # ################################################################################ -PYTHON_SEMVER_VERSION = 2.10.1 +PYTHON_SEMVER_VERSION = 2.10.2 PYTHON_SEMVER_SOURCE = semver-$(PYTHON_SEMVER_VERSION).tar.gz -PYTHON_SEMVER_SITE = https://files.pythonhosted.org/packages/bc/82/5a9ee107810deb6cb142ea3b07aba619d6b6c0bd74c9e276b2b48b62696e +PYTHON_SEMVER_SITE = https://files.pythonhosted.org/packages/aa/e8/cb894f70a52887f001aff5f264f68272c21fa58268495aca17df396c161f PYTHON_SEMVER_SETUP_TYPE = setuptools PYTHON_SEMVER_LICENSE = BSD-3-Clause PYTHON_SEMVER_LICENSE_FILES = LICENSE.txt diff --git a/package/python-sentry-sdk/python-sentry-sdk.mk b/package/python-sentry-sdk/python-sentry-sdk.mk index 13495047b97..3bfd95a47f8 100644 --- a/package/python-sentry-sdk/python-sentry-sdk.mk +++ b/package/python-sentry-sdk/python-sentry-sdk.mk @@ -11,4 +11,14 @@ PYTHON_SENTRY_SDK_SETUP_TYPE = setuptools PYTHON_SENTRY_SDK_LICENSE = BSD-2-Clause PYTHON_SENTRY_SDK_LICENSE_FILES = LICENSE +ifeq ($(BR2_PACKAGE_PYTHON),y) +# only needed/valid for python 3.x +define PYTHON_SENTRY_SDK_RM_PY3_FILES + rm -f $(addprefix $(TARGET_DIR)/usr/lib/python*/site-packages/sentry_sdk/integrations/,\ + aiohttp.py asgi.py django/asgi.py sanic.py tornado.py) +endef + +PYTHON_SENTRY_SDK_POST_INSTALL_TARGET_HOOKS += PYTHON_SENTRY_SDK_RM_PY3_FILES +endif + $(eval $(python-package)) diff --git a/package/python-socketio/python-socketio.mk b/package/python-socketio/python-socketio.mk index ece4f65b78c..73dab26f3cf 100644 --- a/package/python-socketio/python-socketio.mk +++ b/package/python-socketio/python-socketio.mk @@ -10,4 +10,14 @@ PYTHON_SOCKETIO_SETUP_TYPE = setuptools PYTHON_SOCKETIO_LICENSE = MIT PYTHON_SOCKETIO_LICENSE_FILES = LICENSE +ifeq ($(BR2_PACKAGE_PYTHON),y) +# only needed/valid for python 3.x +define PYTHON_SOCKETIO_RM_PY3_FILES + rm -f $(TARGET_DIR)/usr/lib/python*/site-packages/socketio/asgi.py \ + $(TARGET_DIR)/usr/lib/python*/site-packages/socketio/asyncio_*.py +endef + +PYTHON_SOCKETIO_POST_INSTALL_TARGET_HOOKS += PYTHON_SOCKETIO_RM_PY3_FILES +endif + $(eval $(python-package)) diff --git a/package/python-texttable/python-texttable.hash b/package/python-texttable/python-texttable.hash index 367eb8d60f4..a69e8ed465a 100644 --- a/package/python-texttable/python-texttable.hash +++ b/package/python-texttable/python-texttable.hash @@ -1,5 +1,5 @@ # md5, sha256 from https://pypi.org/pypi/texttable/json -md5 763141f0bdf598cdc5cf780ed4d2eb94 texttable-1.6.2.tar.gz -sha256 eff3703781fbc7750125f50e10f001195174f13825a92a45e9403037d539b4f4 texttable-1.6.2.tar.gz +md5 68e6b31d36f5c20221da7d5db3eca772 texttable-1.6.3.tar.gz +sha256 ce0faf21aa77d806bbff22b107cc22cce68dc9438f97a2df32c93e9afa4ce436 texttable-1.6.3.tar.gz # Locally computed sha256 checksums -sha256 181d0c3366cc36fd6ae7d023b23a743581003fd42974c8983ea40f7161faeaf3 LICENSE +sha256 4ba7bdab54504a3bc44eb33ecca873a26a63ab902822101a87bb46235da63594 LICENSE diff --git a/package/python-texttable/python-texttable.mk b/package/python-texttable/python-texttable.mk index 3b173a35ee0..6af23917b94 100644 --- a/package/python-texttable/python-texttable.mk +++ b/package/python-texttable/python-texttable.mk @@ -4,9 +4,9 @@ # ################################################################################ -PYTHON_TEXTTABLE_VERSION = 1.6.2 +PYTHON_TEXTTABLE_VERSION = 1.6.3 PYTHON_TEXTTABLE_SOURCE = texttable-$(PYTHON_TEXTTABLE_VERSION).tar.gz -PYTHON_TEXTTABLE_SITE = https://files.pythonhosted.org/packages/82/a8/60df592e3a100a1f83928795aca210414d72cebdc6e4e0c95a6d8ac632fe +PYTHON_TEXTTABLE_SITE = https://files.pythonhosted.org/packages/f5/be/716342325d6d6e05608e3a10e15f192f3723e454a25ce14bc9b9d1332772 PYTHON_TEXTTABLE_SETUP_TYPE = setuptools PYTHON_TEXTTABLE_LICENSE = MIT PYTHON_TEXTTABLE_LICENSE_FILES = LICENSE diff --git a/package/python-tinyrpc/Config.in b/package/python-tinyrpc/Config.in index 3c643c754a9..3194b7825a8 100644 --- a/package/python-tinyrpc/Config.in +++ b/package/python-tinyrpc/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_PYTHON_TINYRPC bool "python-tinyrpc" + depends on BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_SIX # runtime help A small, modular, transport and protocol neutral RPC diff --git a/package/python-txtorcon/python-txtorcon.mk b/package/python-txtorcon/python-txtorcon.mk index a01c0b25119..4df400c3e7c 100644 --- a/package/python-txtorcon/python-txtorcon.mk +++ b/package/python-txtorcon/python-txtorcon.mk @@ -11,4 +11,13 @@ PYTHON_TXTORCON_SETUP_TYPE = setuptools PYTHON_TXTORCON_LICENSE = MIT PYTHON_TXTORCON_LICENSE_FILES = LICENSE +ifeq ($(BR2_PACKAGE_PYTHON),y) +# only needed/valid for python 3.x +define PYTHON_TXTORCON_RM_PY3_FILE + rm -f $(TARGET_DIR)/usr/lib/python*/site-packages/txtorcon/controller_py3.py +endef + +PYTHON_TXTORCON_POST_INSTALL_TARGET_HOOKS += PYTHON_TXTORCON_RM_PY3_FILE +endif + $(eval $(python-package)) diff --git a/package/python/python.mk b/package/python/python.mk index ccaaadd012a..7bc71b58e21 100644 --- a/package/python/python.mk +++ b/package/python/python.mk @@ -199,6 +199,7 @@ define PYTHON_REMOVE_USELESS_FILES rm -f $(TARGET_DIR)/usr/bin/python2-config rm -f $(TARGET_DIR)/usr/bin/python-config rm -f $(TARGET_DIR)/usr/bin/smtpd.py + rm -f $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/distutils/command/wininst*.exe for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/config/ \ -type f -not -name pyconfig.h -a -not -name Makefile` ; do \ rm -f $$i ; \ @@ -260,10 +261,10 @@ endif define PYTHON_CREATE_PYC_FILES $(PYTHON_FIX_TIME) PYTHONPATH="$(PYTHON_PATH)" \ - cd $(TARGET_DIR) && $(HOST_DIR)/bin/python$(PYTHON_VERSION_MAJOR) \ + $(HOST_DIR)/bin/python$(PYTHON_VERSION_MAJOR) \ $(TOPDIR)/support/scripts/pycompile.py \ - $(if $(BR2_REPRODUCIBLE),--force) \ - usr/lib/python$(PYTHON_VERSION_MAJOR) + --strip-root $(TARGET_DIR) \ + $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) endef ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON_PY_PYC),y) diff --git a/package/python3/python3.hash b/package/python3/python3.hash index 0a08d04b3f0..4c03293dd19 100644 --- a/package/python3/python3.hash +++ b/package/python3/python3.hash @@ -1,5 +1,5 @@ -# From https://www.python.org/downloads/release/python-385/ -md5 35b5a3d0254c1c59be9736373d429db7 Python-3.8.5.tar.xz +# From https://www.python.org/downloads/release/python-386/ +md5 69e73c49eeb1a853cefd26d18c9d069d Python-3.8.6.tar.xz # Locally computed -sha256 e3003ed57db17e617acb382b0cade29a248c6026b1bd8aad1f976e9af66a83b0 Python-3.8.5.tar.xz -sha256 de4d1f2d2ad5ad0cfd1657a106476b31cb5db5ef9d1ff842b237c0c81f0c8a23 LICENSE +sha256 a9e0b79d27aa056eb9cce8d63a427b5f9bab1465dee3f942dcfdb25a82f4ab8a Python-3.8.6.tar.xz +sha256 1dceef1677a39befa8bf0285ab2db441ba117520bb2de839547ace006a17750d LICENSE diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 31e7ca3d3af..1a2edc64719 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -5,7 +5,7 @@ ################################################################################ PYTHON3_VERSION_MAJOR = 3.8 -PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).5 +PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).6 PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz PYTHON3_SITE = https://python.org/ftp/python/$(PYTHON3_VERSION) PYTHON3_LICENSE = Python-2.0, others @@ -212,6 +212,7 @@ define PYTHON3_REMOVE_USELESS_FILES rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config rm -f $(TARGET_DIR)/usr/bin/python3-config rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3 + rm -f $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/distutils/command/wininst*.exe for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m-*/ \ -type f -not -name Makefile` ; do \ rm -f $$i ; \ @@ -277,10 +278,10 @@ endif define PYTHON3_CREATE_PYC_FILES $(PYTHON3_FIX_TIME) PYTHONPATH="$(PYTHON3_PATH)" \ - cd $(TARGET_DIR) && $(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR) \ + $(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR) \ $(TOPDIR)/support/scripts/pycompile.py \ - $(if $(BR2_REPRODUCIBLE),--force) \ - usr/lib/python$(PYTHON3_VERSION_MAJOR) + --strip-root $(TARGET_DIR) \ + $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) endef ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PY_PYC),y) diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in index 28b03f54389..ce7230c7289 100644 --- a/package/qt5/qt5base/Config.in +++ b/package/qt5/qt5base/Config.in @@ -192,6 +192,7 @@ config BR2_PACKAGE_QT5BASE_XCB select BR2_PACKAGE_LIBXCB select BR2_PACKAGE_XCB_UTIL_IMAGE select BR2_PACKAGE_XCB_UTIL_KEYSYMS + select BR2_PACKAGE_XCB_UTIL_RENDERUTIL select BR2_PACKAGE_XCB_UTIL_WM select BR2_PACKAGE_LIBXKBCOMMON diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 359a3800750..e0189599a76 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -79,6 +79,9 @@ QT5BASE_DEPENDENCIES += gcnano-binaries else ifeq ($(BR2_PACKAGE_TI_SGX_LIBGBM),y) QT5BASE_CONFIGURE_OPTS += -gbm QT5BASE_DEPENDENCIES += ti-sgx-libgbm +else ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y) +QT5BASE_CONFIGURE_OPTS += -gbm +QT5BASE_DEPENDENCIES += imx-gpu-viv else QT5BASE_CONFIGURE_OPTS += -no-gbm endif @@ -174,6 +177,7 @@ QT5BASE_DEPENDENCIES += \ xcb-util-wm \ xcb-util-image \ xcb-util-keysyms \ + xcb-util-renderutil \ xlib_libX11 \ libxkbcommon ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y) diff --git a/package/quagga/0002-lib-prefix.h-fix-build-with-gcc-10.patch b/package/quagga/0002-lib-prefix.h-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..f2fc9cc6477 --- /dev/null +++ b/package/quagga/0002-lib-prefix.h-fix-build-with-gcc-10.patch @@ -0,0 +1,36 @@ +From 01bcd0f7411f86eea44247bf91b48882cae35519 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Mon, 21 Sep 2020 23:12:25 +0200 +Subject: [PATCH] lib/prefix.h: fix build with gcc 10 + +Remove __packed to fix the following build failure with gcc 10 (which +defaults to -fno-common): + + CCLD libzebra.la +/tmp/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: .libs/sockunion.o:(.bss+0x0): multiple definition of `__packed'; .libs/vty.o:(.bss+0x6c): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/82b15cff3f7b943eb93d8270790f1b8561d31d6a + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://bugzilla.quagga.net/show_bug.cgi?id=1014] +--- + lib/prefix.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/prefix.h b/lib/prefix.h +index 2cf0b20b..a5306eee 100644 +--- a/lib/prefix.h ++++ b/lib/prefix.h +@@ -44,7 +44,7 @@ + */ + struct ethaddr { + u_char octet[ETHER_ADDR_LEN]; +-} __packed; ++}; + + + /* +-- +2.28.0 + diff --git a/package/read-edid/0003-fix-build-with-gcc-10.patch b/package/read-edid/0003-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..713b09aa8d7 --- /dev/null +++ b/package/read-edid/0003-fix-build-with-gcc-10.patch @@ -0,0 +1,49 @@ +fix build with gcc 10 + +Define quiet as static to avoid the following build failure with gcc 10 +(which defaults to -fno-common): + +/home/naourr/work/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: CMakeFiles/get-edid.dir/i2c.c.o:(.bss+0x0): multiple definition of `quiet'; CMakeFiles/get-edid.dir/get-edid.c.o:(.bss+0x0): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/28bde8049b6610273bceae26eca407c819a37dcd + +Signed-off-by: Fabrice Fontaine +[Upstream status: sent to pyrophobicman@gmail.com] + +diff -Nura read-edid-3.0.2.orig/get-edid/classic.c read-edid-3.0.2/get-edid/classic.c +--- read-edid-3.0.2.orig/get-edid/classic.c 2020-09-25 23:25:01.928805414 +0200 ++++ read-edid-3.0.2/get-edid/classic.c 2020-09-25 23:26:37.440807301 +0200 +@@ -26,7 +26,7 @@ + #define dosmemput(buffer,length,offset) memcpy(offset,buffer,length) + + #define display(...) if (quiet == 0) { fprintf(stderr, __VA_ARGS__); } +-int quiet; ++static int quiet; + + real_ptr far_ptr_to_real_ptr( uint32 farptr ) + { +diff -Nura read-edid-3.0.2.orig/get-edid/get-edid.c read-edid-3.0.2/get-edid/get-edid.c +--- read-edid-3.0.2.orig/get-edid/get-edid.c 2020-09-25 23:25:01.928805414 +0200 ++++ read-edid-3.0.2/get-edid/get-edid.c 2020-09-25 23:28:20.740809341 +0200 +@@ -9,7 +9,7 @@ + #include + #include + +-int quiet=0; ++static int quiet=0; + int i2conly=0; //0=both, 1=i2conly, 2=classiconly + int i2cbus=-1; + int classmon=0; +diff -Nura read-edid-3.0.2.orig/get-edid/i2c.c read-edid-3.0.2/get-edid/i2c.c +--- read-edid-3.0.2.orig/get-edid/i2c.c 2020-09-25 23:25:01.928805414 +0200 ++++ read-edid-3.0.2/get-edid/i2c.c 2020-09-25 23:28:32.152809567 +0200 +@@ -15,7 +15,7 @@ + + //Ideas (but not too much actual code) taken from i2c-tools. Thanks guys. + +-int quiet; ++static int quiet; + + #define display(...) if (quiet == 0) { fprintf(stderr, __VA_ARGS__); } + diff --git a/package/redis/redis.hash b/package/redis/redis.hash index 840019415d9..d686d59847b 100644 --- a/package/redis/redis.hash +++ b/package/redis/redis.hash @@ -1,5 +1,5 @@ # From https://github.com/redis/redis-hashes/blob/master/README -sha256 12ad49b163af5ef39466e8d2f7d212a58172116e5b441eebecb4e6ca22363d94 redis-6.0.6.tar.gz +sha256 04fa1fddc39bd1aecb6739dd5dd73858a3515b427acd1e2947a66dadce868d68 redis-6.0.8.tar.gz # Locally calculated sha256 97f0a15b7bbae580d2609dad2e11f1956ae167be296ab60f4691ab9c30ee9828 COPYING diff --git a/package/redis/redis.mk b/package/redis/redis.mk index 33c764a0d5c..c567d3200d1 100644 --- a/package/redis/redis.mk +++ b/package/redis/redis.mk @@ -4,7 +4,7 @@ # ################################################################################ -REDIS_VERSION = 6.0.6 +REDIS_VERSION = 6.0.8 REDIS_SITE = http://download.redis.io/releases REDIS_LICENSE = BSD-3-Clause (core); MIT and BSD family licenses (Bundled components) REDIS_LICENSE_FILES = COPYING diff --git a/package/rng-tools/rngd.service b/package/rng-tools/rngd.service index 11386d1e5d6..28ef65a1294 100644 --- a/package/rng-tools/rngd.service +++ b/package/rng-tools/rngd.service @@ -1,5 +1,9 @@ [Unit] Description=Hardware RNG Entropy Gatherer Daemon +DefaultDependencies=no +After=systemd-udev-settle.service +Before=sysinit.target shutdown.target +Conflicts=shutdown.target [Service] ExecStart=/usr/sbin/rngd -f $DAEMON_ARGS diff --git a/package/rpi-firmware/rpi-firmware.hash b/package/rpi-firmware/rpi-firmware.hash index 32f2076d6e4..8730ec959b9 100644 --- a/package/rpi-firmware/rpi-firmware.hash +++ b/package/rpi-firmware/rpi-firmware.hash @@ -1,3 +1,3 @@ # Locally computed -sha256 bad3eedb256631bdce1e7d3a0ac59fdd38923a68579089a6b64029c5ff7d68f4 rpi-firmware-542aceb30364db3ce87d532ea90451f46bbb84e9.tar.gz +sha256 c7a8c2b8cfe1977095d62086d340d6c15a383562aba2742e21df7f5f792aeb4b rpi-firmware-358f4c271f2bc10931aae8fe0879ffaded8b9c44.tar.gz sha256 c7283ff51f863d93a275c66e3b4cb08021a5dd4d8c1e7acc47d872fbe52d3d6b boot/LICENCE.broadcom diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk index 8aa855d0ef1..8b2b2c7154b 100644 --- a/package/rpi-firmware/rpi-firmware.mk +++ b/package/rpi-firmware/rpi-firmware.mk @@ -4,7 +4,7 @@ # ################################################################################ -RPI_FIRMWARE_VERSION = 542aceb30364db3ce87d532ea90451f46bbb84e9 +RPI_FIRMWARE_VERSION = 358f4c271f2bc10931aae8fe0879ffaded8b9c44 RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION)) RPI_FIRMWARE_LICENSE = BSD-3-Clause RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in index 342faf26e36..81f35888229 100644 --- a/package/rpi-userland/Config.in +++ b/package/rpi-userland/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_RPI_USERLAND bool "rpi-userland" - depends on BR2_arm + depends on BR2_arm || BR2_aarch64 depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS depends on !BR2_STATIC_LIBS @@ -40,6 +40,6 @@ config BR2_PACKAGE_RPI_USERLAND_HELLO endif comment "rpi-userland needs a toolchain w/ C++, threads, dynamic library" - depends on BR2_arm + depends on BR2_arm || BR2_aarch64 depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ BR2_STATIC_LIBS diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk index 9edc92344e5..ec5e26f1405 100644 --- a/package/rpi-userland/rpi-userland.mk +++ b/package/rpi-userland/rpi-userland.mk @@ -13,6 +13,10 @@ RPI_USERLAND_CONF_OPTS = -DVMCS_INSTALL_PREFIX=/usr RPI_USERLAND_PROVIDES = libegl libgles libopenmax libopenvg +ifeq ($(BR2_aarch64),y) +RPI_USERLAND_CONF_OPTS += -DARM64=ON +endif + ifeq ($(BR2_PACKAGE_RPI_USERLAND_HELLO),y) RPI_USERLAND_CONF_OPTS += -DALL_APPS=ON diff --git a/package/rsh-redone/Config.in b/package/rsh-redone/Config.in index 5647d7edefd..53ff2bea7f5 100644 --- a/package/rsh-redone/Config.in +++ b/package/rsh-redone/Config.in @@ -17,12 +17,13 @@ config BR2_PACKAGE_RSH_REDONE_RLOGIND bool "rlogind" depends on !BR2_STATIC_LIBS depends on BR2_ENABLE_LOCALE && BR2_USE_WCHAR + depends on !BR2_TOOLCHAIN_USES_MUSL depends on BR2_USE_MMU # linux-pam select BR2_PACKAGE_LINUX_PAM -comment "rlogind needs a toolchain w/ wchar, locale, dynamic library" +comment "rlogind needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library" depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ - || BR2_STATIC_LIBS + || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL config BR2_PACKAGE_RSH_REDONE_RSH bool "rsh" diff --git a/package/rtl8821au/0004-rename-sha256_state-to-rtl_sha256_state-to-avoid-nam.patch b/package/rtl8821au/0004-rename-sha256_state-to-rtl_sha256_state-to-avoid-nam.patch new file mode 100644 index 00000000000..41cee2b2476 --- /dev/null +++ b/package/rtl8821au/0004-rename-sha256_state-to-rtl_sha256_state-to-avoid-nam.patch @@ -0,0 +1,79 @@ +From 19aee91e45788d594615a9be58fa5d0879ec816a Mon Sep 17 00:00:00 2001 +From: youcai +Date: Tue, 18 Aug 2020 00:43:16 +0800 +Subject: [PATCH] rename sha256_state to rtl_sha256_state to avoid name + conflict with crypto + +[Upstream: https://github.com/abperiasamy/rtl8812AU_8821AU_linux/pull/338/commits/af6f6c1578f16145478326a939bb7593bbcdb4e7.patch] +Signed-off-by: Coleman +Signed-off-by: Christian Stewart +--- + core/rtw_security.c | 10 +++++----- + include/rtw_security.h | 2 +- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/core/rtw_security.c b/core/rtw_security.c +index d54e6af..de2d91f 100644 +--- a/core/rtw_security.c ++++ b/core/rtw_security.c +@@ -2200,7 +2200,7 @@ BIP_exit: + + #ifndef PLATFORM_FREEBSD + /* compress 512-bits */ +-static int sha256_compress(struct sha256_state *md, unsigned char *buf) ++static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) + { + u32 S[8], W[64], t0, t1; + u32 t; +@@ -2249,7 +2249,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) + } + + /* Initialize the hash state */ +-static void sha256_init(struct sha256_state *md) ++static void sha256_init(struct rtl_sha256_state *md) + { + md->curlen = 0; + md->length = 0; +@@ -2270,7 +2270,7 @@ static void sha256_init(struct sha256_state *md) + @param inlen The length of the data (octets) + @return CRYPT_OK if successful + */ +-static int sha256_process(struct sha256_state *md, unsigned char *in, ++static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, + unsigned long inlen) + { + unsigned long n; +@@ -2311,7 +2311,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, + @param out [out] The destination of the hash (32 bytes) + @return CRYPT_OK if successful + */ +-static int sha256_done(struct sha256_state *md, unsigned char *out) ++static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) + { + int i; + +@@ -2363,7 +2363,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) + static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, + u8 *mac) + { +- struct sha256_state ctx; ++ struct rtl_sha256_state ctx; + size_t i; + + sha256_init(&ctx); +diff --git a/include/rtw_security.h b/include/rtw_security.h +index d41014e..98feb69 100644 +--- a/include/rtw_security.h ++++ b/include/rtw_security.h +@@ -233,7 +233,7 @@ struct security_priv { + #endif /* DBG_SW_SEC_CNT */ + }; + +-struct sha256_state { ++struct rtl_sha256_state { + u64 length; + u32 state[8], curlen; + u8 buf[64]; +-- +2.28.0 + diff --git a/package/rtl8821au/0005-disable-rtw_mgmt_frame_register-on-kernel-5.8.0.patch b/package/rtl8821au/0005-disable-rtw_mgmt_frame_register-on-kernel-5.8.0.patch new file mode 100644 index 00000000000..6d09153b825 --- /dev/null +++ b/package/rtl8821au/0005-disable-rtw_mgmt_frame_register-on-kernel-5.8.0.patch @@ -0,0 +1,47 @@ +From 9421b0763e5f20babb2c0fd437979a71fbac1739 Mon Sep 17 00:00:00 2001 +From: Christian Stewart +Date: Tue, 8 Sep 2020 22:46:45 -0700 +Subject: [PATCH] disable rtw_mgmt_frame_register on kernel 5.8.0 + +rtl8812au: fix build for kernel 5.8 + +[Source: https://github.com/lwfinger/rtl8812au/commit/ec1591b90dd323185717fa42887f96444cca5921.patch] +Signed-off-by: Larry Finger +Signed-off-by: Christian Stewart +--- + os_dep/linux/ioctl_cfg80211.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c +index 019daf9..13238cb 100644 +--- a/os_dep/linux/ioctl_cfg80211.c ++++ b/os_dep/linux/ioctl_cfg80211.c +@@ -5177,6 +5177,7 @@ exit: + return ret; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) + static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) + struct wireless_dev *wdev, +@@ -5205,6 +5206,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, + exit: + return; + } ++#endif + + #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) + static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, +@@ -6021,7 +6023,9 @@ static struct cfg80211_ops rtw_cfg80211_ops = { + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) + .mgmt_tx = cfg80211_rtw_mgmt_tx, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) + .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, ++#endif + #elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,34) && LINUX_VERSION_CODE<=KERNEL_VERSION(2,6,35)) + .action = cfg80211_rtw_mgmt_tx, + #endif +-- +2.28.0 + diff --git a/package/rtl8821au/0006-rtw_proc-convert-file_operations-to-proc_ops-for-5.6.patch b/package/rtl8821au/0006-rtw_proc-convert-file_operations-to-proc_ops-for-5.6.patch new file mode 100644 index 00000000000..607d00d6041 --- /dev/null +++ b/package/rtl8821au/0006-rtw_proc-convert-file_operations-to-proc_ops-for-5.6.patch @@ -0,0 +1,109 @@ +From d3bd26812728c9ac2249ea29bda674dd31034ac6 Mon Sep 17 00:00:00 2001 +From: Christian Stewart +Date: Tue, 8 Sep 2020 23:08:39 -0700 +Subject: [PATCH] rtw_proc: convert file_operations to proc_ops for 5.6.x + compat + +Signed-off-by: Christian Stewart +--- + os_dep/linux/rtw_proc.c | 40 ++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 38 insertions(+), 2 deletions(-) + +diff --git a/os_dep/linux/rtw_proc.c b/os_dep/linux/rtw_proc.c +index 048080a..d944649 100644 +--- a/os_dep/linux/rtw_proc.c ++++ b/os_dep/linux/rtw_proc.c +@@ -65,9 +65,15 @@ inline struct proc_dir_entry *rtw_proc_create_dir(const char *name, struct proc_ + } + + inline struct proc_dir_entry *rtw_proc_create_entry(const char *name, struct proc_dir_entry *parent, +- const struct file_operations *fops, void * data) ++ #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)) ++ const struct file_operations *fops, ++ #else ++ const struct proc_ops *fops, ++ #endif ++ void * data ++ ) + { +- struct proc_dir_entry *entry; ++ struct proc_dir_entry *entry; + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) + entry = proc_create_data(name, S_IFREG|S_IRUGO|S_IWUGO, parent, fops, data); +@@ -167,6 +173,7 @@ static ssize_t rtw_drv_proc_write(struct file *file, const char __user *buffer, + return -EROFS; + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)) + static const struct file_operations rtw_drv_proc_fops = { + .owner = THIS_MODULE, + .open = rtw_drv_proc_open, +@@ -174,7 +181,16 @@ static const struct file_operations rtw_drv_proc_fops = { + .llseek = seq_lseek, + .release = single_release, + .write = rtw_drv_proc_write, ++} ++#else ++static const struct proc_ops rtw_drv_proc_fops = { ++ .proc_open = rtw_drv_proc_open, ++ .proc_read = seq_read, ++ .proc_lseek = seq_lseek, ++ .proc_release = seq_release, ++ .proc_write = rtw_drv_proc_write, + }; ++#endif + + int rtw_drv_proc_init(void) + { +@@ -776,6 +792,7 @@ static ssize_t rtw_adapter_proc_write(struct file *file, const char __user *buff + return -EROFS; + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)) + static const struct file_operations rtw_adapter_proc_fops = { + .owner = THIS_MODULE, + .open = rtw_adapter_proc_open, +@@ -784,6 +801,15 @@ static const struct file_operations rtw_adapter_proc_fops = { + .release = single_release, + .write = rtw_adapter_proc_write, + }; ++#else ++static const struct proc_ops rtw_adapter_proc_fops = { ++ .proc_open = rtw_adapter_proc_open, ++ .proc_read = seq_read, ++ .proc_lseek = seq_lseek, ++ .proc_release = single_release, ++ .proc_write = rtw_adapter_proc_write, ++}; ++#endif + + int proc_get_odm_dbg_comp(struct seq_file *m, void *v) + { +@@ -1030,6 +1056,7 @@ static ssize_t rtw_odm_proc_write(struct file *file, const char __user *buffer, + return -EROFS; + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)) + static const struct file_operations rtw_odm_proc_fops = { + .owner = THIS_MODULE, + .open = rtw_odm_proc_open, +@@ -1038,6 +1065,15 @@ static const struct file_operations rtw_odm_proc_fops = { + .release = single_release, + .write = rtw_odm_proc_write, + }; ++#else ++static const struct proc_ops rtw_odm_proc_fops = { ++ .proc_open = rtw_odm_proc_open, ++ .proc_read = seq_read, ++ .proc_lseek = seq_lseek, ++ .proc_release = single_release, ++ .proc_write = rtw_odm_proc_write, ++}; ++#endif + + struct proc_dir_entry *rtw_odm_proc_init(struct net_device *dev) + { +-- +2.28.0 + diff --git a/package/runc/runc.hash b/package/runc/runc.hash index b895f6fccb5..d792947d5ff 100644 --- a/package/runc/runc.hash +++ b/package/runc/runc.hash @@ -1,3 +1,3 @@ # Locally computed -sha256 6b44985023347fb9c5a2cc6f761df8c41cc2c84a7a68a6e6acf834dff6653a9a runc-1.0.0-rc10.tar.gz +sha256 28378df983a3c586ed3ec8c76a774a9b10f36a0c323590a284b801cce95cc61f runc-1.0.0-rc92.tar.gz sha256 552a739c3b25792263f731542238b92f6f8d07e9a488eae27e6c4690038a8243 LICENSE diff --git a/package/runc/runc.mk b/package/runc/runc.mk index 4c2f84ab161..3d177d23d51 100644 --- a/package/runc/runc.mk +++ b/package/runc/runc.mk @@ -4,15 +4,12 @@ # ################################################################################ -RUNC_VERSION = 1.0.0-rc10 +RUNC_VERSION = 1.0.0-rc92 RUNC_SITE = $(call github,opencontainers,runc,v$(RUNC_VERSION)) RUNC_LICENSE = Apache-2.0 RUNC_LICENSE_FILES = LICENSE -RUNC_WORKSPACE = Godeps/_workspace - RUNC_LDFLAGS = -X main.gitCommit=$(RUNC_VERSION) - RUNC_TAGS = cgo static_build ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) diff --git a/package/samba4/0001-libreplace-disable-libbsd-support.patch b/package/samba4/0001-libreplace-disable-libbsd-support.patch index a303fa6669b..79216860dd8 100644 --- a/package/samba4/0001-libreplace-disable-libbsd-support.patch +++ b/package/samba4/0001-libreplace-disable-libbsd-support.patch @@ -9,7 +9,7 @@ This causes redefinition conflicts for link(2) when both standard unistd.h and bsd/unistd.h get included. Signed-off-by: Gustavo Zacarias -[Bernd: rebased for versions 4.7.3, 4.8.0 & 4.8.5] +[Bernd: rebased for versions 4.7.3, 4.8.0, 4.8.5 & 4.11.13] Signed-off-by: Bernd Kuhls --- lib/replace/wscript | 15 --------------- @@ -19,7 +19,7 @@ diff --git a/lib/replace/wscript b/lib/replace/wscript index 240d730cbee..c6d8df43c74 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript -@@ -381,21 +381,6 @@ def configure(conf): +@@ -406,21 +406,6 @@ def configure(conf): strlcpy_in_bsd = False diff --git a/package/samba4/0002-build-find-pre-built-heimdal-build-tools-in-case-of-.patch b/package/samba4/0002-build-find-pre-built-heimdal-build-tools-in-case-of-.patch index 563b274d57d..b8636958ee2 100644 --- a/package/samba4/0002-build-find-pre-built-heimdal-build-tools-in-case-of-.patch +++ b/package/samba4/0002-build-find-pre-built-heimdal-build-tools-in-case-of-.patch @@ -33,6 +33,7 @@ BUG: https://bugzilla.samba.org/show_bug.cgi?id=14164 Signed-off-by: Uri Simchoni Signed-off-by: Bernd Kuhls +[Bernd: rebased for version 4.11.13] --- wscript_configure_embedded_heimdal | 11 +++++++++++ wscript_configure_system_heimdal | 11 ----------- @@ -59,7 +60,7 @@ diff --git a/wscript_configure_system_heimdal b/wscript_configure_system_heimdal index 0ff6dad2f55..f77c177442f 100644 --- a/wscript_configure_system_heimdal +++ b/wscript_configure_system_heimdal -@@ -36,14 +36,6 @@ def check_system_heimdal_lib(name, functions='', headers='', onlyif=None): +@@ -37,14 +37,6 @@ def check_system_heimdal_lib(name, functions='', headers='', onlyif=None): conf.define('USING_SYSTEM_%s' % name.upper(), 1) return True @@ -74,7 +75,7 @@ index 0ff6dad2f55..f77c177442f 100644 check_system_heimdal_lib("com_err", "com_right_r com_err", "com_err.h") if check_system_heimdal_lib("roken", "rk_socket_set_reuseaddr", "roken.h"): -@@ -88,7 +88,4 @@ +@@ -96,7 +96,4 @@ #if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'): # conf.define('USING_SYSTEM_TOMMATH', 1) diff --git a/package/samba4/samba4.hash b/package/samba4/samba4.hash index 34ae6f84bca..4d47871fc5a 100644 --- a/package/samba4/samba4.hash +++ b/package/samba4/samba4.hash @@ -1,4 +1,4 @@ # Locally calculated after checking pgp signature -# https://download.samba.org/pub/samba/stable/samba-4.11.10.tar.asc -sha256 4346ed80c90132a4117fe2dd3e846954f44f006f4d057de3a3544116364e012f samba-4.11.10.tar.gz +# https://download.samba.org/pub/samba/stable/samba-4.11.13.tar.asc +sha256 e71ed29ae01c5ce7be8cee1f53e0530db86dd19b911accb08fae60224e686ba1 samba-4.11.13.tar.gz sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/samba4/samba4.mk b/package/samba4/samba4.mk index b6fe1a827cf..48ac48c1800 100644 --- a/package/samba4/samba4.mk +++ b/package/samba4/samba4.mk @@ -4,7 +4,7 @@ # ################################################################################ -SAMBA4_VERSION = 4.11.10 +SAMBA4_VERSION = 4.11.13 SAMBA4_SITE = https://download.samba.org/pub/samba/stable SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz SAMBA4_INSTALL_STAGING = YES diff --git a/package/socketcand/0001-Fix-GCC10-build-failure.patch b/package/socketcand/0001-Fix-GCC10-build-failure.patch new file mode 100644 index 00000000000..057cd406575 --- /dev/null +++ b/package/socketcand/0001-Fix-GCC10-build-failure.patch @@ -0,0 +1,113 @@ +From ae0af080058a576d62c72ffc011d644d0b4dcb98 Mon Sep 17 00:00:00 2001 +From: Yegor Yefremov +Date: Tue, 7 Jul 2020 19:39:41 +0200 +Subject: [PATCH] Fix GCC10 build failure (#17) + +GCC10 breaks on multiple definitions: + +ld: /tmp/ccFiGYO7.o:(.bss+0x114): multiple definition of `tv'; /tmp/cc7f6J5h.o:(.bss+0x80): first defined here + +Change the scope of the related variables. + +Signed-off-by: Yegor Yefremov + +[Retrieved from: +https://github.com/linux-can/socketcand/commit/ae0af080058a576d62c72ffc011d644d0b4dcb98] +Signed-off-by: Fabrice Fontaine +--- + socketcand.c | 3 ++- + state_bcm.c | 4 ++-- + state_isotp.c | 2 +- + state_raw.c | 2 +- + 4 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/socketcand.c b/socketcand.c +index 8d84754..6125be9 100644 +--- a/socketcand.c ++++ b/socketcand.c +@@ -102,7 +102,6 @@ socklen_t unaddrlen; + struct sockaddr_un remote_unaddr; + socklen_t remote_unaddrlen; + char* interface_string; +-struct ifreq ifr, ifr_brd; + + int state_changed(char *buf, int current_state) + { +@@ -666,6 +665,8 @@ int receive_command(int socket, char *buffer) { + } + + void determine_adress() { ++ struct ifreq ifr, ifr_brd; ++ + int probe_socket = socket(AF_INET, SOCK_DGRAM, 0); + + if(probe_socket < 0) { +diff --git a/state_bcm.c b/state_bcm.c +index cfaa8ed..05a5f7c 100644 +--- a/state_bcm.c ++++ b/state_bcm.c +@@ -28,8 +28,6 @@ + #define RXLEN 128 + + int sc = -1; +-fd_set readfds; +-struct timeval tv; + + void state_bcm() { + int i, j, ret; +@@ -38,6 +36,7 @@ void state_bcm() { + struct ifreq ifr; + char rxmsg[RXLEN]; + char buf[MAXLEN]; ++ fd_set readfds; + + struct { + struct bcm_msg_head msg_head; +@@ -91,6 +90,7 @@ void state_bcm() { + } + + if (FD_ISSET(sc, &readfds)) { ++ struct timeval tv; + + ret = recvfrom(sc, &msg, sizeof(msg), 0, + (struct sockaddr*)&caddr, &caddrlen); +diff --git a/state_isotp.c b/state_isotp.c +index 5c671f9..e1b944b 100644 +--- a/state_isotp.c ++++ b/state_isotp.c +@@ -25,7 +25,6 @@ + #include + + int si = -1; +-fd_set readfds; + + void state_isotp() { + int i, items, ret; +@@ -39,6 +38,7 @@ void state_isotp() { + char buf[MAXLEN]; /* inet commands to can */ + unsigned char isobuf[ISOTPLEN+1]; /* binary buffer for isotp socket */ + unsigned char tmp; ++ fd_set readfds; + + while(previous_state != STATE_ISOTP) { + +diff --git a/state_raw.c b/state_raw.c +index e83e6ec..2c49975 100644 +--- a/state_raw.c ++++ b/state_raw.c +@@ -25,7 +25,6 @@ + int raw_socket; + struct ifreq ifr; + struct sockaddr_can addr; +-fd_set readfds; + struct msghdr msg; + struct can_frame frame; + struct iovec iov; +@@ -36,6 +35,7 @@ struct cmsghdr *cmsg; + void state_raw() { + char buf[MAXLEN]; + int i, ret, items; ++ fd_set readfds; + + if(previous_state != STATE_RAW) { + diff --git a/package/socketcand/socketcand.hash b/package/socketcand/socketcand.hash index 6ee0c314a81..713939897dc 100644 --- a/package/socketcand/socketcand.hash +++ b/package/socketcand/socketcand.hash @@ -1,3 +1,3 @@ # Locally computed sha256 3c5cc7af4ff707ac344e62d2e37a74b59aeccd14b88e837cc142c52b69d64a39 socketcand-69e2201222f015a1abe7a58ecf61325012cd91b1.tar.gz -sha256 b32028a4080be38208ee951c6e8afc6f3bfb3d5496559b260ab0dce9472740f6 socketcand.c +sha256 18bda0db4e3c56cefdb1b9b01b7eada7764c0746f6321378c30d78f5ee81cfee socketcand.c diff --git a/package/strace/strace.mk b/package/strace/strace.mk index ec88690f24a..5098663201c 100644 --- a/package/strace/strace.mk +++ b/package/strace/strace.mk @@ -9,15 +9,7 @@ STRACE_SOURCE = strace-$(STRACE_VERSION).tar.xz STRACE_SITE = https://strace.io/files/$(STRACE_VERSION) STRACE_LICENSE = LGPL-2.1+ STRACE_LICENSE_FILES = COPYING LGPL-2.1-or-later -STRACE_CONF_OPTS = --enable-mpers=check - -# strace bundle some kernel headers to build libmpers, this mixes userspace -# headers and kernel headers which break the build with musl. -# The stddef.h from gcc is used instead of the one from musl. -ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) -STRACE_CONF_OPTS += st_cv_m32_mpers=no \ - st_cv_mx32_mpers=no -endif +STRACE_CONF_OPTS = --enable-mpers=no ifeq ($(BR2_PACKAGE_LIBUNWIND),y) STRACE_DEPENDENCIES += libunwind diff --git a/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch b/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch new file mode 100644 index 00000000000..9fac20a3f8e --- /dev/null +++ b/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch @@ -0,0 +1,35 @@ +From 23d0bb0ef0fde52d1cffe235edead09287326fb4 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 4 Oct 2020 01:11:30 +0200 +Subject: [PATCH] CMakeLists.txt: compile squirrel with -fPIC + +Ensure that squirrel is compiled with -fPIC to allow linking the static +libraries with dynamically linked programs. This is not a requirement +for most architectures but is mandatory for ARM. + +Fixes: +x86_64-buildroot-linux-musl/bin/ld: CMakeFiles/sq_static.dir/sq.c.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC +x86_64-buildroot-linux-musl/bin/ld: final link failed: nonrepresentable section on output + +Signed-off-by: Romain Naour +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b1dafa1e..07c603cce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -412,7 +412,8 @@ ExternalProject_Add(squirrel + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} + -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX} +- -DINSTALL_INC_DIR=include) ++ -DINSTALL_INC_DIR=include ++ -DCMAKE_POSITION_INDEPENDENT_CODE=ON) + + if(WIN32) + add_library(squirrel_lib SHARED IMPORTED) +-- +2.25.4 + diff --git a/package/suricata/suricata.hash b/package/suricata/suricata.hash index 05e3593c3b3..9e79f3a96cd 100644 --- a/package/suricata/suricata.hash +++ b/package/suricata/suricata.hash @@ -1,5 +1,5 @@ # Locally computed: -sha256 c8a83a05f57cedc0ef81d833ddcfdbbfdcdb6f459a91b1b15dc2d5671f1aecbb suricata-4.1.8.tar.gz +sha256 3440cd1065b1b3999dc101a37c49321fab2791b38f16e2f7fe27369dd007eea7 suricata-4.1.9.tar.gz # Hash for license files: sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/suricata/suricata.mk b/package/suricata/suricata.mk index 8dd23bf2f5f..d6ae48c1f5d 100644 --- a/package/suricata/suricata.mk +++ b/package/suricata/suricata.mk @@ -4,7 +4,7 @@ # ################################################################################ -SURICATA_VERSION = 4.1.8 +SURICATA_VERSION = 4.1.9 SURICATA_SITE = https://www.openinfosecfoundation.org/download SURICATA_LICENSE = GPL-2.0 SURICATA_LICENSE_FILES = COPYING LICENSE diff --git a/package/systemd/systemd.hash b/package/systemd/systemd.hash index 4672e434227..cad249199c2 100644 --- a/package/systemd/systemd.hash +++ b/package/systemd/systemd.hash @@ -1,6 +1,6 @@ # sha256 locally computed -sha256 4268bd88037806c61c5cd1c78d869f7f20bf7e7368c63916d47b5d1c3411bd6f systemd-246.tar.gz +sha256 f45c5a98d3be7dd05ed7f1e1a0ab00c7ba52602aa2dc42615bf74be61fcbe178 systemd-246.5.tar.gz sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 LICENSE.GPL2 sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LICENSE.LGPL2.1 -sha256 a5ce42cd4614b086ef75aae6663f88f55bdf9e09a83c615c636ca540282528cf README +sha256 b142af99a3d950fb465326d6fd5a49d348523dc0d216682880527264d0a011e9 README sha256 83bb6bd9ccd2cf5230cb1807ed16258289768dc4d9cb80069a814e04415a1275 tools/chromiumos/LICENSE diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index 81fa2bd0f05..c40f8c2c848 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -4,8 +4,8 @@ # ################################################################################ -SYSTEMD_VERSION = 246 -SYSTEMD_SITE = $(call github,systemd,systemd,v$(SYSTEMD_VERSION)) +SYSTEMD_VERSION = 246.5 +SYSTEMD_SITE = $(call github,systemd,systemd-stable,v$(SYSTEMD_VERSION)) SYSTEMD_LICENSE = LGPL-2.1+, GPL-2.0+ (udev), Public Domain (few source files, see README), BSD-3-Clause (tools/chromiumos) SYSTEMD_LICENSE_FILES = LICENSE.GPL2 LICENSE.LGPL2.1 README tools/chromiumos/LICENSE SYSTEMD_INSTALL_STAGING = YES @@ -701,7 +701,8 @@ HOST_SYSTEMD_CONF_OPTS = \ -Dkernel-install=false \ -Dsystemd-analyze=false \ -Dlibcryptsetup=false \ - -Daudit=false + -Daudit=false \ + -Dzstd=false HOST_SYSTEMD_DEPENDENCIES = \ $(BR2_COREUTILS_HOST_DEPENDENCY) \ diff --git a/package/ti-utils/0001-plt.h-fix-build-with-gcc-10.patch b/package/ti-utils/0001-plt.h-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..e36b735e89e --- /dev/null +++ b/package/ti-utils/0001-plt.h-fix-build-with-gcc-10.patch @@ -0,0 +1,35 @@ +From 9ed1946cef876acd5346ae806eecd7fc2e1e5341 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 3 Oct 2020 10:32:48 +0200 +Subject: [PATCH] plt.h: fix build with gcc 10 + +Drop EFUSE_PARAMETER_TYPE_ENM to avoid the following build failure with +gcc 10 (which defaults to -fno-common): + +/home/naourr/work/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: misc_cmds.o:(.bss+0x0): multiple definition of `EFUSE_PARAMETER_TYPE_ENM'; nvs.o:(.bss+0x0): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/e96c70910544085dc5299fa59f80ab9c5922fde2 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/gxk/ti-utils/pull/2] +--- + plt.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plt.h b/plt.h +index 523fded..8ba01c9 100644 +--- a/plt.h ++++ b/plt.h +@@ -363,7 +363,7 @@ enum EFUSE_PARAMETER_TYPE_ENMT { + TX_BIP_PD_BUFFER_VBIAS_ERROR_E, + EFUSE_NUMBER_OF_PARAMETERS_E, + EFUSE_LAST_PARAMETER_E = (EFUSE_NUMBER_OF_PARAMETERS_E - 1) +-} EFUSE_PARAMETER_TYPE_ENM; ++}; + + int get_mac_addr(int ifc_num, unsigned char *mac_addr); + +-- +2.28.0 + diff --git a/package/tini/tini.mk b/package/tini/tini.mk index 157477f8dff..05d3395a223 100644 --- a/package/tini/tini.mk +++ b/package/tini/tini.mk @@ -30,6 +30,9 @@ endef define TINI_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0755 $(@D)/bin/tini $(TARGET_DIR)/usr/bin/tini + if [ ! -f $(TARGET_DIR)/usr/bin/docker-init ]; then \ + ln -sf /usr/bin/tini $(TARGET_DIR)/usr/bin/docker-init; \ + fi endef # Tini's CMakeLists.txt is not suitable for Buildroot. diff --git a/package/trinity/0001-Fix-build-with-GCC-10.patch b/package/trinity/0001-Fix-build-with-GCC-10.patch new file mode 100644 index 00000000000..5ae3735db28 --- /dev/null +++ b/package/trinity/0001-Fix-build-with-GCC-10.patch @@ -0,0 +1,38 @@ +From e53e25cc8dd5bdb5f7d9b4247de9e9921eec81d8 Mon Sep 17 00:00:00 2001 +From: Vinson Lee +Date: Thu, 30 Jan 2020 22:09:45 -0800 +Subject: [PATCH] Fix build with GCC 10. + + CC trinity +/usr/bin/ld: debug.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: log-files.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: log.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: main.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: output.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: params.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: shm.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: trinity.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here + +Fixes: 13856316c259 ("reinstate the log-to-file code for now.") +Signed-off-by: Vinson Lee + +[Retrieved from: +https://github.com/kernelslacker/trinity/commit/e53e25cc8dd5bdb5f7d9b4247de9e9921eec81d8] +Signed-off-by: Fabrice Fontaine +--- + include/logfile.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/logfile.h b/include/logfile.h +index 90ea8b23..2305ac15 100644 +--- a/include/logfile.h ++++ b/include/logfile.h +@@ -5,7 +5,7 @@ + FILE *find_logfile_handle(void); + void synclogs(void); + +-FILE *mainlogfile; ++extern FILE *mainlogfile; + void open_main_logfile(void); + void close_logfile(FILE **handle); + diff --git a/package/uclibc/0002-fix-static-builds-with-gcc-10.x.patch b/package/uclibc/0002-fix-static-builds-with-gcc-10.x.patch new file mode 100644 index 00000000000..0aefe3d82eb --- /dev/null +++ b/package/uclibc/0002-fix-static-builds-with-gcc-10.x.patch @@ -0,0 +1,27 @@ +From 4deace34cfcc5476b71a9cdc05828f5a48d1cd74 Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Thu, 3 Sep 2020 15:08:24 +0200 +Subject: [PATCH] fix static builds with gcc 10.x + +[petr.vorel@gmail.com: backport of upstream commit 4deace34cfcc5476b71a9cdc05828f5a48d1cd74] +Signed-off-by: Petr Vorel +--- + Rules.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Rules.mak b/Rules.mak +index f270b7bee..55e88d462 100644 +--- a/Rules.mak ++++ b/Rules.mak +@@ -288,7 +288,7 @@ OPTIMIZATION += $(CFLAG_-fstrict-aliasing) + + # Why -funsigned-char: I hunted a bug related to incorrect + # sign extension of 'char' type for 10 hours straight. Not fun. +-CPU_CFLAGS-y := -funsigned-char -fno-builtin ++CPU_CFLAGS-y := -funsigned-char -fno-builtin -fcommon + + $(eval $(call check-gcc-var,-fno-asm)) + CPU_CFLAGS-y += $(CFLAG_-fno-asm) +-- +2.27.0.rc0 + diff --git a/package/usb_modeswitch/usb_modeswitch.mk b/package/usb_modeswitch/usb_modeswitch.mk index 7e9ed422b60..064e1960b09 100644 --- a/package/usb_modeswitch/usb_modeswitch.mk +++ b/package/usb_modeswitch/usb_modeswitch.mk @@ -17,12 +17,11 @@ USB_MODESWITCH_BUILD_TARGETS = all USB_MODESWITCH_INSTALL_TARGETS = install-script else USB_MODESWITCH_DEPENDENCIES += jimtcl +USB_MODESWITCH_INSTALL_TARGETS = install-common ifeq ($(BR2_STATIC_LIBS),y) USB_MODESWITCH_BUILD_TARGETS = all-with-statlink-dispatcher -USB_MODESWITCH_INSTALL_TARGETS = install-statlink else USB_MODESWITCH_BUILD_TARGETS = all-with-dynlink-dispatcher -USB_MODESWITCH_INSTALL_TARGETS = install-dynlink endif endif diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk index 38d97516908..ccaaa6cd6d8 100644 --- a/package/vlc/vlc.mk +++ b/package/vlc/vlc.mk @@ -440,6 +440,9 @@ endif ifeq ($(BR2_PACKAGE_LIVE555),y) VLC_CONF_OPTS += --enable-live555 VLC_DEPENDENCIES += live555 +ifneq ($(BR2_PACKAGE_OPENSSL),y) +VLC_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -DNO_OPENSSL" +endif else VLC_CONF_OPTS += --disable-live555 endif diff --git a/package/vsftpd/0003-fix-CVE-2015-1419.patch b/package/vsftpd/0002-fix-CVE-2015-1419.patch similarity index 100% rename from package/vsftpd/0003-fix-CVE-2015-1419.patch rename to package/vsftpd/0002-fix-CVE-2015-1419.patch diff --git a/package/vsftpd/0004-Prevent-hang-in-SIGCHLD-handler.patch b/package/vsftpd/0003-Prevent-hang-in-SIGCHLD-handler.patch similarity index 100% rename from package/vsftpd/0004-Prevent-hang-in-SIGCHLD-handler.patch rename to package/vsftpd/0003-Prevent-hang-in-SIGCHLD-handler.patch diff --git a/package/w_scan/0002-si_types-h-fix-build-with-gcc-10.patch b/package/w_scan/0002-si_types-h-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..50d2488190f --- /dev/null +++ b/package/w_scan/0002-si_types-h-fix-build-with-gcc-10.patch @@ -0,0 +1,37 @@ +si_types.h: fix build with gcc 10 + +Drop service_t, p_service_t, transponder_t and p_transponder_t to avoid +the following build failure with gcc 10 (which defaults to -fno-common): + +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/bin/arm-buildroot-linux-gnueabihf-gcc -Wall -Wextra -Wno-comment -Wswitch-default -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -lrt -o w_scan atsc_psip_section.o countries.o descriptors.o diseqc.o dump-dvbscan.o dump-vdr.o dump-xine.o dump-mplayer.o dump-vlc-m3u.o dvbscan.o lnb.o parse-dvbscan.o satellites.o scan.o section.o tools.o emulate.o dump-xml.o iconv_codes.o char-coding.o +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: descriptors.o:(.bss+0x404): multiple definition of `p_transponder_t'; countries.o:(.bss+0x0): first defined here +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: descriptors.o:(.bss+0x408): multiple definition of `transponder_t'; countries.o:(.bss+0x4): first defined here +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: descriptors.o:(.bss+0x480): multiple definition of `p_service_t'; countries.o:(.bss+0x7c): first defined here +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: descriptors.o:(.bss+0x484): multiple definition of `service_t'; countries.o:(.bss+0x80): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/5640442cb4ba06bcbcf31540a64f5665862d39f7 + +Signed-off-by: Fabrice Fontaine + +diff -Nura w_scan-20170107.orig/si_types.h w_scan-20170107/si_types.h +--- w_scan-20170107.orig/si_types.h 2020-09-20 11:09:56.776963441 +0200 ++++ w_scan-20170107/si_types.h 2020-09-20 11:13:13.149232478 +0200 +@@ -114,7 +114,7 @@ + uint32_t logical_channel_number; + uint8_t running; + void * priv; +-} service_t, * p_service_t; ++}; + + /******************************************************************************* + /* transponder type. +@@ -201,7 +201,7 @@ + /*----------------------------*/ + char * network_name; + network_change_t network_change; +-} __attribute__((packed)) transponder_t, * p_transponder_t; ++} __attribute__((packed)); + + /******************************************************************************* + /* satellite channel routing type. diff --git a/package/wampcc/0003-Broken-build-on-Windows.patch b/package/wampcc/0003-Broken-build-on-Windows.patch new file mode 100644 index 00000000000..3c528cd888c --- /dev/null +++ b/package/wampcc/0003-Broken-build-on-Windows.patch @@ -0,0 +1,27 @@ +From eaa70a289288db1e8d90a2a9bcde435a8975fe74 Mon Sep 17 00:00:00 2001 +From: Sergey Lukashevich +Date: Fri, 26 Jul 2019 21:58:34 +0300 +Subject: [PATCH] Broken build on Windows: "http_parser.h(66,18): error C2039: + 'runtime_error': is not a member of 'std'" + +Add missing include. + +[Retrieved from: +https://github.com/darrenjs/wampcc/commit/eaa70a289288db1e8d90a2a9bcde435a8975fe74] +Signed-off-by: Fabrice Fontaine +--- + include/wampcc/http_parser.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/wampcc/http_parser.h b/include/wampcc/http_parser.h +index a9405dd..4c20417 100644 +--- a/include/wampcc/http_parser.h ++++ b/include/wampcc/http_parser.h +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + // types brought in from nodejs http-parser project + struct http_parser; diff --git a/package/wayland-protocols/wayland-protocols.mk b/package/wayland-protocols/wayland-protocols.mk index ed60d1c9958..84028b97d58 100644 --- a/package/wayland-protocols/wayland-protocols.mk +++ b/package/wayland-protocols/wayland-protocols.mk @@ -5,7 +5,7 @@ ################################################################################ WAYLAND_PROTOCOLS_VERSION = 1.20 -WAYLAND_PROTOCOLS_SITE = http://wayland.freedesktop.org/releases +WAYLAND_PROTOCOLS_SITE = https://wayland.freedesktop.org/releases WAYLAND_PROTOCOLS_SOURCE = wayland-protocols-$(WAYLAND_PROTOCOLS_VERSION).tar.xz WAYLAND_PROTOCOLS_LICENSE = MIT WAYLAND_PROTOCOLS_LICENSE_FILES = COPYING diff --git a/package/wireguard-linux-compat/wireguard-linux-compat.hash b/package/wireguard-linux-compat/wireguard-linux-compat.hash index ac160cdf9dc..833e1af2fc4 100644 --- a/package/wireguard-linux-compat/wireguard-linux-compat.hash +++ b/package/wireguard-linux-compat/wireguard-linux-compat.hash @@ -1,4 +1,4 @@ -# https://lists.zx2c4.com/pipermail/wireguard/2020-June/005597.html -sha256 130937724515799edf05ff8216bc837df8acda879428f3a7f96a3287758f9445 wireguard-linux-compat-1.0.20200623.tar.xz +# https://lists.zx2c4.com/pipermail/wireguard/2020-September/005817.html +sha256 ad33b2d2267a37e0f65c97e65e7d4d926d5aef7d530c251b63fbf919048eead9 wireguard-linux-compat-1.0.20200908.tar.xz # Locally calculated sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/wireguard-linux-compat/wireguard-linux-compat.mk b/package/wireguard-linux-compat/wireguard-linux-compat.mk index 5e8636072cb..082d10c53b1 100644 --- a/package/wireguard-linux-compat/wireguard-linux-compat.mk +++ b/package/wireguard-linux-compat/wireguard-linux-compat.mk @@ -4,7 +4,7 @@ # ################################################################################ -WIREGUARD_LINUX_COMPAT_VERSION = 1.0.20200623 +WIREGUARD_LINUX_COMPAT_VERSION = 1.0.20200908 WIREGUARD_LINUX_COMPAT_SITE = https://git.zx2c4.com/wireguard-linux-compat/snapshot WIREGUARD_LINUX_COMPAT_SOURCE = wireguard-linux-compat-$(WIREGUARD_LINUX_COMPAT_VERSION).tar.xz WIREGUARD_LINUX_COMPAT_LICENSE = GPL-2.0 diff --git a/package/wireshark/wireshark.hash b/package/wireshark/wireshark.hash index c9f62ad1a81..16866d96b49 100644 --- a/package/wireshark/wireshark.hash +++ b/package/wireshark/wireshark.hash @@ -1,6 +1,6 @@ -# From https://www.wireshark.org/download/src/all-versions/SIGNATURES-3.2.6.txt -sha1 e8f3e6cb9072670c8bdbbff7e5fe3ccd5203d35e wireshark-3.2.6.tar.xz -sha256 ebb1eebe39bcecee02195dc328dd25f6862fc9e9dea4c2e29eae50537d5eb4f2 wireshark-3.2.6.tar.xz +# From https://www.wireshark.org/download/src/all-versions/SIGNATURES-3.2.7.txt +sha1 b564c2e729066cb7c952463fef6163e23a5fea1e wireshark-3.2.7.tar.xz +sha256 be832fb86d9c455c5be8b225a755cdc77cb0e92356bdfc1fe4b000d93f7d70da wireshark-3.2.7.tar.xz # Locally calculated sha256 7cdbed2b697efaa45576a033f1ac0e73cd045644a91c79bbf41d4a7d81dac7bf COPYING diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk index 04e3e13ff17..354f008250e 100644 --- a/package/wireshark/wireshark.mk +++ b/package/wireshark/wireshark.mk @@ -4,7 +4,7 @@ # ################################################################################ -WIRESHARK_VERSION = 3.2.6 +WIRESHARK_VERSION = 3.2.7 WIRESHARK_SOURCE = wireshark-$(WIRESHARK_VERSION).tar.xz WIRESHARK_SITE = https://www.wireshark.org/download/src/all-versions WIRESHARK_LICENSE = wireshark license diff --git a/package/wlroots/wlroots.mk b/package/wlroots/wlroots.mk index 988643485f5..8b646b45363 100644 --- a/package/wlroots/wlroots.mk +++ b/package/wlroots/wlroots.mk @@ -21,7 +21,7 @@ WLROOTS_DEPENDENCIES = \ wayland \ wayland-protocols -WLROOTS_CONF_OPTS = -Dexamples=false +WLROOTS_CONF_OPTS = -Dexamples=false -Dxcb-errors=disabled ifeq ($(BR2_PACKAGE_FFMPEG),y) WLROOTS_DEPENDENCIES += ffmpeg @@ -59,13 +59,6 @@ else WLROOTS_CONF_OPTS += -Dxwayland=disabled endif -ifeq ($(BR2_PACKAGE_XCB_UTIL),y) -WLROOTS_CONF_OPTS += -Dxcb-errors=enabled -WLROOTS_DEPENDENCIES += xcb-util -else -WLROOTS_CONF_OPTS += -Dxcb-errors=disabled -endif - ifeq ($(BR2_PACKAGE_XCB_UTIL_WM),y) WLROOTS_CONF_OPTS += -Dxcb-icccm=enabled WLROOTS_DEPENDENCIES += xcb-util-wm diff --git a/package/wolfssl/wolfssl.mk b/package/wolfssl/wolfssl.mk index 5400b35fa52..e2833144fb3 100644 --- a/package/wolfssl/wolfssl.mk +++ b/package/wolfssl/wolfssl.mk @@ -17,6 +17,8 @@ WOLFSSL_DEPENDENCIES = host-pkgconf # script, so we need autoreconf WOLFSSL_AUTORECONF = YES +WOLFSSL_CONF_OPTS = --disable-examples --disable-crypttests + ifeq ($(BR2_PACKAGE_WOLFSSL_ALL),y) WOLFSSL_CONF_OPTS += --enable-all else diff --git a/package/x11r7/xdriver_xf86-video-ati/0001-Fix-link-failure-with-gcc-10.patch b/package/x11r7/xdriver_xf86-video-ati/0001-Fix-link-failure-with-gcc-10.patch new file mode 100644 index 00000000000..b7a66c5c272 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/0001-Fix-link-failure-with-gcc-10.patch @@ -0,0 +1,35 @@ +From f223035f4ffcff2a9296d1e907a5193f8e8845a3 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 4 Feb 2020 16:38:06 -0500 +Subject: [PATCH xf86-video-ati] Fix link failure with gcc 10 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Without the 'extern' this looks like a definition not just a +declaration, in every file that includes the header. gcc 10 is stricter +about this kind of multiple definition. + +Reviewed-by: Michel Dänzer +[backport from upstream: f223035f4ffcff2a9296d1e907a5193f8e8845a3] +Signed-off-by: Romain Naour +--- + src/drmmode_display.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/drmmode_display.h b/src/drmmode_display.h +index 96eaef0a..8cd8a0a6 100644 +--- a/src/drmmode_display.h ++++ b/src/drmmode_display.h +@@ -262,7 +262,7 @@ Bool drmmode_wait_vblank(xf86CrtcPtr crtc, drmVBlankSeqType type, + uint64_t *ust, uint32_t *result_seq); + + +-miPointerSpriteFuncRec drmmode_sprite_funcs; ++extern miPointerSpriteFuncRec drmmode_sprite_funcs; + + + #endif +-- +2.25.4 + diff --git a/package/x11r7/xserver_xorg-server/1.20.9/0006-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch b/package/x11r7/xserver_xorg-server/1.20.9/0006-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch new file mode 100644 index 00000000000..7802fd96c95 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/1.20.9/0006-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch @@ -0,0 +1,33 @@ +From e50c85f4ebf559a3bac4817b41074c43d4691779 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 26 Oct 2018 17:47:30 -0700 +Subject: [PATCH] Fix segfault on probing a non-PCI platform device on a system + with PCI. + +Some Broadcom set-top-box boards have PCI busses, but the GPU is still +probed through DT. We would dereference a null busid here in that +case. + +Signed-off-by: Eric Anholt +Backported from: e50c85f4ebf559a3bac4817b41074c43d4691779 +Signed-off-by: Joseph Kogut +--- + hw/xfree86/common/xf86platformBus.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c +index cef47da03..dadbac6c8 100644 +--- a/hw/xfree86/common/xf86platformBus.c ++++ b/hw/xfree86/common/xf86platformBus.c +@@ -289,7 +289,7 @@ xf86platformProbe(void) + for (i = 0; i < xf86_num_platform_devices; i++) { + char *busid = xf86_platform_odev_attributes(i)->busid; + +- if (pci && (strncmp(busid, "pci:", 4) == 0)) { ++ if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) { + platform_find_pci_info(&xf86_platform_devices[i], busid); + } + +-- +2.24.1 + diff --git a/package/xerces/Config.in b/package/xerces/Config.in index d3f4967413a..828b5dd2a04 100644 --- a/package/xerces/Config.in +++ b/package/xerces/Config.in @@ -1,7 +1,7 @@ config BR2_PACKAGE_XERCES bool "xerces-c++" depends on BR2_INSTALL_LIBSTDCPP - depends on USE_WCHAR + depends on BR2_USE_WCHAR help Xerces-C++ is a validating XML parser written in portable C++. diff --git a/package/xfsprogs/0003-xfsprogs-do-not-redeclare-globals-provided-by-libraries.patch b/package/xfsprogs/0003-xfsprogs-do-not-redeclare-globals-provided-by-libraries.patch new file mode 100644 index 00000000000..ef2053e9bbc --- /dev/null +++ b/package/xfsprogs/0003-xfsprogs-do-not-redeclare-globals-provided-by-libraries.patch @@ -0,0 +1,83 @@ +From 123b851389ef9a012a469ef982ac7b819db59342 Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Thu, 30 Jan 2020 13:34:17 -0500 +Subject: xfsprogs: do not redeclare globals provided by libraries + +In each of these cases, db, logprint, and mdrestore are redeclaring +as a global variable something which was already provided by a +library they link with. + +gcc now defaults to -fno-common and trips over these global variables +which are declared in utilities as well as in libxfs and libxlog, and +it causes the build to fail. + +Signed-off-by: Eric Sandeen +Reviewed-by: Darrick J. Wong +Reviewed-by: Christoph Hellwig +Signed-off-by: Eric Sandeen + +[Retrieved from: +https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=123b851389ef9a012a469ef982ac7b819db59342] +Signed-off-by: Fabrice Fontaine +--- + db/init.c | 1 - + logprint/logprint.c | 4 ++-- + mdrestore/xfs_mdrestore.c | 1 - + 3 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/db/init.c b/db/init.c +index 455220a86..0ac373685 100644 +--- a/db/init.c ++++ b/db/init.c +@@ -27,7 +27,6 @@ static int force; + static struct xfs_mount xmount; + struct xfs_mount *mp; + static struct xlog xlog; +-libxfs_init_t x; + xfs_agnumber_t cur_agno = NULLAGNUMBER; + + static void +diff --git a/logprint/logprint.c b/logprint/logprint.c +index 7754a2a6e..511a32aca 100644 +--- a/logprint/logprint.c ++++ b/logprint/logprint.c +@@ -24,7 +24,6 @@ int print_buffer; + int print_overwrite; + int print_no_data; + int print_no_print; +-int print_exit = 1; /* -e is now default. specify -c to override */ + static int print_operation = OP_PRINT; + + static void +@@ -132,6 +131,7 @@ main(int argc, char **argv) + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + memset(&mount, 0, sizeof(mount)); ++ print_exit = 1; /* -e is now default. specify -c to override */ + + progname = basename(argv[0]); + while ((c = getopt(argc, argv, "bC:cdefl:iqnors:tDVv")) != EOF) { +@@ -152,7 +152,7 @@ main(int argc, char **argv) + case 'e': + /* -e is now default + */ +- print_exit++; ++ print_exit = 1; + break; + case 'C': + print_operation = OP_COPY; +diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c +index 3375e0806..1cd399dbc 100644 +--- a/mdrestore/xfs_mdrestore.c ++++ b/mdrestore/xfs_mdrestore.c +@@ -7,7 +7,6 @@ + #include "libxfs.h" + #include "xfs_metadump.h" + +-char *progname; + static int show_progress = 0; + static int show_info = 0; + static int progress_since_warning = 0; +-- +cgit 1.2.3-1.el7 + diff --git a/package/xvisor/0001-fix-build-with-gcc-10.patch b/package/xvisor/0001-fix-build-with-gcc-10.patch new file mode 100644 index 00000000000..a538558d86b --- /dev/null +++ b/package/xvisor/0001-fix-build-with-gcc-10.patch @@ -0,0 +1,64 @@ +From 8458abb357cd981f55d730ec2d74459a3042e571 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Tue, 6 Oct 2020 21:52:20 +0200 +Subject: [PATCH] fix build with gcc 10 + +Define variables in header files as extern to avoid the following build failure +with gcc 10 (which defaults to -fno-common): + +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/bin/arm-buildroot-linux-gnueabihf-ld: +/home/giuliobenetti/autobuild/run/instance-3/output-1/build/xvisor-0.3.0/build/drivers/mmc/core/mmc.o:/home/giuliobenetti/autobuild/run/instance-3/output-1/build/xvisor-0.3.0/drivers/mmc/core/core.h:67: +multiple definition of `sdio_func_type'; +/home/giuliobenetti/autobuild/run/instance-3/output-1/build/xvisor-0.3.0/build/drivers/mmc/core/core.o:/home/giuliobenetti/autobuild/run/instance-3/output-1/build/xvisor-0.3.0/drivers/mmc/core/core.h:67: +first defined here + +Fixes: + - http://autobuild.buildroot.org/results/b6070c0721b33824e71833ce53423979980aa598 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/xvisor/xvisor/pull/125] +--- + drivers/mmc/core/core.h | 2 +- + emulators/display/drawfn.h | 10 +++++----- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h +index d75d135a..e2ca3141 100644 +--- a/drivers/mmc/core/core.h ++++ b/drivers/mmc/core/core.h +@@ -64,7 +64,7 @@ int mmc_go_idle(struct mmc_host *host); + * Note: Must be called with host->lock held. + */ + extern struct vmm_bus sdio_bus_type; +-struct vmm_device_type sdio_func_type; ++extern struct vmm_device_type sdio_func_type; + + int __sdio_attach(struct mmc_host *host); + +diff --git a/emulators/display/drawfn.h b/emulators/display/drawfn.h +index f9163cff..385deaf6 100644 +--- a/emulators/display/drawfn.h ++++ b/emulators/display/drawfn.h +@@ -69,14 +69,14 @@ typedef void (*drawfn)(struct vmm_surface *, + DRAWFN_ORDER_MAX * \ + DRAWFN_FORMAT_MAX) + +-drawfn drawfn_surface_fntable_8[DRAWFN_FNTABLE_SIZE]; ++extern drawfn drawfn_surface_fntable_8[DRAWFN_FNTABLE_SIZE]; + +-drawfn drawfn_surface_fntable_15[DRAWFN_FNTABLE_SIZE]; ++extern drawfn drawfn_surface_fntable_15[DRAWFN_FNTABLE_SIZE]; + +-drawfn drawfn_surface_fntable_16[DRAWFN_FNTABLE_SIZE]; ++extern drawfn drawfn_surface_fntable_16[DRAWFN_FNTABLE_SIZE]; + +-drawfn drawfn_surface_fntable_24[DRAWFN_FNTABLE_SIZE]; ++extern drawfn drawfn_surface_fntable_24[DRAWFN_FNTABLE_SIZE]; + +-drawfn drawfn_surface_fntable_32[DRAWFN_FNTABLE_SIZE]; ++extern drawfn drawfn_surface_fntable_32[DRAWFN_FNTABLE_SIZE]; + + #endif +-- +2.28.0 + diff --git a/package/ympd/0002-only-c-language.patch b/package/ympd/0001-only-c-language.patch similarity index 100% rename from package/ympd/0002-only-c-language.patch rename to package/ympd/0001-only-c-language.patch diff --git a/package/ympd/0002-added-forward-declarations.patch b/package/ympd/0002-added-forward-declarations.patch new file mode 100644 index 00000000000..90ee1eae686 --- /dev/null +++ b/package/ympd/0002-added-forward-declarations.patch @@ -0,0 +1,43 @@ +From 2268e0f0f372a61827b912155a1796490968b3ff Mon Sep 17 00:00:00 2001 +From: SuperBFG7 +Date: Tue, 2 Jun 2020 12:41:52 +0200 +Subject: [PATCH] added forward declarations + + +[Retrieved (and slightly updated to remove update of dirble_api_token) +from: +https://github.com/notandy/ympd/pull/191/commits/2268e0f0f372a61827b912155a1796490968b3ff] +Signed-off-by: Fabrice Fontaine +--- + src/mpd_client.c | 2 ++ + src/mpd_client.h | 6 ++++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/mpd_client.c b/src/mpd_client.c +index 2911e461..9f003ab0 100644 +--- a/src/mpd_client.c ++++ b/src/mpd_client.c +@@ -30,6 +30,8 @@ + + /* forward declaration */ + static int mpd_notify_callback(struct mg_connection *c, enum mg_event ev); ++char dirble_api_token[28]; ++struct t_mpd mpd; + + const char * mpd_cmd_strs[] = { + MPD_CMDS(GEN_STR) +diff --git a/src/mpd_client.h b/src/mpd_client.h +index 447dd563..9342c550 100644 +--- a/src/mpd_client.h ++++ b/src/mpd_client.h +@@ -96,6 +96,8 @@ struct t_mpd { + + int song_id; + unsigned queue_version; +-} mpd; ++}; ++ ++extern struct t_mpd mpd; + + struct t_mpd_client_session { + int song_id; diff --git a/package/zeromq/0001-acinclude.m4-add-latomic-to-PKGCFG_LIBS_PRIVATE.patch b/package/zeromq/0001-acinclude.m4-add-latomic-to-PKGCFG_LIBS_PRIVATE.patch deleted file mode 100644 index 49f753b27f0..00000000000 --- a/package/zeromq/0001-acinclude.m4-add-latomic-to-PKGCFG_LIBS_PRIVATE.patch +++ /dev/null @@ -1,36 +0,0 @@ -From d59dcbcaebd91ca30a0f866403c383177a4843f8 Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -Date: Sun, 12 Jan 2020 10:10:15 +0100 -Subject: [PATCH] acinclude.m4: add -latomic to PKGCFG_LIBS_PRIVATE - -Add -latomic to PKGCFG_LIBS_PRIVATE so applications linking statically -with libzmq (such czmq) will know that they have to link with -latomic -and the following build failure will be avoided: - - CCLD src/czmq_selftest -/home/buildroot/autobuild/run/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/7.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /home/buildroot/autobuild/run/instance-3/output-1/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libzmq.a(src_libzmq_la-ctx.o): in function `zmq::ctx_t::create_socket(int)': -ctx.cpp:(.text+0x1710): undefined reference to `__atomic_fetch_add_4' - -Fixes: - - http://autobuild.buildroot.org/results/4a12f1ede260cd956a0b5ccb4eec6ca8b44cb04f - -Signed-off-by: Fabrice Fontaine -[Retrieved from: -https://github.com/zeromq/libzmq/commit/d59dcbcaebd91ca30a0f866403c383177a4843f8] ---- - acinclude.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index 8c042ca50..387a3d2a1 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -691,7 +691,7 @@ int main (int, char **) - return t; - } - ])], -- [AC_MSG_RESULT(yes) ; libzmq_cv_has_atomic_instrisics="yes" ; $1], -+ [AC_MSG_RESULT(yes) ; libzmq_cv_has_atomic_instrisics="yes" PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -latomic" ; $1], - [AC_MSG_RESULT(no) ; libzmq_cv_has_atomic_instrisics="no" LIBS=$save_LIBS ; $2]) - fi - }]) diff --git a/package/zeromq/zeromq.hash b/package/zeromq/zeromq.hash index 689d960b28f..17ffff87627 100644 --- a/package/zeromq/zeromq.hash +++ b/package/zeromq/zeromq.hash @@ -1,7 +1,7 @@ # From https://github.com/zeromq/libzmq/releases -md5 2047e917c2cc93505e2579bcba67a573 zeromq-4.3.2.tar.gz -sha1 e5253bff214f77621b3d29443f1aa6e5a106ffe5 zeromq-4.3.2.tar.gz +md5 78acc277d95e10812d71b2b3c3c3c9a9 zeromq-4.3.3.tar.gz +sha1 d78bc504194d6908df40a2b9e41849b181b02491 zeromq-4.3.3.tar.gz # Locally computed -sha256 ebd7b5c830d6428956b67a0454a7f8cbed1de74b3b01e5c33c5378e22740f763 zeromq-4.3.2.tar.gz -sha256 4fd86507c9b486764343065a9e035222869a27b5789efeb4fd93edc85412d7a3 COPYING -sha256 83f32abe61ee58ffb1b007412c08415168c052501dbf56d7a47aaaac52b03ef6 COPYING.LESSER +sha256 9d9285db37ae942ed0780c016da87060497877af45094ff9e1a1ca736e3875a2 zeromq-4.3.3.tar.gz +sha256 4fd86507c9b486764343065a9e035222869a27b5789efeb4fd93edc85412d7a3 COPYING +sha256 83f32abe61ee58ffb1b007412c08415168c052501dbf56d7a47aaaac52b03ef6 COPYING.LESSER diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk index 04f7e7d3f29..7840d03624b 100644 --- a/package/zeromq/zeromq.mk +++ b/package/zeromq/zeromq.mk @@ -4,15 +4,13 @@ # ################################################################################ -ZEROMQ_VERSION = 4.3.2 +ZEROMQ_VERSION = 4.3.3 ZEROMQ_SITE = https://github.com/zeromq/libzmq/releases/download/v$(ZEROMQ_VERSION) ZEROMQ_INSTALL_STAGING = YES ZEROMQ_DEPENDENCIES = util-linux ZEROMQ_CONF_OPTS = --without-documentation ZEROMQ_LICENSE = LGPL-3.0+ with exceptions ZEROMQ_LICENSE_FILES = COPYING COPYING.LESSER -# We're patching acinclude.m4 -ZEROMQ_AUTORECONF = YES # Assume these flags are always available. It is true, at least for # SOCK_CLOEXEC, since linux v2.6.27. diff --git a/package/zlib-ng/zlib-ng.mk b/package/zlib-ng/zlib-ng.mk index 098dfcb28af..1cb00d075b2 100644 --- a/package/zlib-ng/zlib-ng.mk +++ b/package/zlib-ng/zlib-ng.mk @@ -12,7 +12,11 @@ ZLIB_NG_INSTALL_STAGING = YES ZLIB_NG_PROVIDES = zlib # Build with zlib compatible API, gzFile support and optimizations on -ZLIB_NG_CONF_OPTS += -DZLIB_COMPAT=1 -DWITH_GZFILEOP=1 -DWITH_OPTIM=1 -DCC=$(TARGET_CC) +ZLIB_NG_CONF_OPTS += \ + -DWITH_GZFILEOP=1 \ + -DWITH_OPTIM=1 \ + -DZLIB_COMPAT=1 \ + -DZLIB_ENABLE_TESTS=OFF # Enable NEON and ACLE on ARM ifeq ($(BR2_arm),y) diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk index e2ba12b058f..35002da3325 100644 --- a/package/zstd/zstd.mk +++ b/package/zstd/zstd.mk @@ -71,7 +71,7 @@ endef # note: no 'HAVE_...' options for host library build only define HOST_ZSTD_BUILD_CMDS $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \ - -C $(@D)/lib + -C $(@D)/lib libzstd.a libzstd $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \ -C $(@D) zstd endef diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index c1bd614edf5..b44d28682ca 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -180,6 +180,12 @@ if test "${missing_progs}" = "yes" ; then exit 1 fi +# apply-patches.sh needs patch with --no-backup-if-mismatch support (GNU, busybox w/DESKTOP) +if ! patch --no-backup-if-mismatch /dev/null; then + echo "Your patch program does not support the --no-backup-if-mismatch option. Install GNU patch" + exit 1 +fi + if grep ^BR2_NEEDS_HOST_UTF8_LOCALE=y $BR2_CONFIG > /dev/null; then if ! which locale > /dev/null ; then echo diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh index 66fef262ee5..2d39d63da16 100755 --- a/support/scripts/apply-patches.sh +++ b/support/scripts/apply-patches.sh @@ -119,7 +119,7 @@ function apply_patch { exit 1 fi echo "${path}/${patch}" >> ${builddir}/.applied_patches_list - ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent + ${uncomp} "${path}/$patch" | patch -g0 -p1 -E --no-backup-if-mismatch -d "${builddir}" -t -N $silent if [ $? != 0 ] ; then echo "Patch failed! Please fix ${patch}!" exit 1 @@ -168,6 +168,3 @@ if [ "`find $builddir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then echo "Aborting. Reject files found." exit 1 fi - -# Remove backup files -find $builddir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \; diff --git a/support/scripts/pycompile.py b/support/scripts/pycompile.py index 9192a7016a7..8399d579364 100644 --- a/support/scripts/pycompile.py +++ b/support/scripts/pycompile.py @@ -1,69 +1,85 @@ #!/usr/bin/env python -'''Wrapper for python2 and python3 around compileall to raise exception -when a python byte code generation failed. +""" +Byte compile all .py files from provided directories. This script is an +alternative implementation of compileall.compile_dir written with +cross-compilation in mind. +""" -Inspired from: - http://stackoverflow.com/questions/615632/how-to-detect-errors-from-compileall-compile-dir -''' from __future__ import print_function -import sys -import py_compile -import compileall -import argparse - - -def check_for_errors(comparison): - '''Wrap comparison operator with code checking for PyCompileError. - If PyCompileError was raised, re-raise it again to abort execution, - otherwise perform comparison as expected. - ''' - def operator(self, other): - exc_type, value, traceback = sys.exc_info() - if exc_type is not None and issubclass(exc_type, - py_compile.PyCompileError): - print("Cannot compile %s" % value.file) - raise value - - return comparison(self, other) - - return operator - - -class ReportProblem(int): - '''Class that pretends to be an int() object but implements all of its - comparison operators such that it'd detect being called in - PyCompileError handling context and abort execution - ''' - VALUE = 1 - - def __new__(cls, *args, **kwargs): - return int.__new__(cls, ReportProblem.VALUE, **kwargs) - @check_for_errors - def __lt__(self, other): - return ReportProblem.VALUE < other - - @check_for_errors - def __eq__(self, other): - return ReportProblem.VALUE == other - - def __ge__(self, other): - return not self < other - - def __gt__(self, other): - return not self < other and not self == other - - def __ne__(self, other): - return not self == other - - -parser = argparse.ArgumentParser(description='Compile Python source files in a directory tree.') -parser.add_argument("target", metavar='DIRECTORY', - help='Directory to scan') -parser.add_argument("--force", action='store_true', - help="Force compilation even if alread compiled") +import argparse +import os +import py_compile +import re +import sys -args = parser.parse_args() -compileall.compile_dir(args.target, force=args.force, quiet=ReportProblem()) +def compile_one(host_path, strip_root=None): + """ + Compile a .py file into a .pyc file located next to it. + + :arg host_path: + Absolute path to the file to compile on the host running the build. + :arg strip_root: + Prefix to remove from the original source paths encoded in compiled + files. + """ + if os.path.islink(host_path) or not os.path.isfile(host_path): + return # only compile real files + + if not re.match(r"^[_A-Za-z][_A-Za-z0-9]+\.py$", + os.path.basename(host_path)): + return # only compile "importable" python modules + + if strip_root is not None: + # determine the runtime path of the file (i.e.: relative path to root + # dir prepended with "/"). + runtime_path = os.path.join("/", os.path.relpath(host_path, strip_root)) + else: + runtime_path = host_path + + # will raise an error if the file cannot be compiled + py_compile.compile(host_path, cfile=host_path + "c", + dfile=runtime_path, doraise=True) + + +def existing_dir_abs(arg): + """ + argparse type callback that checks that argument is a directory and returns + its absolute path. + """ + if not os.path.isdir(arg): + raise argparse.ArgumentTypeError('no such directory: {!r}'.format(arg)) + return os.path.abspath(arg) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("dirs", metavar="DIR", nargs="+", type=existing_dir_abs, + help="Directory to recursively scan and compile") + parser.add_argument("--strip-root", metavar="ROOT", type=existing_dir_abs, + help=""" + Prefix to remove from the original source paths encoded + in compiled files + """) + + args = parser.parse_args() + + try: + for d in args.dirs: + if args.strip_root and ".." in os.path.relpath(d, args.strip_root): + parser.error("DIR: not inside ROOT dir: {!r}".format(d)) + for parent, _, files in os.walk(d): + for f in files: + compile_one(os.path.join(parent, f), args.strip_root) + + except Exception as e: + print("error: {}".format(e)) + return 1 + + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/support/scripts/setlocalversion b/support/scripts/setlocalversion index e04c955d9ed..d492f2db2fa 100755 --- a/support/scripts/setlocalversion +++ b/support/scripts/setlocalversion @@ -48,14 +48,28 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then fi # Check for mercurial and a mercurial repo. +# In the git case, 'git describe' will show the latest tag, and unless we are +# exactly on that tag, the number of commits since then, and last commit id. +# Mimic something similar in the Mercurial case. if hgid=`HGRCPATH= hg id --id --tags 2>/dev/null`; then tag=`printf '%s' "$hgid" | cut -d' ' -f2 --only-delimited` # Do we have an untagged version? if [ -z "$tag" -o "$tag" = tip ]; then + # current revision is not tagged, determine latest tag + latesttag=`HGRCPATH= hg log -r. -T '{latesttag}' 2>/dev/null` + # In case there is more than one tag on the latest tagged commit, + # 'latesttag' will separate them by colon (:). We'll retain this. + # In case there is no tag at all, 'null' will be returned. + if [ "$latesttag" = "null" ]; then + latesttag='' + fi + + # add the commit id id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` - printf '%s%s' -hg "$id" + printf '%s%s%s' "${latesttag}" -hg "$id" else + # current revision is tagged, just print the tag printf ${tag} fi diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/Config.in b/support/testing/tests/package/br2-external/clang-compiler-rt/Config.in new file mode 100644 index 00000000000..e1f9f8c5981 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/Config.in @@ -0,0 +1 @@ +source "$BR2_EXTERNAL_CLANG_COMPILER_RT_PATH/package/libfuzzer/Config.in" diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/external.desc b/support/testing/tests/package/br2-external/clang-compiler-rt/external.desc new file mode 100644 index 00000000000..92df85911db --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/external.desc @@ -0,0 +1 @@ +name: CLANG_COMPILER_RT diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/external.mk b/support/testing/tests/package/br2-external/clang-compiler-rt/external.mk new file mode 100644 index 00000000000..6fa55c12113 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/external.mk @@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_CLANG_COMPILER_RT_PATH)/package/*/*.mk)) diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/Config.in b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/Config.in new file mode 100644 index 00000000000..5af5d1b6b92 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBFUZZER + bool "libfuzzer" + help + This is a set of tests (benchmarks) for fuzzing + engines (fuzzers). + + https://github.com/google/fuzzer-test-suite diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.hash b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.hash new file mode 100644 index 00000000000..6baf5763cf6 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.hash @@ -0,0 +1,2 @@ +sha256 c0addb4d7f0447fc9fd7c80e5721fafe4c137f29a8ebd94c5fef7e1d6a2c944c libfuzzer-64e4d9aa19a8d33b61882154addbf8419d7416e1.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.mk b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.mk new file mode 100644 index 00000000000..7d6f83b4d39 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libfuzzer +# +################################################################################ + +LIBFUZZER_VERSION = 64e4d9aa19a8d33b61882154addbf8419d7416e1 +LIBFUZZER_SITE = $(call github,google,fuzzer-test-suite,$(LIBFUZZER_VERSION)) +LIBFUZZER_LICENSE = Apache-2.0 +LIBFUZZER_LICENSE_FILES = LICENSE +LIBFUZZER_DEPENDENCIES = compiler-rt + +define LIBFUZZER_BUILD_CMDS + $(HOST_DIR)/bin/clang++ -mcpu=cortex-a53 --sysroot=$(STAGING_DIR) \ + -B $(HOST_DIR)/opt/ext-toolchain -fsanitize=address,fuzzer \ + $(@D)/tutorial/fuzz_me.cc \ + -o $(@D)/fuzz_me +endef + +define LIBFUZZER_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/fuzz_me $(TARGET_DIR)/usr/bin/fuzz_me +endef + +$(eval $(generic-package)) diff --git a/support/testing/tests/package/test_clang.py b/support/testing/tests/package/test_clang.py new file mode 100644 index 00000000000..84a2528b004 --- /dev/null +++ b/support/testing/tests/package/test_clang.py @@ -0,0 +1,46 @@ +import os + +import infra.basetest + +FUZZ_TIMEOUT = 120 + + +class TestClangCompilerRT(infra.basetest.BRTest): + br2_external = [infra.filepath("tests/package/br2-external/clang-compiler-rt")] + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" + BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + BR2_PACKAGE_COMPILER_RT=y + BR2_PACKAGE_LLVM=y + BR2_TARGET_ROOTFS_CPIO=y + BR2_TARGET_ROOTFS_CPIO_GZIP=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_PACKAGE_LIBFUZZER=y + """ + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio.gz") + kern = os.path.join(self.builddir, "images", "Image") + # Sanitizers overallocate memory and the minimum that seemed to work was 512MB + self.emulator.boot(arch="aarch64", + kernel=kern, + kernel_cmdline=["console=ttyAMA0"], + options=["-M", "virt", "-cpu", "cortex-a53", "-m", "512", "-initrd", img]) + self.emulator.login() + + def test_run(self): + self.login() + + # The test case verifies both that the application executes and that + # the symbolizer is working to decode the stack trace + cmd = "fuzz_me 2>&1 | grep _M_replace" + _, exit_code = self.emulator.run(cmd, FUZZ_TIMEOUT) + self.assertEqual(exit_code, 0) diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in index ea63687c5b9..130eca89d55 100644 --- a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in @@ -1,5 +1,5 @@ config BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE - bool "Arm AArch64 BE 2019.12" + bool "Arm AArch64 BE 2019.03" depends on BR2_aarch64_be depends on BR2_HOSTARCH = "x86_64" depends on !BR2_STATIC_LIBS @@ -7,8 +7,8 @@ config BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE select BR2_TOOLCHAIN_HAS_SSP select BR2_INSTALL_LIBSTDCPP select BR2_TOOLCHAIN_HAS_NATIVE_RPC - select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20 - select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + select BR2_TOOLCHAIN_GCC_AT_LEAST_8 select BR2_TOOLCHAIN_HAS_FORTRAN select BR2_TOOLCHAIN_HAS_OPENMP help diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in.options b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in.options index 745af8a29ea..add4adad2a2 100644 --- a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in.options +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in.options @@ -1,7 +1,7 @@ if BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE config BR2_TOOLCHAIN_EXTERNAL_PREFIX - default "aarch64_be-none-linux-gnu" + default "aarch64_be-linux-gnu" config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL default "toolchain-external-arm-aarch64-be" diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.hash b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.hash index a82c2ba4838..e20885e43e3 100644 --- a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.hash +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.hash @@ -1,4 +1,4 @@ -# From https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64_be-none-linux-gnu.tar.xz.asc -md5 f9885977e7f949f35bc0820f4bf99ab2 gcc-arm-9.2-2019.12-x86_64-aarch64_be-none-linux-gnu.tar.xz +# From https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64_be-linux-gnu.tar.xz.asc +md5 51301481db36aa743213e8cd16dfa1e7 gcc-arm-8.3-2019.03-x86_64-aarch64_be-linux-gnu.tar.xz # locally calculated -sha256 55fc54a63567a35fb8280dfef91d50c0b5ad65aaea267f34fe7647b02d912f56 gcc-arm-9.2-2019.12-x86_64-aarch64_be-none-linux-gnu.tar.xz +sha256 5689d3cbb019144e55162c6b414ee1fc8362d9a21fbedadc49951ae97f95e62c gcc-arm-8.3-2019.03-x86_64-aarch64_be-linux-gnu.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.mk b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.mk index e06f122991b..9aed38a8cad 100644 --- a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.mk +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.mk @@ -4,9 +4,9 @@ # ################################################################################ -TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_VERSION = 2019.12 -TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_VERSION)/binrel +TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_VERSION = 2019.03 +TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_VERSION)/binrel -TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_SOURCE = gcc-arm-9.2-$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_VERSION)-x86_64-aarch64_be-none-linux-gnu.tar.xz +TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_SOURCE = gcc-arm-8.3-$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_VERSION)-x86_64-aarch64_be-linux-gnu.tar.xz $(eval $(toolchain-external-package))