2
1
Эх сурвалжийг харах

Merge branch 'next'

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Peter Korsgaard 4 жил өмнө
parent
commit
8d07baab43
100 өөрчлөгдсөн 1277 нэмэгдсэн , 2138 устгасан
  1. 13 0
      Config.in
  2. 17 0
      DEVELOPERS
  3. 2 0
      board/atmel/readme.txt
  4. 31 0
      board/microchip/sama5d2_icp/genimage.cfg
  5. 11 0
      board/qemu/aarch64-sbsa/assemble-flash-images
  6. 30 0
      board/qemu/aarch64-sbsa/genimage.cfg
  7. 6 0
      board/qemu/aarch64-sbsa/grub.cfg
  8. 68 0
      board/qemu/aarch64-sbsa/linux.config
  9. 32 0
      board/qemu/aarch64-sbsa/readme.txt
  10. 30 0
      board/raspberrypi/genimage-raspberrypicm4io-64.cfg
  11. 30 0
      board/raspberrypi/genimage-raspberrypicm4io.cfg
  12. 46 0
      board/raspberrypi/readme.txt
  13. 1 0
      board/raspberrypicm4io
  14. 1 0
      board/raspberrypicm4io-64
  15. 26 0
      board/uevm5432/genimage.cfg
  16. 40 0
      board/uevm5432/readme.txt
  17. 1 0
      boot/Config.in
  18. 16 3
      boot/arm-trusted-firmware/Config.in
  19. 1 1
      boot/arm-trusted-firmware/arm-trusted-firmware.hash
  20. 9 0
      boot/arm-trusted-firmware/arm-trusted-firmware.mk
  21. 16 4
      boot/at91bootstrap3/Config.in
  22. 2 2
      boot/at91bootstrap3/at91bootstrap3.hash
  23. 5 4
      boot/at91bootstrap3/at91bootstrap3.mk
  24. 108 0
      boot/edk2/Config.in
  25. 3 0
      boot/edk2/edk2.hash
  26. 150 0
      boot/edk2/edk2.mk
  27. 3 0
      configs/acmesystems_acqua_a5_256mb_defconfig
  28. 3 0
      configs/acmesystems_acqua_a5_512mb_defconfig
  29. 24 3
      configs/beaglebone_defconfig
  30. 4 4
      configs/globalscale_espressobin_defconfig
  31. 31 0
      configs/microchip_sama5d2_icp_mmc_defconfig
  32. 74 0
      configs/microchip_sama5d2_icp_mmc_dev_defconfig
  33. 52 0
      configs/qemu_aarch64_sbsa_defconfig
  34. 41 0
      configs/raspberrypicm4io_64_defconfig
  35. 41 0
      configs/raspberrypicm4io_defconfig
  36. 46 0
      configs/uevm5432_defconfig
  37. 1 1
      docs/manual/adding-packages-cmake.txt
  38. 9 0
      package/Config.in
  39. 6 0
      package/Makefile.in
  40. 1 1
      package/abootimg/Config.in
  41. 1 1
      package/abootimg/abootimg.hash
  42. 3 2
      package/abootimg/abootimg.mk
  43. 1 0
      package/aircrack-ng/Config.in
  44. 0 32
      package/audit/0001-Fix-audispd-path-in-auditd.conf.patch
  45. 0 133
      package/audit/0002-Add-substitue-functions-for-strndupa-rawmemchr.patch
  46. 0 28
      package/audit/0003-Header-definitions-need-to-be-external-when-building.patch
  47. 3 3
      package/audit/audit.hash
  48. 1 1
      package/audit/audit.mk
  49. 33 0
      package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
  50. 1 1
      package/boost/boost.mk
  51. 1 1
      package/cage/cage.hash
  52. 4 3
      package/cage/cage.mk
  53. 1 1
      package/checkpolicy/checkpolicy.hash
  54. 2 2
      package/checkpolicy/checkpolicy.mk
  55. 4 4
      package/cog/cog.hash
  56. 1 1
      package/cog/cog.mk
  57. 1 1
      package/dt-utils/dt-utils.hash
  58. 1 1
      package/dt-utils/dt-utils.mk
  59. 8 0
      package/edk2-platforms/Config.in
  60. 3 0
      package/edk2-platforms/edk2-platforms.hash
  61. 22 0
      package/edk2-platforms/edk2-platforms.mk
  62. 1 1
      package/ethtool/ethtool.hash
  63. 1 1
      package/ethtool/ethtool.mk
  64. 4 8
      package/flare-engine/flare-engine.mk
  65. 1 1
      package/fluidsynth/fluidsynth.hash
  66. 1 1
      package/fluidsynth/fluidsynth.mk
  67. 1 1
      package/gcc/gcc.mk
  68. 1 1
      package/gnuchess/gnuchess.hash
  69. 1 1
      package/gnuchess/gnuchess.mk
  70. 1 1
      package/gobject-introspection/0001-disable-tests.patch
  71. 1 1
      package/gobject-introspection/0002-Add-rpath-links-to-ccompiler.patch
  72. 0 1
      package/gobject-introspection/Config.in
  73. 5 4
      package/gobject-introspection/gobject-introspection.hash
  74. 6 6
      package/gobject-introspection/gobject-introspection.mk
  75. 1 1
      package/grpc/grpc.hash
  76. 1 1
      package/grpc/grpc.mk
  77. 2 0
      package/hostapd/Config.in
  78. 4 4
      package/imlib2/imlib2.hash
  79. 1 1
      package/imlib2/imlib2.mk
  80. 0 55
      package/iproute2/0001-devlink-update-include-files.patch
  81. 114 0
      package/iproute2/0001-lib-fs-fix-issue-when-name-open-_to_handle_at-is-not.patch
  82. 1 1
      package/iproute2/iproute2.hash
  83. 1 1
      package/iproute2/iproute2.mk
  84. 1 1
      package/kodi-inputstream-adaptive/kodi-inputstream-adaptive.hash
  85. 1 1
      package/kodi-inputstream-adaptive/kodi-inputstream-adaptive.mk
  86. 1 1
      package/kodi-peripheral-joystick/kodi-peripheral-joystick.hash
  87. 1 1
      package/kodi-peripheral-joystick/kodi-peripheral-joystick.mk
  88. 1 1
      package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.hash
  89. 1 1
      package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.mk
  90. 0 29
      package/kodi-pvr-mediaportal-tvserver/0001-Revert-Removed-no-more-supported-C-17-declaration-ke.patch
  91. 0 157
      package/kodi-pvr-mediaportal-tvserver/0002-Remove-p8-os-includes.patch
  92. 0 124
      package/kodi-pvr-mediaportal-tvserver/0003-Use-kodi-StringUtils.patch
  93. 0 289
      package/kodi-pvr-mediaportal-tvserver/0004-Remove-SAFE_DELETE.patch
  94. 0 308
      package/kodi-pvr-mediaportal-tvserver/0005-Use-thread-sleep_for-instead-of-p8-time-utils.patch
  95. 0 673
      package/kodi-pvr-mediaportal-tvserver/0006-Use-std-thread-std-mutex-condition_variable-instead-.patch
  96. 0 55
      package/kodi-pvr-mediaportal-tvserver/0007-Remove-charset-converter-dependency.patch
  97. 0 74
      package/kodi-pvr-mediaportal-tvserver/0008-Remove-p8-platform-dependency.patch
  98. 0 28
      package/kodi-pvr-mediaportal-tvserver/0009-Travis-changes-for-cpp17.patch
  99. 0 23
      package/kodi-pvr-mediaportal-tvserver/0010-Remove-register-keyword-as-no-longer-valid-in-CPP17.patch
  100. 0 42
      package/kodi-pvr-mediaportal-tvserver/0011-changelog-and-version-v8.1.1.patch

+ 13 - 0
Config.in

@@ -412,6 +412,19 @@ config BR2_DEBUG_3
 endchoice
 endif
 
+config BR2_ENABLE_RUNTIME_DEBUG
+	bool "build packages with runtime debugging info"
+	help
+	  Some packages may have runtime assertions, extra traces, and
+	  similar runtime elements that can help debugging. However,
+	  these elements may negatively influence performance so should
+	  normally not be enabled on production systems.
+
+	  Enable this option to enable such runtime debugging.
+
+	  Note: disabling this option is not a guarantee that all
+	  packages effectively removed these runtime debugging elements.
+
 config BR2_STRIP_strip
 	bool "strip target binaries"
 	default y

+ 17 - 0
DEVELOPERS

@@ -35,6 +35,7 @@ F:	package/bubblewrap/
 F:	package/cage/
 F:	package/cog/
 F:	package/libepoxy/
+F:	package/libpsl/
 F:	package/libwpe/
 F:	package/webkitgtk/
 F:	package/wlroots/
@@ -460,6 +461,7 @@ F:	package/waylandpp/
 F:	package/x11r7/
 F:	package/x264/
 F:	package/x265/
+F:	package/xmrig/
 F:	package/ytree/
 F:	package/znc/
 F:	support/testing/tests/package/test_perl_html_parser.py
@@ -670,8 +672,15 @@ N:	Derrick Lyndon Pallas <derrick@meter.com>
 F:	package/ipcalc/
 
 N:	Dick Olsson <hi@senzilla.io>
+F:	board/aarch64-efi/
+F:	board/pc/
+F:	board/qemu/aarch64-sbsa/
+F:	boot/arm-trusted-firmware/
+F:	boot/edk2/
+F:	configs/qemu_aarch64_sbsa_defconfig
 F:	package/bearssl/
 F:	package/bitcoin/
+F:	package/edk2-platforms/
 F:	package/execline/
 F:	package/mdevd/
 F:	package/s6-dns/
@@ -682,6 +691,7 @@ F:	package/s6-portable-utils/
 F:	package/s6-rc/
 F:	package/s6/
 F:	package/skalibs/
+F:	support/testing/tests/boot/test_edk2.py
 
 N:	Dimitrios Siganos <dimitris@siganos.org>
 F:	package/wireless-regdb/
@@ -1637,6 +1647,7 @@ F:	package/murata-cyw-fw/
 F:	package/netdata/
 F:	package/python-ansicolors/
 F:	package/python-bleak/
+F:	package/python-dbus-next/
 F:	package/python-iniconfig/
 F:	package/python-intelhex/
 F:	package/python-packaging/
@@ -1647,9 +1658,11 @@ F:	package/python-typing-extensions/
 F:	package/python-xmodem/
 F:	package/rs485conf/
 F:	package/turbolua/
+F:	support/testing/tests/package/sample_python_dbus_next.py
 F:	support/testing/tests/package/sample_python_pytest.py
 F:	support/testing/tests/package/sample_python_pytest_asyncio.py
 F:	support/testing/tests/package/test_netdata.py
+F:	support/testing/tests/package/test_python_dbus_next.py
 F:	support/testing/tests/package/test_python_pytest.py
 F:	support/testing/tests/package/test_python_pytest_asyncio.py
 
@@ -2233,9 +2246,11 @@ F:	package/bitwise/
 
 N:	Raphaël Mélotte <raphael.melotte@essensium.com>
 F:	package/jbig2dec/
+F:	package/mupdf/
 F:	package/python-boto3/
 F:	package/python-botocore/
 F:	package/python-jmespath/
+F:	package/python-pymupdf/
 F:	package/python-s3transfer/
 
 N:	Refik Tuzakli <tuzakli.refik@gmail.com>
@@ -2299,6 +2314,7 @@ F:	package/glibc/
 F:	package/irrlicht/
 F:	package/liblinear/
 F:	package/lensfun/
+F:	package/libbpf/
 F:	package/libclc/
 F:	package/libgta/
 F:	package/libiec61850/
@@ -2706,6 +2722,7 @@ F:	package/utp_com/
 N:	Vincent Stehlé <vincent.stehle@laposte.net>
 F:	board/bananapi/bananapi-m2-zero/
 F:	configs/bananapi_m2_zero_defconfig
+F:	configs/uevm5432_defconfig
 F:	package/i7z/
 F:	package/msr-tools/
 F:	package/pixz/

+ 2 - 0
board/atmel/readme.txt

@@ -23,6 +23,8 @@ This guide covers the following configurations:
  - microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig
  - microchip_sam9x60ek_mmc_defconfig
  - microchip_sam9x60ek_mmc_dev_defconfig
+ - microchip_sama5d2_icp_mmc_defconfig
+ - microchip_sama5d2_icp_mmc_dev_defconfig
 
 These configurations will use AT91Bootstrap, u-boot and a linux kernel from
 the git trees maintained by Atmel.

+ 31 - 0
board/microchip/sama5d2_icp/genimage.cfg

@@ -0,0 +1,31 @@
+# Image for SD card boot on Microchip SAMA5D2 ICP (Industrial Connectivity Platform)
+#
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"at91-sama5d2_icp.dtb",
+			"boot.bin",
+			"u-boot.bin"
+		}
+	}
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+		offset = 1M
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		size = 512M
+	}
+}

+ 11 - 0
board/qemu/aarch64-sbsa/assemble-flash-images

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+BOARD_DIR="$(dirname $0)"
+
+cp -f ${BOARD_DIR}/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
+
+# The QEMU sbsa machine expects flash devices to be 256M.
+truncate -s 256M ${BINARIES_DIR}/SBSA_FLASH0.fd
+truncate -s 256M ${BINARIES_DIR}/SBSA_FLASH1.fd

+ 30 - 0
board/qemu/aarch64-sbsa/genimage.cfg

@@ -0,0 +1,30 @@
+image efi-part.vfat {
+  vfat {
+    file startup.nsh {
+      image = "efi-part/startup.nsh"
+    }
+    file EFI {
+      image = "efi-part/EFI"
+    }
+    file Image {
+      image = "Image"
+    }
+  }
+  size = 32M
+}
+
+image disk.img {
+  hdimage {
+    gpt = true
+  }
+
+  partition boot {
+    partition-type = 0xEF
+    image = "efi-part.vfat"
+  }
+
+  partition root {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+  }
+}

+ 6 - 0
board/qemu/aarch64-sbsa/grub.cfg

@@ -0,0 +1,6 @@
+set default="0"
+set timeout="5"
+
+menuentry "Buildroot" {
+	linux /Image root=/dev/sda2 rootwait console=ttyAMA0
+}

+ 68 - 0
board/qemu/aarch64-sbsa/linux.config

@@ -0,0 +1,68 @@
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_TASKSTATS=y
+CONFIG_SCHED_AUTOGROUP=y
+CONFIG_PROFILING=y
+CONFIG_ARCH_VEXPRESS=y
+CONFIG_COMPAT=y
+CONFIG_FW_CFG_SYSFS=y
+CONFIG_FW_CFG_SYSFS_CMDLINE=y
+CONFIG_ACPI=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_BLK_DEV_BSGLIB=y
+CONFIG_BINFMT_MISC=y
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_PACKET_DIAG=y
+CONFIG_UNIX=y
+CONFIG_NET_KEY=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_BRIDGE=m
+CONFIG_NET_SCHED=y
+CONFIG_VSOCKETS=y
+CONFIG_PCI=y
+CONFIG_PCI_HOST_GENERIC=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_VIRTIO_BLK=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_VIRTIO=y
+CONFIG_ATA=y
+CONFIG_SATA_AHCI_PLATFORM=y
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=y
+CONFIG_MACVLAN=y
+CONFIG_VIRTIO_NET=y
+CONFIG_NLMON=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_VIRTIO_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_VIRTIO=y
+CONFIG_TCG_TPM=y
+CONFIG_TCG_TIS=y
+CONFIG_DRM=y
+CONFIG_DRM_VIRTIO_GPU=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_PL031=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
+CONFIG_MAILBOX=y
+CONFIG_PL320_MBOX=y
+CONFIG_ARM_SMMU_V3=y
+CONFIG_EXT4_FS=y
+CONFIG_FUSE_FS=y
+CONFIG_VIRTIO_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y

+ 32 - 0
board/qemu/aarch64-sbsa/readme.txt

@@ -0,0 +1,32 @@
+Intro
+=====
+
+The QEMU sbsa-ref machine is primarily meant for firmware development
+and testing according to ARM's SBSA and SBBR standards.
+
+Build
+=====
+
+  $ make qemu_aarch64_sbsa_defconfig
+  $ make
+
+Emulation
+=========
+
+Run the emulation with:
+
+  qemu-system-aarch64 \
+    -M sbsa-ref \
+    -cpu cortex-a53 \
+    -smp 4 \
+    -m 1024 \
+    -nographic \
+    -pflash output/images/SBSA_FLASH0.fd \
+    -pflash output/images/SBSA_FLASH1.fd \
+    -hda output/images/disk.img
+
+Note that if you want to run sbsa-ref emulation with QEMU provided by
+your distro (i.e., not host-qemu by Buildroot) then you may need to
+install the SeaBIOS package for some required drivers. On Debian:
+
+  # apt install seabios

+ 30 - 0
board/raspberrypi/genimage-raspberrypicm4io-64.cfg

@@ -0,0 +1,30 @@
+image boot.vfat {
+  vfat {
+    files = {
+      "bcm2711-rpi-cm4.dtb",
+      "rpi-firmware/cmdline.txt",
+      "rpi-firmware/config.txt",
+      "rpi-firmware/fixup.dat",
+      "rpi-firmware/start.elf",
+      "rpi-firmware/overlays",
+      "Image"
+    }
+  }
+  size = 32M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+  }
+}

+ 30 - 0
board/raspberrypi/genimage-raspberrypicm4io.cfg

@@ -0,0 +1,30 @@
+image boot.vfat {
+  vfat {
+    files = {
+      "bcm2711-rpi-cm4.dtb",
+      "rpi-firmware/cmdline.txt",
+      "rpi-firmware/config.txt",
+      "rpi-firmware/fixup.dat",
+      "rpi-firmware/start.elf",
+      "rpi-firmware/overlays",
+      "zImage"
+    }
+  }
+  size = 32M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+  }
+}

+ 46 - 0
board/raspberrypi/readme.txt

@@ -9,6 +9,7 @@ These instructions apply to all models of the Raspberry Pi:
   - the model B2 (aka Raspberry Pi 2)
   - the model B3 (aka Raspberry Pi 3).
   - the model B4 (aka Raspberry Pi 4).
+  - the model CM4 (aka Raspberry Pi Compute Module 4 and IO Board).
 
 How to build it
 ===============
@@ -35,10 +36,26 @@ For model 3 B and B+:
 
   $ make raspberrypi3_defconfig
 
+or for model 3 B and B+ (64 bit):
+
+  $ make raspberrypi3_64_defconfig
+
 For model 4 B:
 
   $ make raspberrypi4_defconfig
 
+or for model 4 B (64 bit):
+
+  $ make raspberrypi4_64_defconfig
+
+For model CM4 (on IO Board):
+
+  $ make raspberrypicm4io_defconfig
+
+or for CM4 (on IO Board - 64 bit):
+
+  $ make raspberrypicm4io_64_defconfig
+
 Build the rootfs
 ----------------
 
@@ -63,6 +80,7 @@ After building, you should obtain this tree:
     +-- bcm2710-rpi-3-b.dtb         [1]
     +-- bcm2710-rpi-3-b-plus.dtb    [1]
     +-- bcm2711-rpi-4-b.dtb         [1]
+    +-- bcm2711-rpi-cm4.dtb         [1]
     +-- boot.vfat
     +-- rootfs.ext4
     +-- rpi-firmware/
@@ -97,3 +115,31 @@ Insert the SDcard into your Raspberry Pi, and power it up. Your new system
 should come up now and start two consoles: one on the serial port on
 the P1 header, one on the HDMI output where you can login using a USB
 keyboard.
+
+How to write to CM4 eMMC memory
+===============================
+
+For CM4 modules without eMMC memory see above for booting from SD card,
+for CM4 moduels with eMMC memory proceed as following:
+
+- fit jumper on IO Board header J2 to disable eMMC boot
+- connect IO Board micro USB port (J11 USB slave) to your host linux system
+- power up CM4/IO Board (lsusb command should show a '0a5c:2711 Broadcom Corp.
+  BCM2711 Boot' device)
+- run 'sudo ./host/bin/rpiboot', output should look like the following:
+    Waiting for BCM2835/6/7/2711...
+    Loading embedded: bootcode4.bin
+    Sending bootcode.bin
+    Successful read 4 bytes
+    Waiting for BCM2835/6/7/2711...
+    Loading embedded: bootcode4.bin
+    Second stage boot server
+    Loading embedded: start4.elf
+    File read: start4.elf
+    Second stage boot server done
+
+- a USB mass storage device should show up (the CM4 eMMC memory), proceed
+  as described above to copy sdcard.img to it
+- power down CM4/IO Board
+- remove jumper on IO Board header J2 to re-enable eMMC boot
+- power up CM4/IO Board

+ 1 - 0
board/raspberrypicm4io

@@ -0,0 +1 @@
+raspberrypi

+ 1 - 0
board/raspberrypicm4io-64

@@ -0,0 +1 @@
+raspberrypi

+ 26 - 0
board/uevm5432/genimage.cfg

@@ -0,0 +1,26 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"MLO",
+			"u-boot.img"
+		}
+	}
+	size = 8M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		size = 512M
+	}
+}

+ 40 - 0
board/uevm5432/readme.txt

@@ -0,0 +1,40 @@
+OMAP5432 uEVM
+=============
+
+This file documents the Buildroot support for the OMAP5432 uEVM[1], a
+single-board computer development platform based on the Texas Instruments
+OMAP5432 system on a chip (SoC).
+
+How to build
+============
+
+  $ make uevm5432_defconfig
+  $ make
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+  $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+  $ sync
+
+Where /dev/sdX is the device node of your SD card (may be /dev/mmcblkX instead
+depending on setup).
+
+To boot from SD card, set the SYSBOOT switches S1 of your OMAP5432 uEVM to the
+following position:
+
+  ON   x   x
+     x   x
+     1 2 3 4
+
+Insert the micro SDcard in your OMAP5432 uEVM, and power it up with the POWER
+ON push button switch S3. The console is on the micro USB Debug UART, with
+serial settings 115200 8N1. Refer also to the quick start guide[2].
+
+[1]: https://svtronics.com/5432
+[2]: https://www.ti.com/lit/ug/swcu131/swcu131.pdf

+ 1 - 0
boot/Config.in

@@ -10,6 +10,7 @@ source "boot/beaglev-ddrinit/Config.in"
 source "boot/beaglev-secondboot/Config.in"
 source "boot/binaries-marvell/Config.in"
 source "boot/boot-wrapper-aarch64/Config.in"
+source "boot/edk2/Config.in"
 source "boot/grub2/Config.in"
 source "boot/gummiboot/Config.in"
 source "boot/lpc32xxcdl/Config.in"

+ 16 - 3
boot/arm-trusted-firmware/Config.in

@@ -1,7 +1,7 @@
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE
 	bool "ARM Trusted Firmware (ATF)"
 	depends on (BR2_ARM_CPU_ARMV8A || BR2_ARM_CPU_ARMV7A) && \
-		   BR2_TARGET_UBOOT
+		   (BR2_TARGET_UBOOT || BR2_TARGET_EDK2)
 	help
 	  Enable this option if you want to build the ATF for your ARM
 	  based embedded device.
@@ -15,7 +15,7 @@ choice
 	  Select the specific ATF version you want to use
 
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
-	bool "v2.4"
+	bool "v2.5"
 
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
 	bool "Custom version"
@@ -43,7 +43,7 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE
 
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION
 	string
-	default "v2.4"		if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
+	default "v2.5"		if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
 	default "custom"	if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
 	default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION \
 				if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
@@ -135,6 +135,19 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
 
 endif
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
+	bool "Use EDK2 as BL33"
+	depends on BR2_TARGET_EDK2
+	help
+	  This option allows to embed EDK2 as the BL33 part of
+	  the ARM Trusted Firmware. It ensures that the EDK2 package
+	  gets built before ATF, and that the appropriate BL33
+	  variable pointing to the EDK2 is passed when building ATF.
+
+	  Do not choose this option if you intend to build ATF and EDK2
+	  for the 'qemu_sbsa' platform. In this case, due to the EDK2
+	  build system, the dependency between ATF and EDK is reversed.
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS
 	string "Additional ATF make targets"
 	help

+ 1 - 1
boot/arm-trusted-firmware/arm-trusted-firmware.hash

@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  4bfda9fdbe5022f2e88ad3344165f7d38a8ae4a0e2d91d44d9a1603425cc642d  arm-trusted-firmware-v2.4.tar.gz
+sha256  d12a824afcc5cb90d005f9820f3274f1319cef1bb282e40a6a190b75900206d3  arm-trusted-firmware-v2.5.tar.gz
 sha256  487795b8023df866259fa159bab94706b747fb0d623b7913f1c4955c0ab5f164  license.rst

+ 9 - 0
boot/arm-trusted-firmware/arm-trusted-firmware.mk

@@ -79,6 +79,15 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += AARCH32_SP=optee
 endif
 endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
 
+ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33),y)
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += edk2
+# Since the flash device name vary between platforms, we use the variable
+# provided by the EDK2 package for this. Using this variable here is OK
+# as it will expand after all dependencies are resolved, inside _BUILD_CMDS.
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
+	BL33=$(BINARIES_DIR)/$(call qstrip,$(BR2_TARGET_EDK2_FD_NAME).fd)
+endif
+
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y)
 ARM_TRUSTED_FIRMWARE_UBOOT_BIN = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE))
 ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_UBOOT_BIN)

+ 16 - 4
boot/at91bootstrap3/Config.in

@@ -1,5 +1,5 @@
 config BR2_TARGET_AT91BOOTSTRAP3
-	bool "AT91 Bootstrap 3"
+	bool "AT91 Bootstrap 3+"
 	depends on BR2_arm926t || BR2_cortex_a5 || BR2_cortex_a7
 	help
 	  AT91Bootstrap is a first level bootloader for the Atmel AT91
@@ -16,10 +16,13 @@ if BR2_TARGET_AT91BOOTSTRAP3
 
 choice
 
-	prompt "AT91 Bootstrap 3 version"
+	prompt "AT91 Bootstrap 3+ version"
 
 config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
-	bool "3.9.3"
+	bool "4.0.0-rc2"
+
+config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X
+	bool "3.10.2"
 
 config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
 	bool "Custom Git repository"
@@ -51,7 +54,8 @@ endif
 
 config BR2_TARGET_AT91BOOTSTRAP3_VERSION
 	string
-	default "v3.9.3" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
+	default "v4.0.0-rc2" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
+	default "v3.10.2" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X
 	default BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION \
 		if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
 	default "custom"	if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
@@ -96,4 +100,12 @@ config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE
 	help
 	  Path to the at91bootstrap3 configuration file
 
+config BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3
+	bool "needs host-python3"
+	help
+	  Enable this option if the at91bootstrap build process needs
+	  Python 3.x to be available on the host. This is needed in
+	  some at91bootstrap configurations to use NAND/PMECC Python
+	  scripts.
+
 endif # BR2_TARGET_AT91BOOTSTRAP3

+ 2 - 2
boot/at91bootstrap3/at91bootstrap3.hash

@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  dd6a3c57c1c84fc3b18187bee3d139146a0e032dd1d8edea7b242730e0bc4fe1  at91bootstrap3-v3.9.3.tar.gz
-sha256  fd7a1ce5719bb7abf5e289da2e0ea8c933af3ba0f6ad03dbdbd2b7f54a77498a  main.c
+sha256  33e4ba431af93a4fc2e81c1458cd31901b9f69c583ebe4c74ca78c0846479bfd  at91bootstrap3-v3.10.2.tar.gz
+sha256  b5d5f042297cad0d091f7d8734e61eb9ec7b6020898e086503fb5f8bc71fb9fc  at91bootstrap3-v4.0.0-rc2.tar.gz

+ 5 - 4
boot/at91bootstrap3/at91bootstrap3.mk

@@ -20,9 +20,6 @@ AT91BOOTSTRAP3_SITE = $(call github,linux4sam,at91bootstrap,$(AT91BOOTSTRAP3_VER
 endif
 
 AT91BOOTSTRAP3_LICENSE = Atmel License
-ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION),y)
-AT91BOOTSTRAP3_LICENSE_FILES = main.c
-endif
 
 AT91BOOTSTRAP3_CPE_ID_VENDOR = linux4sam
 AT91BOOTSTRAP3_CPE_ID_PRODUCT = at91bootstrap
@@ -30,6 +27,10 @@ AT91BOOTSTRAP3_CPE_ID_PRODUCT = at91bootstrap
 AT91BOOTSTRAP3_INSTALL_IMAGES = YES
 AT91BOOTSTRAP3_INSTALL_TARGET = NO
 
+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3),y)
+AT91BOOTSTRAP3_DEPENDENCIES += host-python3
+endif
+
 AT91BOOTSTRAP3_CUSTOM_PATCH_DIR = \
 	$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR))
 
@@ -48,7 +49,7 @@ define AT91BOOTSTRAP3_BUILD_CMDS
 endef
 
 define AT91BOOTSTRAP3_INSTALL_IMAGES_CMDS
-	cp $(@D)/binaries/*.bin $(BINARIES_DIR)
+	cp $(wildcard $(@D)/build/binaries/*.bin $(@D)/binaries/*.bin) $(BINARIES_DIR)
 endef
 
 ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)

+ 108 - 0
boot/edk2/Config.in

@@ -0,0 +1,108 @@
+config BR2_TARGET_EDK2
+	bool "EDK2"
+	depends on BR2_x86_64 || BR2_aarch64
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_PACKAGE_EDK2_PLATFORMS
+	help
+	  EDK II is a modern, feature-rich, cross-platform firmware
+	  development environment for the UEFI and PI specifications.
+
+	  https://github.com/tianocore/tianocore.github.io/wiki/EDK-II
+
+if BR2_TARGET_EDK2
+
+choice
+	prompt "Platform"
+	default BR2_TARGET_EDK2_PLATFORM_OVMF_X64 if BR2_x86_64
+	default BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU if BR2_aarch64
+
+config BR2_TARGET_EDK2_PLATFORM_OVMF_X64
+	bool "x86-64"
+	depends on BR2_x86_64
+	help
+	  Platform configuration for a generic x86-64 target.
+	  This platform will boot from flash address 0x0.
+	  It should therefore be used as the first bootloader.
+
+config BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU
+	bool "ARM Virt Qemu (flash)"
+	depends on BR2_aarch64
+	help
+	  Platform configuration for QEMU targeting the Virt machine.
+	  This platform will only boot from flash address 0x0.
+	  It should therefore be used as the first bootloader.
+
+config BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNEL
+	bool "ARM Virt Qemu (kernel)"
+	depends on BR2_aarch64
+	help
+	  Platform configuration for QEMU targeting the Virt machine.
+	  This platform can boot from either flash address 0x0 or via
+	  the Linux boot protocol. It can therefore be loaded by a
+	  previous bootloader like ARM Trusted Firmware or OP-TEE.
+
+config BR2_TARGET_EDK2_PLATFORM_ARM_SGI575
+	bool "ARM SGI-575"
+	depends on BR2_aarch64
+	help
+	  Platform configuration for ARM SGI-575 on ARM's
+	  Fixed Virtual Platform (FVP).
+
+config BR2_TARGET_EDK2_PLATFORM_ARM_VEXPRESS_FVP_AARCH64
+	bool "ARM VExpress FVP Aarch64"
+	depends on BR2_aarch64
+	help
+	  Platform configuration for ARM Versatile Express targeting
+	  the Aarch64 Fixed Virtual Platform (FVP).
+
+config BR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOX
+	bool "Socionext DeveloperBox"
+	depends on BR2_aarch64
+	depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE
+	depends on !BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
+	select BR2_PACKAGE_HOST_DTC
+	select BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP
+	help
+	  Platform configuration for Socionext SynQuacer DeveloperBox
+	  (SC2A11).
+
+comment "Socionext DeveloperBox depends on ATF not using EDK2 as BL33"
+	depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
+
+config BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN
+	bool "SolidRun MacchiatoBin"
+	depends on BR2_aarch64
+	depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE
+	select BR2_PACKAGE_HOST_DTC
+	select BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP
+	help
+	  Platform configuration for the SolidRun MacchiatoBin.
+
+config BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA
+	bool "QEMU SBSA"
+	depends on BR2_aarch64
+	depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE
+	depends on !BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
+	help
+	  Platform configuration for QEMU targeting the SBSA reference
+	  machine.
+
+comment "QEMU SBSA depends on ATF not using EDK2 as BL33"
+	depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
+
+endchoice
+
+config BR2_TARGET_EDK2_FD_NAME
+	string
+	default "OVMF" if BR2_TARGET_EDK2_PLATFORM_OVMF_X64
+	default "QEMU_EFI" if BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU
+	default "QEMU_EFI" if BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNEL
+	default "BL33_AP_UEFI" if BR2_TARGET_EDK2_PLATFORM_ARM_SGI575
+	default "FVP_AARCH64_EFI" if BR2_TARGET_EDK2_PLATFORM_ARM_VEXPRESS_FVP_AARCH64
+	default "FVP_AARCH64_EFI" if BR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOX
+	default "ARMADA_EFI" if BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN
+
+endif
+
+comment "EDK2 needs a toolchain w/ gcc >= 5"
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5

+ 3 - 0
boot/edk2/edk2.hash

@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  04791c13b414a6d1877182a6d565cb762c30aa63e49bb4d495fca68ef4dd209d  edk2-edk2-stable202102-br1.tar.gz
+sha256  50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80  License.txt

+ 150 - 0
boot/edk2/edk2.mk

@@ -0,0 +1,150 @@
+################################################################################
+#
+# edk2
+#
+################################################################################
+
+EDK2_VERSION = edk2-stable202102
+EDK2_SITE = https://github.com/tianocore/edk2
+EDK2_SITE_METHOD = git
+EDK2_LICENSE = BSD-2-Clause
+EDK2_LICENSE_FILE = License.txt
+EDK2_DEPENDENCIES = edk2-platforms host-python3 host-acpica host-util-linux
+EDK2_INSTALL_TARGET = NO
+EDK2_INSTALL_IMAGES = YES
+
+ifeq ($(BR2_x86_64),y)
+EDK2_ARCH = X64
+else ifeq ($(BR2_aarch64),y)
+EDK2_ARCH = AARCH64
+endif
+
+ifeq ($(BR2_ENABLE_DEBUG),y)
+EDK2_BUILD_TYPE = DEBUG
+else
+EDK2_BUILD_TYPE = RELEASE
+endif
+
+# Build system notes.
+#
+# The EDK2 build system is rather unique, so here are a few useful notes.
+#
+# First, builds rely heavily on Git submodules to fetch various dependencies
+# into specific directory structures. It might be possible to work around this
+# and rely on Buildroot's infrastructure, but using Git submodules greatly
+# simplifies this already complicated build system.
+#
+# Second, the build system is spread across various commands and stages.
+# Therefore, all build variables needs to be exported to be available
+# accordingly. The first stage will build $(@D)/BaseTools which contains
+# various tools and scripts for the host.
+#
+# Third, where applicable, the dependency direction between EDK2 and
+# ARM Trusted Firmware (ATF) will go in different direction for different
+# platforms. Most commonly, ATF will depend on EDK2 via the BL33 payload.
+# But for some platforms (e.g. QEMU SBSA or DeveloperBox) EDK2 will package
+# the ATF images within its own build system. In such cases, intermediary
+# "EDK2 packages" will be built in $(EDK2_BUILD_PACKAGES) in order for EDK2
+# to be able to use them in subsequent build stages.
+#
+# For more information about the build setup:
+# https://edk2-docs.gitbook.io/edk-ii-build-specification/4_edk_ii_build_process_overview
+
+EDK2_GIT_SUBMODULES = YES
+EDK2_BUILD_PACKAGES = $(@D)/Build/Buildroot
+EDK2_PACKAGES_PATH = $(@D):$(EDK2_BUILD_PACKAGES):$(STAGING_DIR)/usr/share/edk2-platforms
+
+ifeq ($(BR2_TARGET_EDK2_PLATFORM_OVMF_X64),y)
+EDK2_DEPENDENCIES += host-nasm
+EDK2_PACKAGE_NAME = OvmfPkg
+EDK2_PLATFORM_NAME = OvmfPkgX64
+EDK2_BUILD_DIR = OvmfX64
+
+else ifeq ($(BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU),y)
+EDK2_PACKAGE_NAME = ArmVirtPkg
+EDK2_PLATFORM_NAME = ArmVirtQemu
+EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)-$(EDK2_ARCH)
+
+else ifeq ($(BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNEL),y)
+EDK2_PACKAGE_NAME = ArmVirtPkg
+EDK2_PLATFORM_NAME = ArmVirtQemuKernel
+EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)-$(EDK2_ARCH)
+
+else ifeq ($(BR2_TARGET_EDK2_PLATFORM_ARM_VEXPRESS_FVP_AARCH64),y)
+EDK2_PACKAGE_NAME = Platform/ARM/VExpressPkg
+EDK2_PLATFORM_NAME = ArmVExpress-FVP-AArch64
+EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)
+
+else ifeq ($(BR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOX),y)
+EDK2_DEPENDENCIES += host-dtc arm-trusted-firmware
+EDK2_PACKAGE_NAME = Platform/Socionext/DeveloperBox
+EDK2_PLATFORM_NAME = DeveloperBox
+EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)
+EDK2_BUILD_ENV += DTC_PREFIX=$(HOST_DIR)/bin/
+EDK2_BUILD_OPTS += -D DO_X86EMU=TRUE
+EDK2_PRE_BUILD_HOOKS += EDK2_PRE_BUILD_SOCIONEXT_DEVELOPERBOX
+
+define EDK2_PRE_BUILD_SOCIONEXT_DEVELOPERBOX
+	mkdir -p $(EDK2_BUILD_PACKAGES)/Platform/Socionext/DeveloperBox
+	$(ARM_TRUSTED_FIRMWARE_DIR)/tools/fiptool/fiptool create \
+		--tb-fw $(BINARIES_DIR)/bl31.bin \
+		--soc-fw $(BINARIES_DIR)/bl31.bin \
+		--scp-fw $(BINARIES_DIR)/bl31.bin \
+		$(EDK2_BUILD_PACKAGES)/Platform/Socionext/DeveloperBox/fip_all_arm_tf.bin
+endef
+
+else ifeq ($(BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN),y)
+EDK2_DEPENDENCIES += host-dtc arm-trusted-firmware
+EDK2_PACKAGE_NAME = Platform/SolidRun/Armada80x0McBin
+EDK2_PLATFORM_NAME = Armada80x0McBin
+EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)-$(EDK2_ARCH)
+EDK2_BUILD_ENV += DTC_PREFIX=$(HOST_DIR)/bin/
+EDK2_BUILD_OPTS += -D INCLUDE_TFTP_COMMAND
+
+else ifeq ($(BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA),y)
+EDK2_DEPENDENCIES += arm-trusted-firmware
+EDK2_PACKAGE_NAME = Platform/Qemu/SbsaQemu
+EDK2_PLATFORM_NAME = SbsaQemu
+EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)
+EDK2_PRE_BUILD_HOOKS += EDK2_PRE_BUILD_QEMU_SBSA
+
+define EDK2_PRE_BUILD_QEMU_SBSA
+	mkdir -p $(EDK2_BUILD_PACKAGES)/Platform/Qemu/Sbsa
+	ln -srf $(BINARIES_DIR)/{bl1.bin,fip.bin} $(EDK2_BUILD_PACKAGES)/Platform/Qemu/Sbsa/
+endef
+
+endif
+
+EDK2_BASETOOLS_OPTS = \
+	EXTRA_LDFLAGS="$(HOST_LDFLAGS)" \
+	EXTRA_OPTFLAGS="$(HOST_CPPFLAGS)"
+
+EDK2_BUILD_ENV += \
+	WORKSPACE=$(@D) \
+	PACKAGES_PATH=$(EDK2_PACKAGES_PATH) \
+	PYTHON_COMMAND=$(HOST_DIR)/bin/python3 \
+	IASL_PREFIX=$(HOST_DIR)/bin/ \
+	NASM_PREFIX=$(HOST_DIR)/bin/ \
+	GCC5_$(EDK2_ARCH)_PREFIX=$(TARGET_CROSS)
+
+EDK2_BUILD_OPTS += \
+	-t GCC5 \
+	-n $(BR2_JLEVEL) \
+	-a $(EDK2_ARCH) \
+	-b $(EDK2_BUILD_TYPE) \
+	-p $(EDK2_PACKAGE_NAME)/$(EDK2_PLATFORM_NAME).dsc
+
+define EDK2_BUILD_CMDS
+	mkdir -p $(EDK2_BUILD_PACKAGES)
+	export $(EDK2_BUILD_ENV) && \
+	unset ARCH && \
+	source $(@D)/edksetup.sh && \
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/BaseTools $(EDK2_BASETOOLS_OPTS) && \
+	build $(EDK2_BUILD_OPTS) all
+endef
+
+define EDK2_INSTALL_IMAGES_CMDS
+	cp -f $(@D)/Build/$(EDK2_BUILD_DIR)/$(EDK2_BUILD_TYPE)_GCC5/FV/*.fd $(BINARIES_DIR)
+endef
+
+$(eval $(generic-package))

+ 3 - 0
configs/acmesystems_acqua_a5_256mb_defconfig

@@ -17,6 +17,9 @@ BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git"
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.10.2"
 BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="acqua-256m"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y

+ 3 - 0
configs/acmesystems_acqua_a5_512mb_defconfig

@@ -17,6 +17,9 @@ BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git"
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.10.2"
 BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="acqua-512m"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y

+ 24 - 3
configs/beaglebone_defconfig

@@ -1,31 +1,52 @@
+# Architecture
 BR2_arm=y
 BR2_cortex_a8=y
+BR2_ARM_FPU_VFPV3=y
+
+# Patches
 BR2_GLOBAL_PATCH_DIR="board/beaglebone/patches"
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
+
+# Linux headers same as kernel, a 5.10 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+
+# System
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+
+# Image
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/beaglebone/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beaglebone/genimage.cfg"
+
+# Kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
-BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,beagleboard,linux,4.19.79-ti-r30)/linux-4.19.79-ti-r30.tar.gz"
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,beagleboard,linux,5.10.30-ti-r3)/linux-5.10.30-ti-r3.tar.gz"
 BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-bonegreen am335x-evmsk am335x-boneblue"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+
+# Bootloader
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2021.04"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am335x_evm"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
 # BR2_TARGET_UBOOT_FORMAT_BIN is not set
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="MLO"
+
+# Required tools to create the SD image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
+
+# Supporting host tools to build FIT image
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y

+ 4 - 4
configs/globalscale_espressobin_defconfig

@@ -2,17 +2,17 @@ BR2_aarch64=y
 BR2_cortex_a53=y
 BR2_ARM_FPU_VFPV4=y
 
-# Linux headers same as kernel, a 5.6 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y
+# Linux headers same as kernel, a 5.11 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_11=y
 
 # Kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.11"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.11.21"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
 BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/globalscale/espressobin/linux-extras.config"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
-BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc"
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc marvell/armada-3720-espressobin-ultra"
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
 

+ 31 - 0
configs/microchip_sama5d2_icp_mmc_defconfig

@@ -0,0 +1,31 @@
+BR2_arm=y
+BR2_cortex_a5=y
+BR2_ARM_ENABLE_NEON=y
+BR2_ARM_ENABLE_VFP=y
+BR2_ARM_INSTRUCTIONS_THUMB2=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/microchip/sama5d2_icp/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam-2020.10)/linux-linux4sam-2020.10.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="sama5"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d2_icp"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v4.0.0-rc2)/at91bootstrap-v4.0.0-rc2.tar.gz"
+BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d2_icpsd_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,linux4sam,u-boot-at91,linux4sam-2020.10)/u-boot-at91-linux4sam-2020.10.tar.gz"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d2_icp_mmc"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y

+ 74 - 0
configs/microchip_sama5d2_icp_mmc_dev_defconfig

@@ -0,0 +1,74 @@
+BR2_arm=y
+BR2_cortex_a5=y
+BR2_ARM_ENABLE_NEON=y
+BR2_ARM_ENABLE_VFP=y
+BR2_ARM_INSTRUCTIONS_THUMB2=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
+BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
+BR2_PTHREAD_DEBUG=y
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/microchip/sama5d2_icp/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam-2020.10)/linux-linux4sam-2020.10.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="sama5"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d2_icp"
+BR2_PACKAGE_LINUX_TOOLS_IIO=y
+BR2_PACKAGE_BZIP2=y
+BR2_PACKAGE_XZ=y
+BR2_PACKAGE_ZIP=y
+BR2_PACKAGE_GDB=y
+BR2_PACKAGE_LMBENCH=y
+BR2_PACKAGE_STRACE=y
+BR2_PACKAGE_TREE=y
+BR2_PACKAGE_DOSFSTOOLS=y
+BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y
+BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y
+BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y
+BR2_PACKAGE_MMC_UTILS=y
+BR2_PACKAGE_MTD=y
+BR2_PACKAGE_WILC1000_FIRMWARE=y
+BR2_PACKAGE_EVTEST=y
+BR2_PACKAGE_SETSERIAL=y
+BR2_PACKAGE_SPI_TOOLS=y
+BR2_PACKAGE_USBUTILS=y
+BR2_PACKAGE_LIBSYSFS=y
+BR2_PACKAGE_LIBDRM=y
+BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y
+BR2_PACKAGE_DTC=y
+BR2_PACKAGE_DTC_PROGRAMS=y
+BR2_PACKAGE_ARGP_STANDALONE=y
+BR2_PACKAGE_BLUEZ5_UTILS=y
+BR2_PACKAGE_BRIDGE_UTILS=y
+BR2_PACKAGE_CAN_UTILS=y
+BR2_PACKAGE_ETHTOOL=y
+BR2_PACKAGE_IPERF=y
+BR2_PACKAGE_IPROUTE2=y
+BR2_PACKAGE_IPTABLES=y
+BR2_PACKAGE_IW=y
+BR2_PACKAGE_LRZSZ=y
+BR2_PACKAGE_MII_DIAG=y
+BR2_PACKAGE_OPENSSH=y
+BR2_PACKAGE_WIRELESS_TOOLS=y
+BR2_PACKAGE_WPA_SUPPLICANT=y
+BR2_PACKAGE_HTOP=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v4.0.0-rc2)/at91bootstrap-v4.0.0-rc2.tar.gz"
+BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d2_icpsd_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,linux4sam,u-boot-at91,linux4sam-2020.10)/u-boot-at91-linux4sam-2020.10.tar.gz"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d2_icp_mmc"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y

+ 52 - 0
configs/qemu_aarch64_sbsa_defconfig

@@ -0,0 +1,52 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a53=y
+
+# Toolchain
+BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
+
+# System
+BR2_SYSTEM_DHCP="eth0"
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+
+# Image
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/qemu/aarch64-sbsa/genimage.cfg"
+
+# Linux headers same as kernel, a 5.10 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.10.34"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# UEFI firmware
+BR2_TARGET_EDK2=y
+BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA=y
+BR2_TARGET_GRUB2=y
+BR2_TARGET_GRUB2_ARM64_EFI=y
+
+# ARM Trusted Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/ARM-software/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="v2.4"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="qemu_sbsa"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y
+
+# Host tools for genimage
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_MTOOLS=y
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y

+ 41 - 0
configs/raspberrypicm4io_64_defconfig

@@ -0,0 +1,41 @@
+BR2_aarch64=y
+BR2_cortex_a72=y
+BR2_ARM_FPU_VFPV4=y
+
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+
+BR2_SYSTEM_DHCP="eth0"
+
+# Linux headers same as kernel, a 5.10 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,b657cd2f27d9171b75c846f21e7b4bb581b3ed29)/linux-b657cd2f27d9171b75c846f21e7b4bb581b3ed29.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
+
+# Build the DTB from the kernel sources
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-cm4"
+
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+BR2_PACKAGE_RPI_FIRMWARE=y
+BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
+
+# Required tools to create the SD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+
+# Required tool to flash CM4 eMMC memory
+BR2_PACKAGE_HOST_RASPBERRYPI_USBBOOT
+
+# Filesystem / image
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypicm4io-64/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypicm4io-64/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64"

+ 41 - 0
configs/raspberrypicm4io_defconfig

@@ -0,0 +1,41 @@
+BR2_arm=y
+BR2_cortex_a72=y
+BR2_ARM_FPU_NEON_VFPV4=y
+
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+
+BR2_SYSTEM_DHCP="eth0"
+
+# Linux headers same as kernel, a 5.10 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,b657cd2f27d9171b75c846f21e7b4bb581b3ed29)/linux-b657cd2f27d9171b75c846f21e7b4bb581b3ed29.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
+
+# Build the DTB from the kernel sources
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2711-rpi-cm4"
+
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+BR2_PACKAGE_RPI_FIRMWARE=y
+BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
+
+# Required tools to create the SD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+
+# Required tool to flash CM4 eMMC memory
+BR2_PACKAGE_HOST_RASPBERRYPI_USBBOOT
+
+# Filesystem / image
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypicm4io/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypicm4io/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay"

+ 46 - 0
configs/uevm5432_defconfig

@@ -0,0 +1,46 @@
+# Architecture
+BR2_arm=y
+BR2_cortex_a15=y
+BR2_ARM_FPU_NEON_VFPV4=y
+
+# Linux headers same as kernel, a 5.12 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
+
+# System
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS2"
+BR2_SYSTEM_DHCP="eth0"
+
+# Image
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/uevm5432/genimage.cfg"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.2"
+BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="omap5-uevm"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2021.04"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="omap5_uevm"
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="MLO"
+
+# Required tools to create the SD card image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y

+ 1 - 1
docs/manual/adding-packages-cmake.txt

@@ -100,7 +100,7 @@ typical packages will therefore only use a few of them.
   necessary to set them in the package's +*.mk+ file unless you want
   to override them:
 
-** +CMAKE_BUILD_TYPE+ is driven by +BR2_ENABLE_DEBUG+;
+** +CMAKE_BUILD_TYPE+ is driven by +BR2_ENABLE_RUNTIME_DEBUG+;
 ** +CMAKE_INSTALL_PREFIX+;
 ** +BUILD_SHARED_LIBS+ is driven by +BR2_STATIC_LIBS+;
 ** +BUILD_DOC+, +BUILD_DOCS+ are disabled;

+ 9 - 0
package/Config.in

@@ -109,6 +109,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/kvm-unit-tests/Config.in"
 	source "package/kyua/Config.in"
 	source "package/latencytop/Config.in"
+	source "package/libbpf/Config.in"
 	source "package/lmbench/Config.in"
 	source "package/lsof/Config.in"
 	source "package/ltp-testsuite/Config.in"
@@ -126,6 +127,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/pcm-tools/Config.in"
 	source "package/piglit/Config.in"
 	source "package/ply/Config.in"
+	source "package/poke/Config.in"
 	source "package/ptm2human/Config.in"
 	source "package/pv/Config.in"
 	source "package/racehound/Config.in"
@@ -373,6 +375,7 @@ comment "X applications"
 	source "package/gtkperf/Config.in"
 	source "package/leafpad/Config.in"
 	source "package/midori/Config.in"
+	source "package/mupdf/Config.in"
 	source "package/nodm/Config.in"
 	source "package/pcmanfm/Config.in"
 	source "package/qt-webkit-kiosk/Config.in"
@@ -460,6 +463,7 @@ endmenu
 	source "package/dvb-apps/Config.in"
 	source "package/dvbsnoop/Config.in"
 	source "package/edid-decode/Config.in"
+	source "package/edk2-platforms/Config.in"
 	source "package/eudev/Config.in"
 	source "package/ev3dev-linux-drivers/Config.in"
 	source "package/evemu/Config.in"
@@ -960,6 +964,7 @@ menu "External python modules"
 	source "package/python-daphne/Config.in"
 	source "package/python-dataproperty/Config.in"
 	source "package/python-dateutil/Config.in"
+	source "package/python-dbus-next/Config.in"
 	source "package/python-decorator/Config.in"
 	source "package/python-defusedxml/Config.in"
 	source "package/python-dialog/Config.in"
@@ -1133,6 +1138,7 @@ menu "External python modules"
 	source "package/python-pylibftdi/Config.in"
 	source "package/python-pylru/Config.in"
 	source "package/python-pymodbus/Config.in"
+	source "package/python-pymupdf/Config.in"
 	source "package/python-pymysql/Config.in"
 	source "package/python-pynacl/Config.in"
 	source "package/python-pyopenssl/Config.in"
@@ -1788,6 +1794,7 @@ menu "Networking"
 	source "package/libpagekite/Config.in"
 	source "package/libpcap/Config.in"
 	source "package/libpjsip/Config.in"
+	source "package/libpsl/Config.in"
 	source "package/librelp/Config.in"
 	source "package/librsync/Config.in"
 	source "package/libshairplay/Config.in"
@@ -2057,6 +2064,7 @@ menu "Miscellaneous"
 	source "package/sunwait/Config.in"
 	source "package/taskd/Config.in"
 	source "package/wine/Config.in"
+	source "package/xmrig/Config.in"
 	source "package/xutil_util-macros/Config.in"
 endmenu
 
@@ -2489,6 +2497,7 @@ menu "System tools"
 	source "package/scrub/Config.in"
 	source "package/scrypt/Config.in"
 	source "package/sdbusplus/Config.in"
+	source "package/seatd/Config.in"
 	source "package/smack/Config.in"
 	source "package/start-stop-daemon/Config.in"
 	source "package/supervisor/Config.in"

+ 6 - 0
package/Makefile.in

@@ -136,6 +136,9 @@ endif
 ifeq ($(BR2_OPTIMIZE_FAST),y)
 TARGET_OPTIMIZATION = -Ofast
 endif
+ifeq ($(BR2_ENABLE_DEBUG),)
+TARGET_DEBUGGING = -g0
+endif
 ifeq ($(BR2_DEBUG_1),y)
 TARGET_DEBUGGING = -g1
 endif
@@ -145,6 +148,9 @@ endif
 ifeq ($(BR2_DEBUG_3),y)
 TARGET_DEBUGGING = -g3
 endif
+ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),)
+TARGET_DEBUGGING += -DNDEBUG
+endif
 
 TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS))
 

+ 1 - 1
package/abootimg/Config.in

@@ -7,4 +7,4 @@ config BR2_PACKAGE_ABOOTIMG
 	  Tool to manipulate Android Boot Images, either on files
 	  or directly on /dev block devices.
 
-	  https://github.com/ggrandou/abootimg
+	  https://gitlab.com/ajs124/abootimg

+ 1 - 1
package/abootimg/abootimg.hash

@@ -1,3 +1,3 @@
 # Locally calculated
-sha256	eb8d912bc7b5454c2afd3385fd86f4917d3587c48a6f5ae45df7856d88502cab	abootimg-7e127fee6a3981f6b0a50ce9910267cd501e09d4.tar.gz
+sha256	f377da42a57d982cfc22fa75c5a69febdc3e4c1ef43cd0ceaec42e14067e2f37	abootimg-1ebeb393252ab5aeed62e34bc439b6728444f06e-br1.tar.gz
 sha256	8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643	LICENSE

+ 3 - 2
package/abootimg/abootimg.mk

@@ -4,8 +4,9 @@
 #
 ################################################################################
 
-ABOOTIMG_VERSION = 7e127fee6a3981f6b0a50ce9910267cd501e09d4
-ABOOTIMG_SITE = $(call github,ggrandou,abootimg,$(ABOOTIMG_VERSION))
+ABOOTIMG_VERSION = 1ebeb393252ab5aeed62e34bc439b6728444f06e
+ABOOTIMG_SITE = https://gitlab.com/ajs124/abootimg.git
+ABOOTIMG_SITE_METHOD = git
 ABOOTIMG_LICENSE = GPL-2.0+
 ABOOTIMG_LICENSE_FILES = LICENSE
 

+ 1 - 0
package/aircrack-ng/Config.in

@@ -5,6 +5,7 @@ config BR2_PACKAGE_AIRCRACK_NG
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on !BR2_STATIC_LIBS # dlfcn.h
 	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
+	select BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4 if BR2_PACKAGE_LIBOPENSSL
 	help
 	  A set of tools for auditing wireless networks
 

+ 0 - 32
package/audit/0001-Fix-audispd-path-in-auditd.conf.patch

@@ -1,32 +0,0 @@
-From 6e1fd09f7bc131c8f16d9cc43e2455ba4650c651 Mon Sep 17 00:00:00 2001
-From: Carlos Santos <casantos@datacom.com.br>
-Date: Sat, 3 Nov 2018 08:25:58 -0300
-Subject: [PATCH] Fix audispd path in auditd.conf
-
-audispd is installed at /usr/sbin but the configuration file pointed
-to /sbin, causing auditd to fail on startup.
-
-This patch cannot be sent upstream because audispd does not exist
-anymore on the master branch (it was merged to auditd).
-
-Signed-off-by: Carlos Santos <casantos@datacom.com.br>
----
- init.d/auditd.conf | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/init.d/auditd.conf b/init.d/auditd.conf
-index 4dcda83..998904f 100644
---- a/init.d/auditd.conf
-+++ b/init.d/auditd.conf
-@@ -13,7 +13,7 @@ max_log_file = 8
- num_logs = 5
- priority_boost = 4
- disp_qos = lossy
--dispatcher = /sbin/audispd
-+dispatcher = /usr/sbin/audispd
- name_format = NONE
- ##name = mydomain
- max_log_file_action = ROTATE
--- 
-2.17.1
-

+ 0 - 133
package/audit/0002-Add-substitue-functions-for-strndupa-rawmemchr.patch

@@ -1,133 +0,0 @@
-From c39a071e7c021f6ff3554aca2758e97b47a9777c Mon Sep 17 00:00:00 2001
-From: Steve Grubb <sgrubb@redhat.com>
-Date: Tue, 26 Feb 2019 18:33:33 -0500
-Subject: [PATCH] Add substitue functions for strndupa & rawmemchr
-
-(cherry picked from commit d579a08bb1cde71f939c13ac6b2261052ae9f77e)
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
----
- auparse/auparse.c   | 12 +++++++++++-
- auparse/interpret.c |  9 ++++++++-
- configure.ac        | 14 +++++++++++++-
- src/ausearch-lol.c  | 12 +++++++++++-
- 4 files changed, 43 insertions(+), 4 deletions(-)
-
-diff --git a/auparse/auparse.c b/auparse/auparse.c
-index 650db02..2e1c737 100644
---- a/auparse/auparse.c
-+++ b/auparse/auparse.c
-@@ -1,5 +1,5 @@
- /* auparse.c --
-- * Copyright 2006-08,2012-17 Red Hat Inc., Durham, North Carolina.
-+ * Copyright 2006-08,2012-19 Red Hat Inc., Durham, North Carolina.
-  * All Rights Reserved.
-  *
-  * This library is free software; you can redistribute it and/or
-@@ -1118,6 +1118,16 @@ static int str2event(char *s, au_event_t *e)
- 	return 0;
- }
- 
-+#ifndef HAVE_STRNDUPA
-+static inline char *strndupa(const char *old, size_t n)
-+{
-+	size_t len = strnlen(old, n);
-+	char *tmp = alloca(len + 1);
-+	tmp[len] = 0;
-+	return memcpy(tmp, old, len);
-+}
-+#endif
-+
- /* Returns 0 on success and 1 on error */
- static int extract_timestamp(const char *b, au_event_t *e)
- {
-diff --git a/auparse/interpret.c b/auparse/interpret.c
-index 51c4a5e..67b7b77 100644
---- a/auparse/interpret.c
-+++ b/auparse/interpret.c
-@@ -853,6 +853,13 @@ err_out:
- 		return print_escaped(id->val);
- }
- 
-+// rawmemchr is faster. Let's use it if we have it.
-+#ifdef HAVE_RAWMEMCHR
-+#define STRCHR rawmemchr
-+#else
-+#define STRCHR strchr
-+#endif
-+
- static const char *print_proctitle(const char *val)
- {
- 	char *out = (char *)print_escaped(val);
-@@ -863,7 +870,7 @@ static const char *print_proctitle(const char *val)
- 		// Proctitle has arguments separated by NUL bytes
- 		// We need to write over the NUL bytes with a space
- 		// so that we can see the arguments
--		while ((ptr  = rawmemchr(ptr, '\0'))) {
-+		while ((ptr  = STRCHR(ptr, '\0'))) {
- 			if (ptr >= end)
- 				break;
- 			*ptr = ' ';
-diff --git a/configure.ac b/configure.ac
-index 6e345f1..6f3007e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1,7 +1,7 @@
- dnl
- define([AC_INIT_NOTICE],
- [### Generated automatically using autoconf version] AC_ACVERSION [
--### Copyright 2005-18 Steve Grubb <sgrubb@redhat.com>
-+### Copyright 2005-19 Steve Grubb <sgrubb@redhat.com>
- ###
- ### Permission is hereby granted, free of charge, to any person obtaining a
- ### copy of this software and associated documentation files (the "Software"),
-@@ -72,6 +72,18 @@ dnl; posix_fallocate is used in audisp-remote
- AC_CHECK_FUNCS([posix_fallocate])
- dnl; signalfd is needed for libev
- AC_CHECK_FUNC([signalfd], [], [ AC_MSG_ERROR([The signalfd system call is necessary for auditd]) ])
-+dnl; check if rawmemchr is available
-+AC_CHECK_FUNCS([rawmemchr])
-+dnl; check if strndupa is available
-+AC_LINK_IFELSE(
-+  [AC_LANG_SOURCE(
-+    [[
-+      #define _GNU_SOURCE
-+      #include <string.h>
-+      int main() { (void) strndupa("test", 10); return 0; }]])],
-+ [AC_DEFINE(HAVE_STRNDUPA, 1, [Let us know if we have it or not])],
-+ []
-+)
- 
- ALLWARNS=""
- ALLDEBUG="-g"
-diff --git a/src/ausearch-lol.c b/src/ausearch-lol.c
-index 5d17a72..758c33e 100644
---- a/src/ausearch-lol.c
-+++ b/src/ausearch-lol.c
-@@ -1,6 +1,6 @@
- /*
- * ausearch-lol.c - linked list of linked lists library
--* Copyright (c) 2008,2010,2014,2016 Red Hat Inc., Durham, North Carolina.
-+* Copyright (c) 2008,2010,2014,2016,2019 Red Hat Inc., Durham, North Carolina.
- * All Rights Reserved. 
- *
- * This software may be freely redistributed and/or modified under the
-@@ -152,6 +152,16 @@ static int compare_event_time(event *e1, event *e2)
- 	return 0;
- }
- 
-+#ifndef HAVE_STRNDUPA
-+static inline char *strndupa(const char *old, size_t n)
-+{
-+	size_t len = strnlen(old, n);
-+	char *tmp = alloca(len + 1);
-+	tmp[len] = 0;
-+	return memcpy(tmp, old, len);
-+}
-+#endif
-+
- /*
-  * This function will look at the line and pick out pieces of it.
-  */
--- 
-2.21.0
-

+ 0 - 28
package/audit/0003-Header-definitions-need-to-be-external-when-building.patch

@@ -1,28 +0,0 @@
-From 017e6c6ab95df55f34e339d2139def83e5dada1f Mon Sep 17 00:00:00 2001
-From: Steve Grubb <sgrubb@redhat.com>
-Date: Fri, 10 Jan 2020 21:13:50 -0500
-Subject: [PATCH] Header definitions need to be external when building with
- -fno-common (which is default in GCC 10) - Tony Jones
-
-Patch taken from upstream: https://github.com/linux-audit/audit-userspace/commit/017e6c6ab95df55f34e339d2139def83e5dada1f
-Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
----
- src/ausearch-common.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/ausearch-common.h b/src/ausearch-common.h
-index 6669203..3040547 100644
---- a/src/ausearch-common.h
-+++ b/src/ausearch-common.h
-@@ -50,7 +50,7 @@ extern pid_t event_pid;
- extern int event_exact_match;
- extern uid_t event_uid, event_euid, event_loginuid;
- extern const char *event_tuid, *event_teuid, *event_tauid;
--slist *event_node_list;
-+extern slist *event_node_list;
- extern const char *event_comm;
- extern const char *event_filename;
- extern const char *event_hostname;
--- 
-2.20.1
-

+ 3 - 3
package/audit/audit.hash

@@ -1,4 +1,4 @@
 #Locally computed
-sha256 0e5d4103646e00f8d1981e1cd2faea7a2ae28e854c31a803e907a383c5e2ecb7 audit-2.8.5.tar.gz
-sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING
-sha256 f18a0811fa0e220ccbc42f661545e77f0388631e209585ed582a1c693029c6aa COPYING.LIB
+sha256  994c4250d8fd43f3087a3c2ce73461832e30f1e9b278bf5bb03c3e07091155a5  audit-3.0.1.tar.gz
+sha256  32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670  COPYING
+sha256  f18a0811fa0e220ccbc42f661545e77f0388631e209585ed582a1c693029c6aa  COPYING.LIB

+ 1 - 1
package/audit/audit.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-AUDIT_VERSION = 2.8.5
+AUDIT_VERSION = 3.0.1
 AUDIT_SITE = http://people.redhat.com/sgrubb/audit
 AUDIT_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (libraries)
 AUDIT_LICENSE_FILES = COPYING COPYING.LIB

+ 33 - 0
package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch

@@ -0,0 +1,33 @@
+From 301ef15aefa6764466c374d07efb511b1c3862cc Mon Sep 17 00:00:00 2001
+From: Nikita Ermakov <coffe92@gmail.com>
+Date: Wed, 20 May 2020 17:57:17 +0300
+Subject: [PATCH] Fix 'undefined reference to __data_start' linker error on
+ RISC-V
+
+Issue #294 (bdwgc).
+
+* include/private/gcconfig.h [RISCV && LINUX] (__data_start): Add
+attribute(weak).
+
+(cherry picked from commit 538562ad01b181f4cc3913da1ac06a77945cd9b9)
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ include/private/gcconfig.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
+index d9d45da1..d6cefa6f 100644
+--- a/include/private/gcconfig.h
++++ b/include/private/gcconfig.h
+@@ -2943,7 +2943,7 @@ EXTERN_C_BEGIN
+ #   define ALIGNMENT (CPP_WORDSZ/8)
+ #   ifdef LINUX
+ #     define OS_TYPE "LINUX"
+-      extern int __data_start[];
++      extern int __data_start[] __attribute__((__weak__));
+ #     define DATASTART ((ptr_t)__data_start)
+ #     define LINUX_STACKBOTTOM
+ #     define DYNAMIC_LOADING
+-- 
+2.30.2
+

+ 1 - 1
package/boost/boost.mk

@@ -95,7 +95,7 @@ BOOST_OPTS += --no-cmake-config \
 	     toolset=gcc \
 	     threading=multi \
 	     abi=$(BOOST_ABI) \
-	     variant=$(if $(BR2_ENABLE_DEBUG),debug,release)
+	     variant=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release)
 
 ifeq ($(BR2_sparc64),y)
 BOOST_OPTS += architecture=sparc instruction-set=ultrasparc

+ 1 - 1
package/cage/cage.hash

@@ -1,5 +1,5 @@
 # Generated locally
-sha256 38a3e3968f00cc58fe1d9448e972cfac7d1efa30c48699f09032f264101a55ac  cage-0.1.2.1.tar.gz
+sha256 c28aa8230f937c89b564967748451c1eb15d8633a71a1ed6e22d532afa15462e  cage-0.1.3.tar.gz
 
 # Hashes for license files:
 sha256 e117104073335dbaf78596fb1bedf89dda63c71f60f0b665947b2d369c77ecee  LICENSE

+ 4 - 3
package/cage/cage.mk

@@ -4,16 +4,17 @@
 #
 ################################################################################
 
-CAGE_VERSION = 0.1.2.1
+CAGE_VERSION = 0.1.3
 CAGE_SITE = https://github.com/Hjdskes/cage/releases/download/v$(CAGE_VERSION)
 CAGE_LICENSE = MIT
 CAGE_LICENSE_FILES = LICENSE
 CAGE_DEPENDENCIES = host-pkgconf wlroots
+CAGE_CONF_OPTS = -Dman-pages=disabled
 
 ifeq ($(BR2_PACKAGE_XORG7),y)
-CAGE_CONF_OPTS = -Dxwayland=true
+CAGE_CONF_OPTS += -Dxwayland=true
 else
-CAGE_CONF_OPTS = -Dxwayland=false
+CAGE_CONF_OPTS += -Dxwayland=false
 endif
 
 $(eval $(meson-package))

+ 1 - 1
package/checkpolicy/checkpolicy.hash

@@ -1,5 +1,5 @@
 # https://github.com/SELinuxProject/selinux/wiki/Releases
-sha256 dfc7707070520c93b14fbbdfdbe081364d806bf28e3e79e10318c2594c77bbb2  checkpolicy-3.1.tar.gz
+sha256 9b1c81fa86fe3867842164448d90c8e7ea94b2987497809c65d4caa87a5c5bc8  checkpolicy-3.2.tar.gz
 
 # Hash for license file
 sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994  COPYING

+ 2 - 2
package/checkpolicy/checkpolicy.mk

@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-CHECKPOLICY_VERSION = 3.1
-CHECKPOLICY_SITE = https://github.com/SELinuxProject/selinux/releases/download/20200710
+CHECKPOLICY_VERSION = 3.2
+CHECKPOLICY_SITE = https://github.com/SELinuxProject/selinux/releases/download/$(CHECKPOLICY_VERSION)
 CHECKPOLICY_LICENSE = GPL-2.0
 CHECKPOLICY_LICENSE_FILES = COPYING
 

+ 4 - 4
package/cog/cog.hash

@@ -1,7 +1,7 @@
-# From https://wpewebkit.org/releases/cog-0.8.1.tar.xz.sums
-md5  21664fb04c9149dea6d68e13e6074276  cog-0.8.1.tar.xz
-sha1  baabba7f0f6009c64ef0c4f7c5f807382cffef5d  cog-0.8.1.tar.xz
-sha256  b82e917eb764943b9859c631974f8f0e748b79ae87bb7a944f46c818740e0208  cog-0.8.1.tar.xz
+# From https://wpewebkit.org/releases/cog-0.10.0.tar.xz.sums
+md5  1b0407b6163a3a01afdfc0fb454a7570  cog-0.10.0.tar.xz
+sha1  911816c00a2b08f4cfd388b1d2e176835c9b4e9e  cog-0.10.0.tar.xz
+sha256  2c72369c636ca4684370adad1344071b23c9ee2c851eb7d738fa2e1d7092031f  cog-0.10.0.tar.xz
 
 # Hashes for license files:
 sha256  e6c42d93c68b292bcccf6d2ec3e13da85df90b718ba27c2c2a01053a9d009252  COPYING

+ 1 - 1
package/cog/cog.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-COG_VERSION = 0.8.1
+COG_VERSION = 0.10.0
 COG_SITE = https://wpewebkit.org/releases
 COG_SOURCE = cog-$(COG_VERSION).tar.xz
 COG_INSTALL_STAGING = YES

+ 1 - 1
package/dt-utils/dt-utils.hash

@@ -1,3 +1,3 @@
 # Locally computed
-sha256  737313719d7c04d7b9576fdc572d838c81ea22ea41a44c7646467018e67a0b97  dt-utils-v2019.01.0-br1.tar.gz
+sha256  8b29d3a8799170afdb1b077e655528bf4e6afe0c789107b1eec8fff9d4482771  dt-utils-v2021.03.0-br1.tar.gz
 sha256  a45932c79317d15116eadbf1c9c6fc59117ec3c4621db3a876066defa723963b  COPYING

+ 1 - 1
package/dt-utils/dt-utils.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-DT_UTILS_VERSION = v2019.01.0
+DT_UTILS_VERSION = v2021.03.0
 DT_UTILS_SITE = https://git.pengutronix.de/git/tools/dt-utils
 DT_UTILS_SITE_METHOD = git
 DT_UTILS_LICENSE = GPL-2.0

+ 8 - 0
package/edk2-platforms/Config.in

@@ -0,0 +1,8 @@
+config BR2_PACKAGE_EDK2_PLATFORMS
+	bool
+	help
+	  EDK2 description files for all supported platforms.
+	  The main EDK2 bootloader package will depend on these
+	  description files while building firmware for some platforms.
+
+	  https://github.com/tianocore/edk2-platforms

+ 3 - 0
package/edk2-platforms/edk2-platforms.hash

@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  dfdc34fea86e5037a3a6cbd2a83b1f655f16b4c9ab4f5ff9da91e45a358c9a14  edk2-platforms-db922e1253cb6f1fc456805bc42fb7d401eed5c2.tar.gz
+sha256  50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80  License.txt

+ 22 - 0
package/edk2-platforms/edk2-platforms.mk

@@ -0,0 +1,22 @@
+################################################################################
+#
+# edk2-platforms
+#
+################################################################################
+
+# Keep in sync with latest commit as of the release date for boot/edk2
+EDK2_PLATFORMS_VERSION = db922e1253cb6f1fc456805bc42fb7d401eed5c2
+EDK2_PLATFORMS_SITE = $(call github,tianocore,edk2-platforms,$(EDK2_PLATFORMS_VERSION))
+EDK2_PLATFORMS_LICENSE = BSD-2-Clause
+EDK2_PLATFORMS_LICENSE_FILE = License.txt
+EDK2_PLATFORMS_INSTALL_TARGET = NO
+EDK2_PLATFORMS_INSTALL_STAGING = YES
+
+# There is nothing to build for edk2-platforms. All we need to do is to copy
+# all description files to staging, for other packages to build with.
+define EDK2_PLATFORMS_INSTALL_STAGING_CMDS
+	rm -rf $(STAGING_DIR)/usr/share/edk2-platforms
+	cp -rf $(@D) $(STAGING_DIR)/usr/share/edk2-platforms
+endef
+
+$(eval $(generic-package))

+ 1 - 1
package/ethtool/ethtool.hash

@@ -1,5 +1,5 @@
 # From https://www.kernel.org/pub/software/network/ethtool/sha256sums.asc
-sha256  817d5396a9307b4c637b435d4c558b8f5f964a1464a035ca3c0180f4cc93cfcf  ethtool-5.10.tar.xz
+sha256  f5ddfa9c75053d8011b8c8c99ec4e2d3c83cd1972f638692d62e37fa3ef36f07  ethtool-5.12.tar.xz
 # Locally calculated
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
 sha256  5d632934396f90c82dfebe3c9512648bbb6333b406113d0cd331b0e0aa2d34a1  LICENSE

+ 1 - 1
package/ethtool/ethtool.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ETHTOOL_VERSION = 5.10
+ETHTOOL_VERSION = 5.12
 ETHTOOL_SOURCE = ethtool-$(ETHTOOL_VERSION).tar.xz
 ETHTOOL_SITE = $(BR2_KERNEL_MIRROR)/software/network/ethtool
 ETHTOOL_LICENSE = GPL-2.0

+ 4 - 8
package/flare-engine/flare-engine.mk

@@ -14,16 +14,12 @@ FLARE_ENGINE_DEPENDENCIES += sdl2 sdl2_image sdl2_mixer sdl2_ttf
 # Don't use /usr/games and /usr/share/games
 FLARE_ENGINE_CONF_OPTS += -DBINDIR=bin -DDATADIR=share/flare
 
-# Don't use the default Debug type as it adds -pg (gprof)
-ifeq ($(BR2_ENABLE_DEBUG),y)
-FLARE_ENGINE_CONF_OPTS += -DCMAKE_BUILD_TYPE=RelWithDebInfo
-endif
+# CMAKE_BUILD_TYPE is only used to set optimization and debug flags, all of
+# which we want Buildroot to steer explicitly. Explicitly set a fake build type
+# to get this control.
+FLARE_ENGINE_CONF_OPTS += -DCMAKE_BUILD_TYPE=Buildroot
 
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
-# CMakeLists.txt sets CMAKE_CXX_FLAGS_<BUILD_TYPE> depending on
-# BUILD_TYPE, and this comes after the generic CMAKE_CXX_FLAGS.
-# Override CMAKE_BUILD_TYPE so no overrides are applied.
-FLARE_ENGINE_CONF_OPTS += -DCMAKE_BUILD_TYPE=Buildroot
 FLARE_ENGINE_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0"
 endif
 

+ 1 - 1
package/fluidsynth/fluidsynth.hash

@@ -1,3 +1,3 @@
 # Locally computed
-sha256  928fb16f307507485bd1d9b010dafba8c747bce5de2ba47ab1705944c87013b6  fluidsynth-2.2.0.tar.gz
+sha256  1c56660f23f6c406b36646cc619fc2d2a5265d1d3290e79bcef4505bcd985fdd  fluidsynth-2.2.1.tar.gz
 sha256  9b872a8a070b8ad329c4bd380fb1bf0000f564c75023ec8e1e6803f15364b9e9  LICENSE

+ 1 - 1
package/fluidsynth/fluidsynth.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FLUIDSYNTH_VERSION = 2.2.0
+FLUIDSYNTH_VERSION = 2.2.1
 FLUIDSYNTH_SITE = $(call github,FluidSynth,fluidsynth,v$(FLUIDSYNTH_VERSION))
 FLUIDSYNTH_LICENSE = LGPL-2.1+
 FLUIDSYNTH_LICENSE_FILES = LICENSE

+ 1 - 1
package/gcc/gcc.mk

@@ -231,7 +231,7 @@ 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)
+ifeq ($(BR2_powerpc)$(BR2_powerpc64),y)
 HOST_GCC_COMMON_CONF_OPTS += --enable-secureplt
 endif
 

+ 1 - 1
package/gnuchess/gnuchess.hash

@@ -1,3 +1,3 @@
 # sha256 locally computed
-sha256  e536675a61abe82e61b919f6b786755441d9fcd4c21e1c82fb9e5340dd229846  gnuchess-6.2.7.tar.gz
+sha256  d50446cda8012240321da39cddbb4df4d08458a8d538a4738882814139583847  gnuchess-6.2.8.tar.gz
 sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING

+ 1 - 1
package/gnuchess/gnuchess.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GNUCHESS_VERSION = 6.2.7
+GNUCHESS_VERSION = 6.2.8
 GNUCHESS_SITE = $(BR2_GNU_MIRROR)/chess
 GNUCHESS_LICENSE = GPL-3.0+
 GNUCHESS_LICENSE_FILES = COPYING

+ 1 - 1
package/gobject-introspection/0001-disable-tests.patch

@@ -16,7 +16,7 @@ diff --git a/meson.build b/meson.build
 index eed4d6b..5058664 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -214,12 +214,6 @@ if get_option('build_introspection_data') == true
+@@ -222,12 +222,6 @@ if get_option('build_introspection_data') == true
  endif
  subdir('docs')
  

+ 1 - 1
package/gobject-introspection/0002-Add-rpath-links-to-ccompiler.patch

@@ -15,7 +15,7 @@ diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
 index a8bd5b1..51bb9bc 100644
 --- a/giscanner/ccompiler.py
 +++ b/giscanner/ccompiler.py
-@@ -229,6 +229,8 @@ class CCompiler(object):
+@@ -231,6 +231,8 @@ class CCompiler(object):
  
          for envvar in runtime_path_envvar:
              if envvar in os.environ:

+ 0 - 1
package/gobject-introspection/Config.in

@@ -2,7 +2,6 @@ config BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS
 	bool
 	default y
 	depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
-	depends on !BR2_RISCV_32 # qemu-riscv32 segfaults in qemu-5.0.0
 
 config BR2_PACKAGE_GOBJECT_INTROSPECTION
 	bool "gobject-introspection"

+ 5 - 4
package/gobject-introspection/gobject-introspection.hash

@@ -1,4 +1,5 @@
-#From http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.64/gobject-introspection-1.64.1.sha256sum
-sha256 80beae6728c134521926affff9b2e97125749b38d38744dc901f4010ee3e7fa7 gobject-introspection-1.64.1.tar.xz
-sha256 d245807f90032872d1438d741ed21e2490e1175dc8aa3afa5ddb6c8e529b58e5 COPYING.LGPL
-sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING.GPL
+#From http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.68/gobject-introspection-1.68.0.sha256sum
+sha256  d229242481a201b84a0c66716de1752bca41db4133672cfcfb37c93eb6e54a27  gobject-introspection-1.68.0.tar.xz
+sha256  d245807f90032872d1438d741ed21e2490e1175dc8aa3afa5ddb6c8e529b58e5  COPYING.LGPL
+sha256  32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670  COPYING.GPL
+sha256  ad35e98ae9342a3539c36f2171e84d175394ddcff625887290c751302cb02983  giscanner/scannerlexer.l

+ 6 - 6
package/gobject-introspection/gobject-introspection.mk

@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-GOBJECT_INTROSPECTION_VERSION_MAJOR = 1.64
-GOBJECT_INTROSPECTION_VERSION = $(GOBJECT_INTROSPECTION_VERSION_MAJOR).1
+GOBJECT_INTROSPECTION_VERSION_MAJOR = 1.68
+GOBJECT_INTROSPECTION_VERSION = $(GOBJECT_INTROSPECTION_VERSION_MAJOR).0
 GOBJECT_INTROSPECTION_SITE = http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/$(GOBJECT_INTROSPECTION_VERSION_MAJOR)
 GOBJECT_INTROSPECTION_SOURCE = gobject-introspection-$(GOBJECT_INTROSPECTION_VERSION).tar.xz
 GOBJECT_INTROSPECTION_INSTALL_STAGING = YES
@@ -43,7 +43,7 @@ HOST_GOBJECT_INTROSPECTION_NINJA_ENV += \
 # Use the host gi-scanner to prevent the scanner from generating incorrect
 # elf classes.
 GOBJECT_INTROSPECTION_CONF_OPTS = \
-	-Dgi_cross_use_host_gi=true \
+	-Dgi_cross_use_prebuilt_gi=true \
 	-Dgi_cross_binary_wrapper="$(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper" \
 	-Dgi_cross_ldd_wrapper="$(STAGING_DIR)/usr/bin/g-ir-scanner-lddwrapper" \
 	-Dbuild_introspection_data=true \
@@ -64,8 +64,8 @@ HOST_GOBJECT_INTROSPECTION_CONF_ENV = \
 	GI_SCANNER_DISABLE_CACHE=1
 
 # Make sure g-ir-tool-template uses the host python.
-define GOBJECT_INTROSPECTION_FIX_TOOLTEMPLATE_PYTHON_PATH
-	$(SED) '1s%#!.*%#!$(HOST_DIR)/bin/python%' $(@D)/tools/g-ir-tool-template.in
+define GOBJECT_INTROSPECTION_FIX_TOOLS_PYTHON_PATH
+	$(SED) '1s%#!.*%#!$(HOST_DIR)/bin/python3%' $(@D)/tools/g-ir-tool-template.in
 endef
 HOST_GOBJECT_INTROSPECTION_PRE_CONFIGURE_HOOKS += GOBJECT_INTROSPECTION_FIX_TOOLTEMPLATE_PYTHON_PATH
 
@@ -75,7 +75,7 @@ HOST_GOBJECT_INTROSPECTION_PRE_CONFIGURE_HOOKS += GOBJECT_INTROSPECTION_FIX_TOOL
 # - Create a safe modules directory which does not exist so we don't load random things
 #   which may then get deleted (or their dependencies) and potentially segfault
 define GOBJECT_INTROSPECTION_INSTALL_PRE_WRAPPERS
-	$(SED) '1s%#!.*%#!$(HOST_DIR)/bin/python%' $(@D)/tools/g-ir-tool-template.in
+	$(SED) '1s%#!.*%#!$(HOST_DIR)/bin/python3%' $(@D)/tools/g-ir-tool-template.in
 
 	$(INSTALL) -D -m 755 $(GOBJECT_INTROSPECTION_PKGDIR)/g-ir-scanner-lddwrapper.in \
 		$(STAGING_DIR)/usr/bin/g-ir-scanner-lddwrapper

+ 1 - 1
package/grpc/grpc.hash

@@ -1,3 +1,3 @@
 # Locally computed
-sha256  c2dc8e876ea12052d6dd16704492fd8921df8c6d38c70c4708da332cf116df22  grpc-1.37.0.tar.gz
+sha256  acf247ec3a52edaee5dee28644a4e485c5e5badf46bdb24a80ca1d76cb8f1174  grpc-1.37.1.tar.gz
 sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE

+ 1 - 1
package/grpc/grpc.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GRPC_VERSION = 1.37.0
+GRPC_VERSION = 1.37.1
 GRPC_SITE = $(call github,grpc,grpc,v$(GRPC_VERSION))
 GRPC_LICENSE = Apache-2.0
 GRPC_LICENSE_FILES = LICENSE

+ 2 - 0
package/hostapd/Config.in

@@ -1,6 +1,8 @@
 config BR2_PACKAGE_HOSTAPD
 	bool "hostapd"
 	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL
+	select BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4 if BR2_PACKAGE_LIBOPENSSL
 	help
 	  User space daemon for wireless access points.
 

+ 4 - 4
package/imlib2/imlib2.hash

@@ -1,8 +1,8 @@
-# From https://sourceforge.net/projects/enlightenment/files/imlib2-src/1.6.1/
-md5  7b3fbcb974b48822b32b326c6a47764b  imlib2-1.6.1.tar.bz2
-sha1  3b5f850e83cbb7481e33061348fb9c7a555c8c60  imlib2-1.6.1.tar.bz2
+# From https://sourceforge.net/projects/enlightenment/files/imlib2-src/1.7.1/
+md5  98569de9b10bcb6fd5d13e4d331ddd81  imlib2-1.7.1.tar.bz2
+sha1  092c66ae0180798a4036e68c68d7f316de192e36  imlib2-1.7.1.tar.bz2
 
 # Locally computed
-sha256  4d393a77e13da883c8ee2da3b029da3570210fe37d000c9ac33d9fce751b166d  imlib2-1.6.1.tar.bz2
+sha256  033a6a639dcbc8e03f65ff05e57068e7346d50ee2f2fff304bb9095a1b2bc407  imlib2-1.7.1.tar.bz2
 sha256  fb70339dd33a77b6213c7ae067fccf93d04af44ff3f937c61f8863f7970e73f6  COPYING
 sha256  8c9a2e92ed4937e2d30c2ea95439c36ed3002fc47e34efee43455a460fee8ef5  COPYING-PLAIN

+ 1 - 1
package/imlib2/imlib2.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-IMLIB2_VERSION = 1.6.1
+IMLIB2_VERSION = 1.7.1
 IMLIB2_SOURCE = imlib2-$(IMLIB2_VERSION).tar.bz2
 IMLIB2_SITE = http://downloads.sourceforge.net/project/enlightenment/imlib2-src/$(IMLIB2_VERSION)
 IMLIB2_LICENSE = Imlib2

+ 0 - 55
package/iproute2/0001-devlink-update-include-files.patch

@@ -1,55 +0,0 @@
-From 12fafa27c7b306e6c397e858f4d5a8159500f659 Mon Sep 17 00:00:00 2001
-From: Stephen Hemminger <stephen@networkplumber.org>
-Date: Thu, 11 Jun 2020 09:46:46 -0700
-Subject: devlink: update include files
-
-Use the tool iwyu to get more complete list of includes for
-all the bits used by devlink.
-
-This should also fix build with musl libc.
-
-Fixes: c4dfddccef4e ("fix JSON output of mon command")
-Reported-off-by: Dan Robertson <dan@dlrobertson.com>
-Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
-
-[Retrieved from:
-https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=12fafa27c7b306e6c397e858f4d5a8159500f659]
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
----
- devlink/devlink.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/devlink/devlink.c b/devlink/devlink.c
-index 507972c3..ce2e4676 100644
---- a/devlink/devlink.c
-+++ b/devlink/devlink.c
-@@ -19,18 +19,25 @@
- #include <limits.h>
- #include <errno.h>
- #include <inttypes.h>
-+#include <signal.h>
-+#include <time.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
- #include <sys/sysinfo.h>
- #define _LINUX_SYSINFO_H /* avoid collision with musl header */
- #include <linux/genetlink.h>
- #include <linux/devlink.h>
-+#include <linux/netlink.h>
- #include <libmnl/libmnl.h>
- #include <netinet/ether.h>
-+#include <sys/select.h>
-+#include <sys/socket.h>
- #include <sys/types.h>
- 
- #include "SNAPSHOT.h"
- #include "list.h"
- #include "mnlg.h"
--#include "json_writer.h"
-+#include "json_print.h"
- #include "utils.h"
- #include "namespace.h"
- 
--- 
-cgit 1.2.3-1.el7
-

+ 114 - 0
package/iproute2/0001-lib-fs-fix-issue-when-name-open-_to_handle_at-is-not.patch

@@ -0,0 +1,114 @@
+From c5b72cc56bf88160bbf477ec8565fed865e7a1c9 Mon Sep 17 00:00:00 2001
+From: Heiko Thiery <heiko.thiery@gmail.com>
+Date: Sat, 8 May 2021 08:49:26 +0200
+Subject: [PATCH] lib/fs: fix issue when {name,open}_to_handle_at() is not
+ implemented
+
+With commit d5e6ee0dac64 the usage of functions name_to_handle_at() and
+open_by_handle_at() are introduced. But these function are not available
+e.g. in uclibc-ng < 1.0.35. To have a backward compatibility check for the
+availability in the configure script and in case of absence do a direct
+syscall.
+
+Fixes: d5e6ee0dac64 ("ss: introduce cgroup2 cache and helper functions")
+Cc: Dmitry Yakunin <zeil@yandex-team.ru>
+Cc: Petr Vorel <petr.vorel@gmail.com>
+Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
+Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
+Signed-off-by: David Ahern <dsahern@kernel.org>
+[ upstream-status: https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=c5b72cc56bf88160bbf477ec8565fed865e7a1c9 ]
+---
+ configure | 28 ++++++++++++++++++++++++++++
+ lib/fs.c  | 25 +++++++++++++++++++++++++
+ 2 files changed, 53 insertions(+)
+
+diff --git a/configure b/configure
+index 2c363d3b..179eae08 100755
+--- a/configure
++++ b/configure
+@@ -202,6 +202,31 @@ EOF
+     rm -f $TMPDIR/setnstest.c $TMPDIR/setnstest
+ }
+
++check_name_to_handle_at()
++{
++    cat >$TMPDIR/name_to_handle_at_test.c <<EOF
++#define _GNU_SOURCE
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++int main(int argc, char **argv)
++{
++	struct file_handle *fhp;
++	int mount_id, flags, dirfd;
++	char *pathname;
++	name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags);
++	return 0;
++}
++EOF
++    if $CC -I$INCLUDE -o $TMPDIR/name_to_handle_at_test $TMPDIR/name_to_handle_at_test.c >/dev/null 2>&1; then
++        echo "yes"
++        echo "CFLAGS += -DHAVE_HANDLE_AT" >>$CONFIG
++    else
++        echo "no"
++    fi
++    rm -f $TMPDIR/name_to_handle_at_test.c $TMPDIR/name_to_handle_at_test
++}
++
+ check_ipset()
+ {
+     cat >$TMPDIR/ipsettest.c <<EOF
+@@ -492,6 +517,9 @@ fi
+ echo -n "libc has setns: "
+ check_setns
+
++echo -n "libc has name_to_handle_at: "
++check_name_to_handle_at
++
+ echo -n "SELinux support: "
+ check_selinux
+
+diff --git a/lib/fs.c b/lib/fs.c
+index f161d888..05697a7e 100644
+--- a/lib/fs.c
++++ b/lib/fs.c
+@@ -25,11 +25,36 @@
+
+ #include "utils.h"
+
++#ifndef HAVE_HANDLE_AT
++# include <sys/syscall.h>
++#endif
++
+ #define CGROUP2_FS_NAME "cgroup2"
+
+ /* if not already mounted cgroup2 is mounted here for iproute2's use */
+ #define MNT_CGRP2_PATH  "/var/run/cgroup2"
+
++
++#ifndef HAVE_HANDLE_AT
++struct file_handle {
++	unsigned handle_bytes;
++	int handle_type;
++	unsigned char f_handle[];
++};
++
++static int name_to_handle_at(int dirfd, const char *pathname,
++	struct file_handle *handle, int *mount_id, int flags)
++{
++	return syscall(__NR_name_to_handle_at, dirfd, pathname, handle,
++	               mount_id, flags);
++}
++
++static int open_by_handle_at(int mount_fd, struct file_handle *handle, int flags)
++{
++	return syscall(__NR_open_by_handle_at, mount_fd, handle, flags);
++}
++#endif
++
+ /* return mount path of first occurrence of given fstype */
+ static char *find_fs_mount(const char *fs_to_find)
+ {
+--
+2.31.1
+

+ 1 - 1
package/iproute2/iproute2.hash

@@ -1,3 +1,3 @@
 # From https://kernel.org/pub/linux/utils/net/iproute2/sha256sums.asc
-sha256  725dc7ba94aae54c6f8d4223ca055d9fb4fe89d6994b1c03bfb4411c4dd10f21  iproute2-5.7.0.tar.xz
+sha256  9d268db98a36ee2a0e3ff3b92b2efff66fc1138a51e409bdef6ab3cfe15f326f  iproute2-5.12.0.tar.xz
 sha256  e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4  COPYING

+ 1 - 1
package/iproute2/iproute2.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-IPROUTE2_VERSION = 5.7.0
+IPROUTE2_VERSION = 5.12.0
 IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz
 IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2
 IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \

+ 1 - 1
package/kodi-inputstream-adaptive/kodi-inputstream-adaptive.hash

@@ -1,3 +1,3 @@
 # Locally computed
-sha256  f1756932e8cc602ce66c5db3bc1d44a442c01197c193561ca9248a405bd8bd86  kodi-inputstream-adaptive-2.6.14-Matrix.tar.gz
+sha256  49b9971973a8df16faa2a7a46d81156484a27c98930eae56dad12d466910db13  kodi-inputstream-adaptive-2.6.16-Matrix.tar.gz
 sha256  89931c1fb1f3716694175763cf3221cfcd63d6935031cf6b4512d17ffe5d9860  LICENSE.GPL

+ 1 - 1
package/kodi-inputstream-adaptive/kodi-inputstream-adaptive.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-KODI_INPUTSTREAM_ADAPTIVE_VERSION = 2.6.14-Matrix
+KODI_INPUTSTREAM_ADAPTIVE_VERSION = 2.6.16-Matrix
 KODI_INPUTSTREAM_ADAPTIVE_SITE = $(call github,xbmc,inputstream.adaptive,$(KODI_INPUTSTREAM_ADAPTIVE_VERSION))
 KODI_INPUTSTREAM_ADAPTIVE_LICENSE = GPL-2.0+
 KODI_INPUTSTREAM_ADAPTIVE_LICENSE_FILES = LICENSE.GPL

+ 1 - 1
package/kodi-peripheral-joystick/kodi-peripheral-joystick.hash

@@ -1,3 +1,3 @@
 # Locally computed
-sha256  4dc63c6c5bdad25881eeba800765d97c53b2583addf28e71bbcd67775452ecdb  kodi-peripheral-joystick-1.7.1-Matrix.tar.gz
+sha256  405acfbcc510f96a48244168362213955357f95cd8b1b92fe1ce483213045bfb  kodi-peripheral-joystick-1.7.2-Matrix.tar.gz
 sha256  310782e1abd43c4de6217c513e328bddf999d39302d67c6e05b10a59959827af  LICENSE.md

+ 1 - 1
package/kodi-peripheral-joystick/kodi-peripheral-joystick.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-KODI_PERIPHERAL_JOYSTICK_VERSION = 1.7.1-Matrix
+KODI_PERIPHERAL_JOYSTICK_VERSION = 1.7.2-Matrix
 KODI_PERIPHERAL_JOYSTICK_SITE = $(call github,xbmc,peripheral.joystick,$(KODI_PERIPHERAL_JOYSTICK_VERSION))
 KODI_PERIPHERAL_JOYSTICK_LICENSE = GPL-2.0+
 KODI_PERIPHERAL_JOYSTICK_LICENSE_FILES = LICENSE.md

+ 1 - 1
package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.hash

@@ -1,3 +1,3 @@
 # Locally computed
-sha256  1310806ac4fd8c6e72020042e62bde8c9175e65015c4fddb82312cf32c53bf63  kodi-pvr-iptvsimple-7.6.4-Matrix.tar.gz
+sha256  2b46ab509e26fb4a60759e78f9f13808f5bb2c67a03a62c58ebcadb31c26e6e1  kodi-pvr-iptvsimple-7.6.5-Matrix.tar.gz
 sha256  310782e1abd43c4de6217c513e328bddf999d39302d67c6e05b10a59959827af  LICENSE.md

+ 1 - 1
package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.mk

@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-KODI_PVR_IPTVSIMPLE_VERSION = 7.6.4-Matrix
+KODI_PVR_IPTVSIMPLE_VERSION = 7.6.5-Matrix
 KODI_PVR_IPTVSIMPLE_SITE = $(call github,kodi-pvr,pvr.iptvsimple,$(KODI_PVR_IPTVSIMPLE_VERSION))
 KODI_PVR_IPTVSIMPLE_LICENSE = GPL-2.0+
 KODI_PVR_IPTVSIMPLE_LICENSE_FILES = LICENSE.md

+ 0 - 29
package/kodi-pvr-mediaportal-tvserver/0001-Revert-Removed-no-more-supported-C-17-declaration-ke.patch

@@ -1,29 +0,0 @@
-From 8696d5408d6ec14b1ff4395ed538b7a48528fe68 Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Thu, 8 Oct 2020 16:12:18 +0100
-Subject: [PATCH] Revert "Removed no more supported (C++17) declaration keyword
- (register)"
-
-This reverts commit a8edcafe6cc7a424615319995f4f7bdfab3856b1.
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/lib/tsreader/DvbUtil.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/lib/tsreader/DvbUtil.cpp b/src/lib/tsreader/DvbUtil.cpp
-index c973062..8c4798a 100644
---- a/src/lib/tsreader/DvbUtil.cpp
-+++ b/src/lib/tsreader/DvbUtil.cpp
-@@ -77,7 +77,7 @@ namespace MPTV
-     //*******************************************************************
-     uint32_t crc32(char *data, int len)
-     {
--        int i;
-+        register int i;
-         uint32_t crc = 0xffffffff;
- 
-         for (i = 0; i < len; i++)
--- 
-2.29.2
-

+ 0 - 157
package/kodi-pvr-mediaportal-tvserver/0002-Remove-p8-os-includes.patch

@@ -1,157 +0,0 @@
-From be13de0679d1707eadaf5349ab904a07fa83bb13 Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Wed, 7 Oct 2020 17:34:56 +0100
-Subject: [PATCH] Remove p8 os includes
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/Socket.cpp                  |  1 -
- src/lib/tsreader/FileReader.h   |  1 -
- src/lib/tsreader/MemorySink.cpp |  1 -
- src/lib/tsreader/Section.cpp    |  2 ++
- src/os-dependent.h              | 40 ++++++++++++++++++---------------
- src/timers.cpp                  |  1 -
- src/windows/FileUtils.cpp       |  6 ++++-
- 7 files changed, 29 insertions(+), 23 deletions(-)
-
-diff --git a/src/Socket.cpp b/src/Socket.cpp
-index 12f7e80..b7dd250 100644
---- a/src/Socket.cpp
-+++ b/src/Socket.cpp
-@@ -7,7 +7,6 @@
- 
- #include "utils.h"
- #include <string>
--#include "p8-platform/os.h"
- #include "Socket.h"
- 
- #include <kodi/General.h>
-diff --git a/src/lib/tsreader/FileReader.h b/src/lib/tsreader/FileReader.h
-index 986bbc4..edb01f2 100644
---- a/src/lib/tsreader/FileReader.h
-+++ b/src/lib/tsreader/FileReader.h
-@@ -33,7 +33,6 @@
-  *  http://forums.dvbowners.com/
-  */
- 
--#include "p8-platform/os.h" // for __stat
- #include <string>
- #include <kodi/Filesystem.h>
- 
-diff --git a/src/lib/tsreader/MemorySink.cpp b/src/lib/tsreader/MemorySink.cpp
-index 2d60696..dafef56 100644
---- a/src/lib/tsreader/MemorySink.cpp
-+++ b/src/lib/tsreader/MemorySink.cpp
-@@ -29,7 +29,6 @@
- 
- #if defined LIVE555
- 
--#include "p8-platform/os.h"
- #include "MemorySink.h"
- #include "GroupsockHelper.hh"
- #include <kodi/General.h> //for kodi::Log
-diff --git a/src/lib/tsreader/Section.cpp b/src/lib/tsreader/Section.cpp
-index 258c6a9..aac6b53 100644
---- a/src/lib/tsreader/Section.cpp
-+++ b/src/lib/tsreader/Section.cpp
-@@ -22,6 +22,8 @@
- #include "os-dependent.h"
- #include "Section.h"
- 
-+#include <cstring>
-+
- namespace MPTV
- {
-     CSection::CSection(void)
-diff --git a/src/os-dependent.h b/src/os-dependent.h
-index 1f368ea..cdc6980 100644
---- a/src/os-dependent.h
-+++ b/src/os-dependent.h
-@@ -7,29 +7,33 @@
- 
- #pragma once
- 
--#include "p8-platform/os.h"
-+#include <cstdint>
- 
--#ifdef TARGET_LINUX
--// Retrieve the number of milliseconds that have elapsed since the system was started
--#include <time.h>
--inline unsigned long long GetTickCount64(void)
--{
--  struct timespec ts;
--  if(clock_gettime(CLOCK_MONOTONIC, &ts) != 0)
--  {
--    return 0;
--  }
--  return (unsigned long long)( (ts.tv_sec * 1000) + (ts.tv_nsec / 1000000) );
--};
--#elif defined(TARGET_DARWIN)
--#include <time.h>
-+#if (defined(_WIN32) || defined(_WIN64))
-+
-+#ifndef _SSIZE_T_DEFINED
-+#ifdef  _WIN64
-+typedef __int64    ssize_t;
-+#else
-+typedef _W64 int   ssize_t;
-+#endif
-+#define _SSIZE_T_DEFINED
-+#endif
-+
-+#else
-+
-+#if (defined(TARGET_LINUX) || defined(TARGET_DARWIN))
-+#include <sys/types.h>
-+#include <chrono>
-+#include <cstring>
- inline unsigned long long GetTickCount64(void)
- {
--  struct timeval tv;
--  gettimeofday(&tv, NULL);
--  return (unsigned long long)( (tv.tv_sec * 1000) + (tv.tv_usec / 1000) );
-+  auto now = std::chrono::steady_clock::now();
-+  return std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count();
- };
- #endif /* TARGET_LINUX || TARGET_DARWIN */
- 
-+#endif
-+
- // Additional typedefs
- typedef uint8_t byte;
-diff --git a/src/timers.cpp b/src/timers.cpp
-index a8760e4..a60b4c2 100644
---- a/src/timers.cpp
-+++ b/src/timers.cpp
-@@ -11,7 +11,6 @@
- 
- using namespace std;
- 
--#include "p8-platform/os.h" //needed for snprintf
- #include "timers.h"
- #include "settings.h"
- #include "utils.h"
-diff --git a/src/windows/FileUtils.cpp b/src/windows/FileUtils.cpp
-index 0d26bc6..0c8a03e 100644
---- a/src/windows/FileUtils.cpp
-+++ b/src/windows/FileUtils.cpp
-@@ -6,7 +6,6 @@
-  */
- 
- #include "../FileUtils.h"
--#include "p8-platform/os.h"
- #include "p8-platform/windows/CharsetConverter.h"
- #include <string>
- #include "../utils.h"
-@@ -14,6 +13,11 @@
- #include <Shlobj.h>
- #endif
- 
-+#ifdef TARGET_WINDOWS
-+#include <windows.h>
-+#include <fileapi.h>
-+#endif
-+
- namespace OS
- {
-   bool CFile::Exists(const std::string& strFileName, long* errCode)

+ 0 - 124
package/kodi-pvr-mediaportal-tvserver/0003-Use-kodi-StringUtils.patch

@@ -1,124 +0,0 @@
-From 621a98436875f8b4ceea18218a23025e0b59aeb3 Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Wed, 7 Oct 2020 17:46:14 +0100
-Subject: [PATCH] Use kodi StringUtils
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/GUIDialogRecordSettings.cpp |  6 +++---
- src/lib/tsreader/TSReader.cpp   | 10 +++++-----
- src/pvrclient-mediaportal.cpp   |  3 ++-
- src/utils.cpp                   |  3 ++-
- 4 files changed, 12 insertions(+), 10 deletions(-)
-
-diff --git a/src/GUIDialogRecordSettings.cpp b/src/GUIDialogRecordSettings.cpp
-index cf36d82..8e942d2 100644
---- a/src/GUIDialogRecordSettings.cpp
-+++ b/src/GUIDialogRecordSettings.cpp
-@@ -9,9 +9,9 @@
- #include "timers.h"
- #include "utils.h"
- #include "DateTime.h"
--#include "p8-platform/util/StringUtils.h"
- 
- #include <kodi/General.h>
-+#include <kodi/tools/StringUtils.h>
- 
- /* Dialog item identifiers */
- #define BUTTON_OK                       1
-@@ -106,7 +106,7 @@ bool CGUIDialogRecordSettings::OnInit()
- 
-   // Populate PreRecord spin control
-   std::string marginStart;
--  marginStart = StringUtils::Format("%d (%s)", m_timerinfo.GetMarginStart(), kodi::GetLocalizedString(30136).c_str());
-+  marginStart = kodi::tools::StringUtils::Format("%d (%s)", m_timerinfo.GetMarginStart(), kodi::GetLocalizedString(30136).c_str());
-   m_spinPreRecord->SetType(kodi::gui::controls::ADDON_SPIN_CONTROL_TYPE_TEXT);
-   m_spinPreRecord->AddLabel(kodi::GetLocalizedString(30135), -1);
-   m_spinPreRecord->AddLabel(marginStart, m_timerinfo.GetMarginStart()); //value from XBMC
-@@ -120,7 +120,7 @@ bool CGUIDialogRecordSettings::OnInit()
- 
-   // Populate PostRecord spin control
-   std::string marginEnd;
--  marginEnd = StringUtils::Format("%d (%s)", m_timerinfo.GetMarginEnd(), kodi::GetLocalizedString(30136).c_str());
-+  marginEnd = kodi::tools::StringUtils::Format("%d (%s)", m_timerinfo.GetMarginEnd(), kodi::GetLocalizedString(30136).c_str());
-   m_spinPostRecord->SetType(kodi::gui::controls::ADDON_SPIN_CONTROL_TYPE_TEXT);
-   m_spinPostRecord->AddLabel(kodi::GetLocalizedString(30135), -1);
-   m_spinPostRecord->AddLabel(marginEnd, m_timerinfo.GetMarginEnd()); //value from XBMC
-diff --git a/src/lib/tsreader/TSReader.cpp b/src/lib/tsreader/TSReader.cpp
-index 1129c8e..3f9725b 100644
---- a/src/lib/tsreader/TSReader.cpp
-+++ b/src/lib/tsreader/TSReader.cpp
-@@ -34,7 +34,7 @@
- #include "utils.h"
- #include "TSDebug.h"
- #include "p8-platform/util/timeutils.h"
--#include "p8-platform/util/StringUtils.h"
-+#include <kodi/tools/StringUtils.h>
- #ifdef LIVE555
- #include "MemoryReader.h"
- #include "MepoRTSPClient.h"
-@@ -104,7 +104,7 @@ namespace MPTV
-             {
-                 if (!tscard.TimeshiftFolderUNC.empty())
-                 {
--                    StringUtils::Replace(sFileName, tscard.TimeshiftFolder.c_str(), tscard.TimeshiftFolderUNC.c_str());
-+                    kodi::tools::StringUtils::Replace(sFileName, tscard.TimeshiftFolder.c_str(), tscard.TimeshiftFolderUNC.c_str());
-                     bFound = true;
-                 }
-                 else
-@@ -129,7 +129,7 @@ namespace MPTV
-                         if (!it->RecordingFolderUNC.empty())
-                         {
-                             // Remove the original base path and replace it with the given path
--                            StringUtils::Replace(sFileName, it->RecordingFolder.c_str(), it->RecordingFolderUNC.c_str());
-+                            kodi::tools::StringUtils::Replace(sFileName, it->RecordingFolder.c_str(), it->RecordingFolderUNC.c_str());
-                             bFound = true;
-                             break;
-                         }
-@@ -412,8 +412,8 @@ namespace MPTV
-         if (tmp.find("smb://") != string::npos)
-         {
-           // Convert XBMC smb share name back to a real windows network share...
--          StringUtils::Replace(tmp, "smb://", "\\\\");
--          StringUtils::Replace(tmp, "/", "\\");
-+          kodi::tools::StringUtils::Replace(tmp, "smb://", "\\\\");
-+          kodi::tools::StringUtils::Replace(tmp, "/", "\\");
-         }
- #else
-         //TODO: do something useful...
-diff --git a/src/pvrclient-mediaportal.cpp b/src/pvrclient-mediaportal.cpp
-index 93ca1bc..fdb31e7 100644
---- a/src/pvrclient-mediaportal.cpp
-+++ b/src/pvrclient-mediaportal.cpp
-@@ -11,7 +11,7 @@
- #include <clocale>
- 
- #include "p8-platform/util/timeutils.h"
--#include "p8-platform/util/StringUtils.h"
-+#include <kodi/tools/StringUtils.h>
- 
- #include "timers.h"
- #include "channels.h"
-@@ -29,6 +29,7 @@
- #include <kodi/General.h>
- #include <kodi/Filesystem.h>
- 
-+using namespace kodi::tools;
- using namespace std;
- using namespace MPTV;
- 
-diff --git a/src/utils.cpp b/src/utils.cpp
-index 63c823a..9b8def8 100644
---- a/src/utils.cpp
-+++ b/src/utils.cpp
-@@ -13,8 +13,9 @@
- #include "settings.h"
- #include <string>
- #include <stdio.h>
--#include "p8-platform/util/StringUtils.h"
-+#include <kodi/tools/StringUtils.h>
- 
-+using namespace kodi::tools;
- using namespace std;
- 
- void Tokenize(const string& str, vector<string>& tokens, const string& delimiters = " ")

+ 0 - 289
package/kodi-pvr-mediaportal-tvserver/0004-Remove-SAFE_DELETE.patch

@@ -1,289 +0,0 @@
-From 00d0d90fdac9257ed02e24677ba4f008f2486c94 Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Wed, 7 Oct 2020 18:00:57 +0100
-Subject: [PATCH] Remove SAFE_DELETE
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/lib/tsreader/FileReader.cpp      |  9 ++++++++-
- src/lib/tsreader/MemoryBuffer.cpp    | 22 +++++++++++++---------
- src/lib/tsreader/MultiFileReader.cpp | 11 ++++++++++-
- src/lib/tsreader/TSReader.cpp        | 25 +++++++++++++++++--------
- src/pvrclient-mediaportal.cpp        | 27 ++++++++++++++++++---------
- src/utils.h                          |  2 --
- 6 files changed, 66 insertions(+), 30 deletions(-)
-
-diff --git a/src/lib/tsreader/FileReader.cpp b/src/lib/tsreader/FileReader.cpp
-index ac8725c..3df22f2 100644
---- a/src/lib/tsreader/FileReader.cpp
-+++ b/src/lib/tsreader/FileReader.cpp
-@@ -38,7 +38,6 @@
- #include "p8-platform/threads/threads.h"
- #include <algorithm> //std::min, std::max
- #include "p8-platform/util/timeutils.h" // for usleep
--#include "p8-platform/util/util.h"
- #include "utils.h"
- #include <errno.h>
- 
-@@ -58,6 +57,14 @@
- /* calcuate bitrate for file while reading */
- #define READ_BITRATE   0x10
- 
-+template<typename T> void SafeDelete(T*& p)
-+{
-+  if (p)
-+  {
-+    delete p;
-+    p = nullptr;
-+  }
-+}
- namespace MPTV
- {
-     FileReader::FileReader() :
-diff --git a/src/lib/tsreader/MemoryBuffer.cpp b/src/lib/tsreader/MemoryBuffer.cpp
-index 6d411d7..609b575 100644
---- a/src/lib/tsreader/MemoryBuffer.cpp
-+++ b/src/lib/tsreader/MemoryBuffer.cpp
-@@ -31,7 +31,6 @@
- 
- #include "p8-platform/util/timeutils.h"
- #include "p8-platform/threads/mutex.h"
--#include "p8-platform/util/util.h"
- #include "MemoryBuffer.h"
- #include <kodi/General.h> //for kodi::Log
- #include "TSDebug.h"
-@@ -59,11 +58,14 @@ void CMemoryBuffer::Clear()
-   P8PLATFORM::CLockObject BufferLock(m_BufferLock);
-   std::vector<BufferItem *>::iterator it = m_Array.begin();
- 
--  for ( ; it != m_Array.end(); ++it )
-+  for (auto& item : m_Array)
-   {
--    BufferItem *item = *it;
--    SAFE_DELETE_ARRAY(item->data);
--    SAFE_DELETE(item);
-+    if (item)
-+    {
-+      if (item->data)
-+        delete[] item->data;
-+      delete item;
-+    }
-   }
- 
-   m_Array.clear();
-@@ -150,8 +152,9 @@ size_t CMemoryBuffer::ReadFromBuffer(unsigned char *pbData, size_t lDataLength)
-     if (item->nOffset >= item->nDataLength)
-     {
-       m_Array.erase(m_Array.begin());
--      SAFE_DELETE_ARRAY(item->data);
--      SAFE_DELETE(item);
-+      if (item->data)
-+        delete[] item->data;
-+      delete item;
-     }
-   }
-   return bytesWritten;
-@@ -182,8 +185,9 @@ long CMemoryBuffer::PutBuffer(unsigned char *pbData, size_t lDataLength)
- 
-       m_BytesInBuffer -= copyLength;
-       m_Array.erase(m_Array.begin());
--      SAFE_DELETE_ARRAY(item2->data);
--      SAFE_DELETE(item2);
-+      if (item2->data)
-+        delete[] item2->data;
-+      delete item2;
-     }
-     if (m_BytesInBuffer > 0)
-     {
-diff --git a/src/lib/tsreader/MultiFileReader.cpp b/src/lib/tsreader/MultiFileReader.cpp
-index b8005b3..3828e06 100644
---- a/src/lib/tsreader/MultiFileReader.cpp
-+++ b/src/lib/tsreader/MultiFileReader.cpp
-@@ -48,6 +48,15 @@ using namespace P8PLATFORM;
- //Maximum time in msec to wait for the buffer file to become available - Needed for DVB radio (this sometimes takes some time)
- #define MAX_BUFFER_TIMEOUT 1500
- 
-+template<typename T> void SafeDelete(T*& p)
-+{
-+  if (p)
-+  {
-+    delete p;
-+    p = nullptr;
-+  }
-+}
-+
- namespace MPTV
- {
-     MultiFileReader::MultiFileReader() :
-@@ -484,7 +493,7 @@ namespace MPTV
- 
-                 TSDEBUG(ADDON_LOG_DEBUG, "MultiFileReader: Removing file %s\n", file->filename.c_str());
- 
--                SAFE_DELETE(file);
-+                SafeDelete(file);
-                 m_tsFiles.erase(m_tsFiles.begin());
- 
-                 filesToRemove--;
-diff --git a/src/lib/tsreader/TSReader.cpp b/src/lib/tsreader/TSReader.cpp
-index 3f9725b..4a72f4f 100644
---- a/src/lib/tsreader/TSReader.cpp
-+++ b/src/lib/tsreader/TSReader.cpp
-@@ -44,6 +44,15 @@
- 
- using namespace std;
- 
-+template<typename T> void SafeDelete(T*& p)
-+{
-+  if (p)
-+  {
-+    delete p;
-+    p = nullptr;
-+  }
-+}
-+
- namespace MPTV
- {
-     CTsReader::CTsReader() : m_demultiplexer(*this),
-@@ -69,10 +78,10 @@ namespace MPTV
- 
-     CTsReader::~CTsReader(void)
-     {
--        SAFE_DELETE(m_fileReader);
-+        SafeDelete(m_fileReader);
- #ifdef LIVE555
--        SAFE_DELETE(m_buffer);
--        SAFE_DELETE(m_rtspClient);
-+        SafeDelete(m_buffer);
-+        SafeDelete(m_rtspClient);
- #endif
-     }
- 
-@@ -225,8 +234,8 @@ namespace MPTV
- 
-             if ( !m_rtspClient->OpenStream(m_fileName.c_str()) )
-             {
--                SAFE_DELETE(m_rtspClient);
--                SAFE_DELETE(m_buffer);
-+                SafeDelete(m_rtspClient);
-+                SafeDelete(m_buffer);
-                 return E_FAIL;
-             }
- 
-@@ -318,8 +327,8 @@ namespace MPTV
- #ifdef LIVE555
-                 kodi::Log(ADDON_LOG_INFO, "TsReader: closing RTSP client");
-                 m_rtspClient->Stop();
--                SAFE_DELETE(m_rtspClient);
--                SAFE_DELETE(m_buffer);
-+                SafeDelete(m_rtspClient);
-+                SafeDelete(m_buffer);
- #endif
-             }
-             else
-@@ -327,7 +336,7 @@ namespace MPTV
-                 kodi::Log(ADDON_LOG_INFO, "TsReader: closing file");
-                 m_fileReader->CloseFile();
-             }
--            SAFE_DELETE(m_fileReader);
-+            SafeDelete(m_fileReader);
-             m_State = State_Stopped;
-         }
-     }
-diff --git a/src/pvrclient-mediaportal.cpp b/src/pvrclient-mediaportal.cpp
-index fdb31e7..5479950 100644
---- a/src/pvrclient-mediaportal.cpp
-+++ b/src/pvrclient-mediaportal.cpp
-@@ -42,6 +42,15 @@ int g_iTVServerKodiBuild = 0;
- #define TVSERVERKODI_RECOMMENDED_VERSION_STRING "1.2.3.122 till 1.20.0.140"
- #define TVSERVERKODI_RECOMMENDED_VERSION_BUILD  140
- 
-+template<typename T> void SafeDelete(T*& p)
-+{
-+  if (p)
-+  {
-+    delete p;
-+    p = nullptr;
-+  }
-+}
-+
- /************************************************************/
- /** Class interface */
- 
-@@ -75,10 +84,10 @@ cPVRClientMediaPortal::~cPVRClientMediaPortal()
-   kodi::Log(ADDON_LOG_DEBUG, "->~cPVRClientMediaPortal()");
-   Disconnect();
- 
--  SAFE_DELETE(Timer::lifetimeValues);
--  SAFE_DELETE(m_tcpclient);
--  SAFE_DELETE(m_genretable);
--  SAFE_DELETE(m_lastSelectedRecording);
-+  SafeDelete(Timer::lifetimeValues);
-+  SafeDelete(m_tcpclient);
-+  SafeDelete(m_genretable);
-+  SafeDelete(m_lastSelectedRecording);
- }
- 
- string cPVRClientMediaPortal::SendCommand(const char* command)
-@@ -321,7 +330,7 @@ void cPVRClientMediaPortal::Disconnect()
-       if ((CSettings::Get().GetStreamingMethod()==TSReader) && (m_tsreader != NULL))
-       {
-         m_tsreader->Close();
--        SAFE_DELETE(m_tsreader);
-+        SafeDelete(m_tsreader);
-       }
-       SendCommand("StopTimeshift:\n");
-     }
-@@ -1748,7 +1757,7 @@ bool cPVRClientMediaPortal::OpenLiveStream(const kodi::addon::PVRChannel& channe
-     m_iCurrentChannel = -1;
-     if (m_tsreader != nullptr)
-     {
--      SAFE_DELETE(m_tsreader);
-+      SafeDelete(m_tsreader);
-     }
-     return false;
-   }
-@@ -1959,7 +1968,7 @@ void cPVRClientMediaPortal::CloseLiveStream(void)
-     if (CSettings::Get().GetStreamingMethod() == TSReader && m_tsreader)
-     {
-       m_tsreader->Close();
--      SAFE_DELETE(m_tsreader);
-+      SafeDelete(m_tsreader);
-     }
-     result = SendCommand("StopTimeshift:\n");
-     kodi::Log(ADDON_LOG_INFO, "CloseLiveStream: %s", result.c_str());
-@@ -2141,7 +2150,7 @@ void cPVRClientMediaPortal::CloseRecordedStream(void)
-   {
-     kodi::Log(ADDON_LOG_INFO, "CloseRecordedStream: Stop TSReader...");
-     m_tsreader->Close();
--    SAFE_DELETE(m_tsreader);
-+    SafeDelete(m_tsreader);
-   }
-   else
-   {
-@@ -2409,7 +2418,7 @@ cRecording* cPVRClientMediaPortal::GetRecordingInfo(const kodi::addon::PVRRecord
-     {
-       return m_lastSelectedRecording;
-     }
--    SAFE_DELETE(m_lastSelectedRecording);
-+    SafeDelete(m_lastSelectedRecording);
-   }
- 
-   if (!IsUp())
-diff --git a/src/utils.h b/src/utils.h
-index 823b46e..d03569a 100644
---- a/src/utils.h
-+++ b/src/utils.h
-@@ -11,13 +11,11 @@
- #include <vector>
- #include <ctime>
- #include "uri.h"
--#include "p8-platform/util/util.h"
- 
- #ifdef TARGET_WINDOWS
- #include "windows/WindowsUtils.h"
- #endif
- 
--
- /**
-  * String tokenize
-  * Split string using the given delimiter into a vector of substrings

+ 0 - 308
package/kodi-pvr-mediaportal-tvserver/0005-Use-thread-sleep_for-instead-of-p8-time-utils.patch

@@ -1,308 +0,0 @@
-From 4b4a16157870d5816339700616f1efdb60fb59e3 Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Wed, 7 Oct 2020 18:12:10 +0100
-Subject: [PATCH] Use thread sleep_for instead of p8 time utils
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/lib/tsreader/DeMultiplexer.cpp   |  6 ++++--
- src/lib/tsreader/FileReader.cpp      |  5 +++--
- src/lib/tsreader/MemoryBuffer.cpp    |  5 +++--
- src/lib/tsreader/MepoRTSPClient.cpp  |  5 +++--
- src/lib/tsreader/MultiFileReader.cpp |  9 +++++----
- src/lib/tsreader/TSReader.cpp        |  5 +++--
- src/pvrclient-mediaportal.cpp        | 23 +++++++++++++----------
- 7 files changed, 34 insertions(+), 24 deletions(-)
-
-diff --git a/src/lib/tsreader/DeMultiplexer.cpp b/src/lib/tsreader/DeMultiplexer.cpp
-index 63bf20e..436e452 100644
---- a/src/lib/tsreader/DeMultiplexer.cpp
-+++ b/src/lib/tsreader/DeMultiplexer.cpp
-@@ -37,6 +37,8 @@
- #include <kodi/General.h>  //for kodi::Log
- #include "TSReader.h"
- 
-+#include <thread>
-+
- #define MAX_BUF_SIZE 8000
- #define BUFFER_LENGTH 0x1000
- #define READ_SIZE (1316*30)
-@@ -83,7 +85,7 @@ namespace MPTV
-         {
-             size_t BytesRead = ReadFromFile();
-             if (0 == BytesRead)
--                usleep(10000);
-+                std::this_thread::sleep_for(std::chrono::milliseconds(10));
-         }
-         m_bStarting = false;
-     }
-@@ -248,7 +250,7 @@ namespace MPTV
-         {
-             size_t BytesRead = ReadFromFile();
-             if (0 == BytesRead)
--                usleep(10000);
-+                std::this_thread::sleep_for(std::chrono::milliseconds(10));
-             dwBytesProcessed += BytesRead;
-         }
- 
-diff --git a/src/lib/tsreader/FileReader.cpp b/src/lib/tsreader/FileReader.cpp
-index 3df22f2..73b23af 100644
---- a/src/lib/tsreader/FileReader.cpp
-+++ b/src/lib/tsreader/FileReader.cpp
-@@ -37,10 +37,10 @@
- #include "TSDebug.h"
- #include "p8-platform/threads/threads.h"
- #include <algorithm> //std::min, std::max
--#include "p8-platform/util/timeutils.h" // for usleep
- #include "utils.h"
- #include <errno.h>
- 
-+#include <thread>
- 
- /* indicate that caller can handle truncated reads, where function returns before entire buffer has been filled */
- #define READ_TRUNCATED 0x01
-@@ -145,7 +145,8 @@ namespace MPTV
-                     }
-                 }
-             }
--            usleep(20000);
-+            std::this_thread::sleep_for(std::chrono::milliseconds(20));
-+
-         } while (--Tmo);
- 
-         if (Tmo)
-diff --git a/src/lib/tsreader/MemoryBuffer.cpp b/src/lib/tsreader/MemoryBuffer.cpp
-index 609b575..0e736f2 100644
---- a/src/lib/tsreader/MemoryBuffer.cpp
-+++ b/src/lib/tsreader/MemoryBuffer.cpp
-@@ -29,12 +29,13 @@
- 
- #ifdef LIVE555
- 
--#include "p8-platform/util/timeutils.h"
- #include "p8-platform/threads/mutex.h"
- #include "MemoryBuffer.h"
- #include <kodi/General.h> //for kodi::Log
- #include "TSDebug.h"
- 
-+#include <thread>
-+
- #define MAX_MEMORY_BUFFER_SIZE (1024L*1024L*12L)
- 
- CMemoryBuffer::CMemoryBuffer(void)
-@@ -197,7 +198,7 @@ long CMemoryBuffer::PutBuffer(unsigned char *pbData, size_t lDataLength)
- 
-   if (sleep)
-   {
--    usleep(10000);
-+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
-   }
-   return S_OK;
- }
-diff --git a/src/lib/tsreader/MepoRTSPClient.cpp b/src/lib/tsreader/MepoRTSPClient.cpp
-index 4971986..ccd6761 100644
---- a/src/lib/tsreader/MepoRTSPClient.cpp
-+++ b/src/lib/tsreader/MepoRTSPClient.cpp
-@@ -18,13 +18,14 @@
- 
- #if defined LIVE555
- 
--#include "p8-platform/util/timeutils.h"
- #include "MepoRTSPClient.h"
- #include "MemorySink.h"
- #include <kodi/General.h> //for kodi::Log
- #include "utils.h"
- #include "os-dependent.h"
- 
-+#include <thread>
-+
- CRTSPClient::CRTSPClient()
- {
-   kodi::Log(ADDON_LOG_DEBUG, "CRTSPClient::CRTSPClient()");
-@@ -531,7 +532,7 @@ void CRTSPClient::FillBuffer(unsigned long byteCount)
- 
-   while ( IsRunning() && m_buffer->Size() < byteCount)
-   {
--    usleep(5000);
-+    std::this_thread::sleep_for(std::chrono::milliseconds(5));
-     if (GetTickCount64() - tickCount > 3000)
-       break;
-   }
-diff --git a/src/lib/tsreader/MultiFileReader.cpp b/src/lib/tsreader/MultiFileReader.cpp
-index 3828e06..21fd7b2 100644
---- a/src/lib/tsreader/MultiFileReader.cpp
-+++ b/src/lib/tsreader/MultiFileReader.cpp
-@@ -39,10 +39,11 @@
- #include <string>
- #include "utils.h"
- #include <algorithm>
--#include "p8-platform/util/timeutils.h"
- #include "p8-platform/threads/threads.h"
- #include <inttypes.h>
- 
-+#include <thread>
-+
- using namespace P8PLATFORM;
- 
- //Maximum time in msec to wait for the buffer file to become available - Needed for DVB radio (this sometimes takes some time)
-@@ -112,7 +113,7 @@ namespace MPTV
-             retryCount++;
-             kodi::Log(ADDON_LOG_DEBUG, "MultiFileReader: buffer file has zero length, closing, waiting 100 ms and re-opening. Attempt: %d.", retryCount);
-             m_TSBufferFile.CloseFile();
--            usleep(100000);
-+            std::this_thread::sleep_for(std::chrono::milliseconds(100));
-             hResult = m_TSBufferFile.OpenFile();
-             kodi::Log(ADDON_LOG_DEBUG, "MultiFileReader: buffer file opened return code %d.", hResult);
-         }
-@@ -124,7 +125,7 @@ namespace MPTV
- 
-             do
-             {
--                usleep(100000);
-+                std::this_thread::sleep_for(std::chrono::milliseconds(100));
-                 if (timeout.TimeLeft() == 0)
-                 {
-                     kodi::Log(ADDON_LOG_ERROR, "MultiFileReader: timed out while waiting for buffer file to become available");
-@@ -457,7 +458,7 @@ namespace MPTV
-                 // try to clear local / remote SMB file cache. This should happen when we close the filehandle
-                 m_TSBufferFile.CloseFile();
-                 m_TSBufferFile.OpenFile();
--                usleep(5000);
-+                std::this_thread::sleep_for(std::chrono::milliseconds(5));
-             }
- 
-             if (Error)
-diff --git a/src/lib/tsreader/TSReader.cpp b/src/lib/tsreader/TSReader.cpp
-index 4a72f4f..40a4faf 100644
---- a/src/lib/tsreader/TSReader.cpp
-+++ b/src/lib/tsreader/TSReader.cpp
-@@ -33,7 +33,6 @@
- #include "MultiFileReader.h"
- #include "utils.h"
- #include "TSDebug.h"
--#include "p8-platform/util/timeutils.h"
- #include <kodi/tools/StringUtils.h>
- #ifdef LIVE555
- #include "MemoryReader.h"
-@@ -42,6 +41,8 @@
- #endif
- #include "FileUtils.h"
- 
-+#include <thread>
-+
- using namespace std;
- 
- template<typename T> void SafeDelete(T*& p)
-@@ -396,7 +397,7 @@ namespace MPTV
-                 fileReader->OnChannelChange();
- 
-                 kodi::Log(ADDON_LOG_DEBUG, "%s:: move from %I64d to %I64d tsbufpos  %I64d", __FUNCTION__, pos_before, pos_after, timeShiftBufferPos);
--                usleep(100000);
-+                std::this_thread::sleep_for(std::chrono::milliseconds(100));
- 
-                 // Set the stream start times to this new channel
-                 time(&m_startTime);
-diff --git a/src/pvrclient-mediaportal.cpp b/src/pvrclient-mediaportal.cpp
-index 5479950..851b940 100644
---- a/src/pvrclient-mediaportal.cpp
-+++ b/src/pvrclient-mediaportal.cpp
-@@ -10,7 +10,6 @@
- #include <stdlib.h>
- #include <clocale>
- 
--#include "p8-platform/util/timeutils.h"
- #include <kodi/tools/StringUtils.h>
- 
- #include "timers.h"
-@@ -29,6 +28,8 @@
- #include <kodi/General.h>
- #include <kodi/Filesystem.h>
- 
-+#include <thread>
-+
- using namespace kodi::tools;
- using namespace std;
- using namespace MPTV;
-@@ -389,7 +390,7 @@ void* cPVRClientMediaPortal::Process(void)
-     if (keepWaiting)
-     {
-       // Wait for 1 minute before re-trying
--      usleep(60000000);
-+      std::this_thread::sleep_for(std::chrono::milliseconds(60000));
-     }
-   }
-   SetConnectionState(state);
-@@ -1571,7 +1572,8 @@ PVR_ERROR cPVRClientMediaPortal::AddTimer(const kodi::addon::PVRTimer& timerinfo
-   if (timerinfo.GetStartTime() <= 0)
-   {
-     // Refresh the recordings list to see the newly created recording
--    usleep(100000);
-+    std::this_thread::sleep_for(std::chrono::milliseconds(100));
-+
-     kodi::addon::CInstancePVRClient::TriggerRecordingUpdate();
-   }
- 
-@@ -1785,7 +1787,8 @@ bool cPVRClientMediaPortal::OpenLiveStream(const kodi::addon::PVRChannel& channe
-       kodi::Log(ADDON_LOG_INFO, "Channel timeshift buffer: %s", timeshiftfields[2].c_str());
-       if (channelinfo.GetIsRadio())
-       {
--        usleep(100000); // 100 ms sleep to allow the buffer to fill
-+        // 100 ms sleep to allow the buffer to fill
-+        std::this_thread::sleep_for(std::chrono::milliseconds(100));
-       }
-     }
-     else
-@@ -1796,7 +1799,7 @@ bool cPVRClientMediaPortal::OpenLiveStream(const kodi::addon::PVRChannel& channe
-     if (CSettings::Get().GetSleepOnRTSPurl() > 0)
-     {
-       kodi::Log(ADDON_LOG_INFO, "Sleeping %i ms before opening stream: %s", CSettings::Get().GetSleepOnRTSPurl(), timeshiftfields[0].c_str());
--      usleep(CSettings::Get().GetSleepOnRTSPurl() * 1000);
-+      std::this_thread::sleep_for(std::chrono::milliseconds(CSettings::Get().GetSleepOnRTSPurl()));
-     }
- 
-     // Check the returned stream URL. When the URL is an rtsp stream, we need
-@@ -1878,7 +1881,7 @@ bool cPVRClientMediaPortal::OpenLiveStream(const kodi::addon::PVRChannel& channe
-           CloseLiveStream();
-           return false;
-         }
--        usleep(400000);
-+        std::this_thread::sleep_for(std::chrono::milliseconds(400));
-       }
-     }
- 
-@@ -1924,7 +1927,7 @@ int cPVRClientMediaPortal::ReadLiveStream(unsigned char *pBuffer, unsigned int i
- 
-     if (m_tsreader->Read(bufptr, read_wanted, &read_wanted) > 0)
-     {
--      usleep(20000);
-+      std::this_thread::sleep_for(std::chrono::milliseconds(20));
-       read_timeouts++;
-       return static_cast<int>(read_wanted);
-     }
-@@ -1948,7 +1951,7 @@ int cPVRClientMediaPortal::ReadLiveStream(unsigned char *pBuffer, unsigned int i
-       }
-       bufptr += read_wanted;
-       read_timeouts++;
--      usleep(10000);
-+      std::this_thread::sleep_for(std::chrono::milliseconds(10));
-     }
-   }
-   read_timeouts = 0;
-@@ -2175,7 +2178,7 @@ int cPVRClientMediaPortal::ReadRecordedStream(unsigned char *pBuffer, unsigned i
- 
-     if (m_tsreader->Read(bufptr, read_wanted, &read_wanted) > 0)
-     {
--      usleep(20000);
-+      std::this_thread::sleep_for(std::chrono::milliseconds(20));
-       return static_cast<int>(read_wanted);
-     }
-     read_done += read_wanted;
-@@ -2183,7 +2186,7 @@ int cPVRClientMediaPortal::ReadRecordedStream(unsigned char *pBuffer, unsigned i
-     if ( read_done < static_cast<size_t>(iBufferSize) )
-     {
-       bufptr += read_wanted;
--      usleep(20000);
-+      std::this_thread::sleep_for(std::chrono::milliseconds(20));
-     }
-   }
- 

+ 0 - 673
package/kodi-pvr-mediaportal-tvserver/0006-Use-std-thread-std-mutex-condition_variable-instead-.patch

@@ -1,673 +0,0 @@
-From 482d898333facf53bd3208cf5e44a0cf3e1f4f3b Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Thu, 8 Oct 2020 14:59:55 +0100
-Subject: [PATCH] Use std::thread, std::mutex, condition_variable instead of
- event
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/lib/tsreader/DeMultiplexer.cpp   |  2 +-
- src/lib/tsreader/DeMultiplexer.h     |  4 +-
- src/lib/tsreader/FileReader.cpp      |  2 +-
- src/lib/tsreader/MemoryBuffer.cpp    | 15 +++--
- src/lib/tsreader/MemoryBuffer.h      |  7 +-
- src/lib/tsreader/MemoryReader.h      |  1 +
- src/lib/tsreader/MemorySink.cpp      |  2 +-
- src/lib/tsreader/MemorySink.h        |  4 +-
- src/lib/tsreader/MepoRTSPClient.cpp  | 28 ++++----
- src/lib/tsreader/MepoRTSPClient.h    | 10 ++-
- src/lib/tsreader/MultiFileReader.cpp |  9 ++-
- src/os-dependent.h                   | 95 ++++++++++++++++++++++++++++
- src/pvrclient-mediaportal.cpp        | 29 ++++-----
- src/pvrclient-mediaportal.h          | 21 +++---
- 14 files changed, 168 insertions(+), 61 deletions(-)
-
-diff --git a/src/lib/tsreader/DeMultiplexer.cpp b/src/lib/tsreader/DeMultiplexer.cpp
-index 436e452..3d0d9a2 100644
---- a/src/lib/tsreader/DeMultiplexer.cpp
-+++ b/src/lib/tsreader/DeMultiplexer.cpp
-@@ -104,7 +104,7 @@ namespace MPTV
-         if (m_filter.IsSeeking())
-             return 0;       // Ambass : to check
- 
--        P8PLATFORM::CLockObject lock(m_sectionRead);
-+        std::lock_guard<std::mutex> lock(m_sectionRead);
-         if (NULL == m_reader)
-             return 0;
- 
-diff --git a/src/lib/tsreader/DeMultiplexer.h b/src/lib/tsreader/DeMultiplexer.h
-index c7cd577..72ed87d 100644
---- a/src/lib/tsreader/DeMultiplexer.h
-+++ b/src/lib/tsreader/DeMultiplexer.h
-@@ -37,7 +37,7 @@
- #include "PacketSync.h"
- #include "TSHeader.h"
- #include "PatParser.h"
--#include "p8-platform/threads/mutex.h"
-+#include <mutex>
- 
- namespace MPTV
- {
-@@ -60,7 +60,7 @@ namespace MPTV
-     private:
-         unsigned long long m_LastDataFromRtsp;
-         bool m_bEndOfFile;
--        P8PLATFORM::CMutex m_sectionRead;
-+        std::mutex m_sectionRead;
-         FileReader* m_reader;
-         CPatParser m_patParser;
-         CTsReader& m_filter;
-diff --git a/src/lib/tsreader/FileReader.cpp b/src/lib/tsreader/FileReader.cpp
-index 73b23af..358b05f 100644
---- a/src/lib/tsreader/FileReader.cpp
-+++ b/src/lib/tsreader/FileReader.cpp
-@@ -35,7 +35,7 @@
- #include "FileReader.h"
- #include <kodi/General.h> //for kodi::Log
- #include "TSDebug.h"
--#include "p8-platform/threads/threads.h"
-+#include "os-dependent.h"
- #include <algorithm> //std::min, std::max
- #include "utils.h"
- #include <errno.h>
-diff --git a/src/lib/tsreader/MemoryBuffer.cpp b/src/lib/tsreader/MemoryBuffer.cpp
-index 0e736f2..b5400da 100644
---- a/src/lib/tsreader/MemoryBuffer.cpp
-+++ b/src/lib/tsreader/MemoryBuffer.cpp
-@@ -29,7 +29,7 @@
- 
- #ifdef LIVE555
- 
--#include "p8-platform/threads/mutex.h"
-+#include "os-dependent.h"
- #include "MemoryBuffer.h"
- #include <kodi/General.h> //for kodi::Log
- #include "TSDebug.h"
-@@ -56,7 +56,7 @@ bool CMemoryBuffer::IsRunning()
- 
- void CMemoryBuffer::Clear()
- {
--  P8PLATFORM::CLockObject BufferLock(m_BufferLock);
-+  std::lock_guard<std::mutex> BufferLock(m_BufferLock);
-   std::vector<BufferItem *>::iterator it = m_Array.begin();
- 
-   for (auto& item : m_Array)
-@@ -104,14 +104,17 @@ size_t CMemoryBuffer::ReadFromBuffer(unsigned char *pbData, size_t lDataLength)
-   {
-     if (!m_bRunning)
-       return 0;
--    m_event.Wait(5000);
-+
-+    std::unique_lock<std::mutex> lock(m_BufferLock);
-+    m_condition.wait_for(lock, std::chrono::milliseconds(5000));
-+
-     if (!m_bRunning)
-       return 0;
-   }
- 
-   // kodi::Log(ADDON_LOG_DEBUG, "get..%d/%d", lDataLength, m_BytesInBuffer);
-   size_t bytesWritten = 0;
--  P8PLATFORM::CLockObject BufferLock(m_BufferLock);
-+  std::lock_guard<std::mutex> BufferLock(m_BufferLock);
- 
-   while (bytesWritten < lDataLength)
-   {
-@@ -172,7 +175,7 @@ long CMemoryBuffer::PutBuffer(unsigned char *pbData, size_t lDataLength)
-   memcpy(item->data, pbData, lDataLength);
-   bool sleep = false;
-   {
--    P8PLATFORM::CLockObject BufferLock(m_BufferLock);
-+    std::lock_guard<std::mutex> BufferLock(m_BufferLock);
-     m_Array.push_back(item);
-     m_BytesInBuffer += lDataLength;
- 
-@@ -192,7 +195,7 @@ long CMemoryBuffer::PutBuffer(unsigned char *pbData, size_t lDataLength)
-     }
-     if (m_BytesInBuffer > 0)
-     {
--      m_event.Broadcast();
-+      m_condition.notify_one();
-     }
-   }
- 
-diff --git a/src/lib/tsreader/MemoryBuffer.h b/src/lib/tsreader/MemoryBuffer.h
-index 080553b..4f8708f 100644
---- a/src/lib/tsreader/MemoryBuffer.h
-+++ b/src/lib/tsreader/MemoryBuffer.h
-@@ -30,7 +30,8 @@
- 
- #ifdef LIVE555
- 
--#include "p8-platform/threads/mutex.h"
-+#include <condition_variable>
-+#include <mutex>
- #include <vector>
- 
- class CMemoryBuffer
-@@ -55,9 +56,9 @@ class CMemoryBuffer
- 
-   protected:
-     std::vector<BufferItem *> m_Array;
--    P8PLATFORM::CMutex m_BufferLock;
-+    std::mutex m_BufferLock;
-     size_t    m_BytesInBuffer;
--		P8PLATFORM::CEvent m_event;
-+    std::condition_variable m_condition;
-     bool m_bRunning;
- };
- #endif //LIVE555
-diff --git a/src/lib/tsreader/MemoryReader.h b/src/lib/tsreader/MemoryReader.h
-index fef4f98..288984b 100644
---- a/src/lib/tsreader/MemoryReader.h
-+++ b/src/lib/tsreader/MemoryReader.h
-@@ -32,6 +32,7 @@
- 
- #include "FileReader.h"
- #include "MemoryBuffer.h"
-+#include "os-dependent.h"
- 
- namespace MPTV
- {
-diff --git a/src/lib/tsreader/MemorySink.cpp b/src/lib/tsreader/MemorySink.cpp
-index dafef56..af8b74c 100644
---- a/src/lib/tsreader/MemorySink.cpp
-+++ b/src/lib/tsreader/MemorySink.cpp
-@@ -84,7 +84,7 @@ void CMemorySink::addData(unsigned char* data, size_t dataSize, struct timeval U
-     return;
-   }
- 
--  P8PLATFORM::CLockObject BufferLock(m_BufferLock);
-+  std::lock_guard<std::mutex> BufferLock(m_BufferLock);
- 
-   m_bReEntrant = true;
-   m_buffer.PutBuffer(data, dataSize);
-diff --git a/src/lib/tsreader/MemorySink.h b/src/lib/tsreader/MemorySink.h
-index cc0f3c8..22d91c6 100644
---- a/src/lib/tsreader/MemorySink.h
-+++ b/src/lib/tsreader/MemorySink.h
-@@ -35,7 +35,7 @@
- #endif
- 
- #include "MemoryBuffer.h"
--#include "p8-platform/threads/mutex.h"
-+#include <mutex>
- 
- class CMemorySink: public MediaSink
- {
-@@ -57,7 +57,7 @@ class CMemorySink: public MediaSink
-   private: // redefined virtual functions:
-     virtual Boolean continuePlaying();
- 
--		P8PLATFORM::CMutex m_BufferLock;
-+		std::mutex m_BufferLock;
-     unsigned char* m_pSubmitBuffer;
-     int   m_iSubmitBufferPos;
-     bool  m_bReEntrant;
-diff --git a/src/lib/tsreader/MepoRTSPClient.cpp b/src/lib/tsreader/MepoRTSPClient.cpp
-index ccd6761..688ae84 100644
---- a/src/lib/tsreader/MepoRTSPClient.cpp
-+++ b/src/lib/tsreader/MepoRTSPClient.cpp
-@@ -54,7 +54,7 @@ CRTSPClient::CRTSPClient()
-   m_env = NULL;
-   m_fDuration = 0.0f;
-   m_url[0] = '\0';
--  m_bRunning = false;
-+  m_running = false;
- }
- 
- CRTSPClient::~CRTSPClient()
-@@ -496,7 +496,9 @@ void CRTSPClient::StartBufferThread()
- 
-   if (!m_BufferThreadActive)
-   {
--    CreateThread();
-+    m_running = true;
-+    m_thread = std::thread([&] { Process(); });
-+
-     m_BufferThreadActive = true;
-   }
-   kodi::Log(ADDON_LOG_DEBUG, "CRTSPClient::StartBufferThread done");
-@@ -505,11 +507,12 @@ void CRTSPClient::StartBufferThread()
- void CRTSPClient::StopBufferThread()
- {
-   kodi::Log(ADDON_LOG_DEBUG, "CRTSPClient::StopBufferThread");
--  m_bRunning = false;
-+  m_running = false;
-   if (!m_BufferThreadActive)
-     return;
- 
--  StopThread();
-+  if (m_thread.joinable())
-+    m_thread.join();
- 
-   m_BufferThreadActive = false;
-   kodi::Log(ADDON_LOG_DEBUG, "CRTSPClient::StopBufferThread done");
-@@ -539,25 +542,22 @@ void CRTSPClient::FillBuffer(unsigned long byteCount)
-   kodi::Log(ADDON_LOG_DEBUG, "CRTSPClient::Fillbuffer...%d/%d\n", byteCount, m_buffer->Size() );
- }
- 
--void *CRTSPClient::Process()
-+void CRTSPClient::Process()
- {
-   m_BufferThreadActive = true;
--  m_bRunning = true;
- 
-   kodi::Log(ADDON_LOG_DEBUG, "CRTSPClient:: thread started");
- 
--  while (m_env != NULL && !IsStopped())
-+  while (m_env != NULL && m_running)
-   {
-     m_env->taskScheduler().doEventLoop();
--    if (m_bRunning == false)
-+    if (m_running == false)
-       break;
-   }
- 
-   kodi::Log(ADDON_LOG_DEBUG, "CRTSPClient:: thread stopped");
- 
-   m_BufferThreadActive = false;
--
--  return NULL;
- }
- 
- void CRTSPClient::Continue()
-@@ -582,8 +582,12 @@ bool CRTSPClient::Pause()
-   if (m_ourClient != NULL && m_session != NULL)
-   {
-     kodi::Log(ADDON_LOG_DEBUG, "CRTSPClient::Pause() stopthread");
--    StopThread(10000);                    // Ambass : sometimes 100mS ( prev value ) is not enough and thread is not stopped.
--                                                 //          now stopping takes around 5 secs ?!?! why ????
-+    // Ambass : sometimes 100mS ( prev value ) is not enough and thread is not stopped.
-+    //          now stopping takes around 5 secs ?!?! why ????
-+    m_running = false;
-+    if (m_thread.joinable())
-+      m_thread.join();
-+
-     kodi::Log(ADDON_LOG_DEBUG, "CRTSPClient::Pause() thread stopped");
-     RTSPClient* rtspClient=(RTSPClient*)m_ourClient;
-     rtspClient->pauseMediaSession(*m_session);
-diff --git a/src/lib/tsreader/MepoRTSPClient.h b/src/lib/tsreader/MepoRTSPClient.h
-index bd6e578..9bb0421 100644
---- a/src/lib/tsreader/MepoRTSPClient.h
-+++ b/src/lib/tsreader/MepoRTSPClient.h
-@@ -31,7 +31,8 @@
- 
- #ifdef LIVE555
- 
--#include "p8-platform/threads/threads.h"
-+#include <atomic>
-+#include <thread>
- #include "lib/tsreader/MemoryBuffer.h"
- 
- #include "liveMedia.hh"
-@@ -41,7 +42,7 @@
- 
- #define RTSP_URL_BUFFERSIZE 2048
- 
--class CRTSPClient: public P8PLATFORM::CThread
-+class CRTSPClient
- {
- public:
-   CRTSPClient();
-@@ -101,7 +102,7 @@ class CRTSPClient: public P8PLATFORM::CThread
- 
-   // Thread
- private:
--  virtual void *Process(void);
-+  void Process();
-   void StartBufferThread();
-   void StopBufferThread();
-   bool m_BufferThreadActive;
-@@ -113,5 +114,8 @@ class CRTSPClient: public P8PLATFORM::CThread
-   bool m_bRunning;
-   bool m_bPaused;
-   char m_outFileName[1000];
-+
-+  std::atomic<bool> m_running = {false};
-+  std::thread m_thread;
- };
- #endif //LIVE555
-diff --git a/src/lib/tsreader/MultiFileReader.cpp b/src/lib/tsreader/MultiFileReader.cpp
-index 21fd7b2..5106418 100644
---- a/src/lib/tsreader/MultiFileReader.cpp
-+++ b/src/lib/tsreader/MultiFileReader.cpp
-@@ -35,17 +35,16 @@
- #include "MultiFileReader.h"
- #include <kodi/General.h> //for kodi::Log
- #include <kodi/Filesystem.h>
-+#include <kodi/tools/EndTime.h>
- #include "TSDebug.h"
- #include <string>
- #include "utils.h"
- #include <algorithm>
--#include "p8-platform/threads/threads.h"
- #include <inttypes.h>
-+#include "os-dependent.h"
- 
- #include <thread>
- 
--using namespace P8PLATFORM;
--
- //Maximum time in msec to wait for the buffer file to become available - Needed for DVB radio (this sometimes takes some time)
- #define MAX_BUFFER_TIMEOUT 1500
- 
-@@ -121,12 +120,12 @@ namespace MPTV
-         if (RefreshTSBufferFile() == S_FALSE)
-         {
-             // For radio the buffer sometimes needs some time to become available, so wait and try it more than once
--            P8PLATFORM::CTimeout timeout(MAX_BUFFER_TIMEOUT);
-+            kodi::tools::CEndTime timeout(MAX_BUFFER_TIMEOUT);
- 
-             do
-             {
-                 std::this_thread::sleep_for(std::chrono::milliseconds(100));
--                if (timeout.TimeLeft() == 0)
-+                if (timeout.MillisLeft() == 0)
-                 {
-                     kodi::Log(ADDON_LOG_ERROR, "MultiFileReader: timed out while waiting for buffer file to become available");
-                     kodi::QueueNotification(QUEUE_ERROR, "", "Time out while waiting for buffer file");
-diff --git a/src/os-dependent.h b/src/os-dependent.h
-index cdc6980..28c162c 100644
---- a/src/os-dependent.h
-+++ b/src/os-dependent.h
-@@ -11,6 +11,13 @@
- 
- #if (defined(_WIN32) || defined(_WIN64))
- 
-+#include <wchar.h>
-+
-+/* Handling of 2-byte Windows wchar strings */
-+#define WcsLen wcslen
-+#define WcsToMbs wcstombs
-+typedef wchar_t Wchar_t; /* sizeof(wchar_t) = 2 bytes on Windows */
-+
- #ifndef _SSIZE_T_DEFINED
- #ifdef  _WIN64
- typedef __int64    ssize_t;
-@@ -20,20 +27,108 @@ typedef _W64 int   ssize_t;
- #define _SSIZE_T_DEFINED
- #endif
- 
-+/* Prevent deprecation warnings */
-+#define strnicmp _strnicmp
-+
-+#define PATH_SEPARATOR_CHAR '\\'
-+
- #else
- 
- #if (defined(TARGET_LINUX) || defined(TARGET_DARWIN))
- #include <sys/types.h>
- #include <chrono>
- #include <cstring>
-+
-+#define strnicmp(X,Y,N) strncasecmp(X,Y,N)
-+
- inline unsigned long long GetTickCount64(void)
- {
-   auto now = std::chrono::steady_clock::now();
-   return std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count();
- };
-+
-+#define PATH_SEPARATOR_CHAR '/'
-+
-+#if defined(__APPLE__)
-+// for HRESULT
-+#include <CoreFoundation/CFPlugInCOM.h>
-+#endif
-+
-+/* Handling of 2-byte Windows wchar strings on non-Windows targets
-+ * Used by The MediaPortal and ForTheRecord pvr addons
-+ */
-+typedef uint16_t Wchar_t; /* sizeof(wchar_t) = 4 bytes on Linux, but the MediaPortal buffer files have 2-byte wchars */
-+
-+/* This is a replacement of the Windows wcslen() function which assumes that
-+ * wchar_t is a 2-byte character.
-+ * It is used for processing Windows wchar strings
-+ */
-+inline size_t WcsLen(const Wchar_t *str)
-+{
-+  const unsigned short *eos = (const unsigned short*)str;
-+  while( *eos++ ) ;
-+  return( (size_t)(eos - (const unsigned short*)str) -1);
-+};
-+
-+/* This is a replacement of the Windows wcstombs() function which assumes that
-+ * wchar_t is a 2-byte character.
-+ * It is used for processing Windows wchar strings
-+ */
-+inline size_t WcsToMbs(char *s, const Wchar_t *w, size_t n)
-+{
-+  size_t i = 0;
-+  const unsigned short *wc = (const unsigned short*) w;
-+  while(wc[i] && (i < n))
-+  {
-+    s[i] = wc[i];
-+    ++i;
-+  }
-+  if (i < n) s[i] = '\0';
-+
-+  return (i);
-+};
-+
- #endif /* TARGET_LINUX || TARGET_DARWIN */
- 
- #endif
- 
-+typedef long LONG;
-+#if !defined(__APPLE__)
-+typedef LONG HRESULT;
-+#endif
-+
-+#ifndef FAILED
-+#define FAILED(Status) ((HRESULT)(Status)<0)
-+#endif
-+
-+#ifndef SUCCEEDED
-+#define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0)
-+#endif
-+
-+#define _FILE_OFFSET_BITS 64
-+#define FILE_BEGIN              0
-+#define FILE_CURRENT            1
-+#define FILE_END                2
-+
-+#ifndef S_OK
-+#define S_OK           0L
-+#endif
-+
-+#ifndef S_FALSE
-+#define S_FALSE        1L
-+#endif
-+
-+// Error codes
-+#define ERROR_FILENAME_EXCED_RANGE 206L
-+#define ERROR_INVALID_NAME         123L
-+
-+#ifndef E_OUTOFMEMORY
-+#define E_OUTOFMEMORY              0x8007000EL
-+#endif
-+
-+#ifndef E_FAIL
-+#define E_FAIL                     0x8004005EL
-+#endif
-+
- // Additional typedefs
- typedef uint8_t byte;
-diff --git a/src/pvrclient-mediaportal.cpp b/src/pvrclient-mediaportal.cpp
-index 851b940..c1052e3 100644
---- a/src/pvrclient-mediaportal.cpp
-+++ b/src/pvrclient-mediaportal.cpp
-@@ -28,8 +28,6 @@
- #include <kodi/General.h>
- #include <kodi/Filesystem.h>
- 
--#include <thread>
--
- using namespace kodi::tools;
- using namespace std;
- using namespace MPTV;
-@@ -70,7 +68,6 @@ cPVRClientMediaPortal::cPVRClientMediaPortal(KODI_HANDLE instance, const std::st
-   m_BackendTime            = 0;
-   m_tsreader               = NULL;
-   m_genretable             = NULL;
--  m_iLastRecordingUpdate   = 0;
-   m_signalStateCounter     = 0;
-   m_iSignal                = 0;
-   m_iSNR                   = 0;
-@@ -99,7 +96,7 @@ string cPVRClientMediaPortal::SendCommand(const char* command)
- 
- string cPVRClientMediaPortal::SendCommand(const string& command)
- {
--  P8PLATFORM::CLockObject critsec(m_mutex);
-+  std::lock_guard<std::mutex> critsec(m_mutex);
- 
-   if ( !m_tcpclient->send(command) )
-   {
-@@ -174,10 +171,10 @@ ADDON_STATUS cPVRClientMediaPortal::TryConnect()
-     case PVR_CONNECTION_STATE_SERVER_UNREACHABLE:
-       kodi::Log(ADDON_LOG_ERROR, "Could not connect to MediaPortal TV Server backend.");
-       // Start background thread for connecting to the backend
--      if (!IsRunning())
-+      if (!m_running)
-       {
--        kodi::Log(ADDON_LOG_INFO, "Waiting for a connection in the background.");
--        CreateThread();
-+        m_running = true;
-+        m_thread = std::thread([&] { Process(); });
-       }
-       return ADDON_STATUS_LOST_CONNECTION;
-     case PVR_CONNECTION_STATE_CONNECTING:
-@@ -190,7 +187,7 @@ ADDON_STATUS cPVRClientMediaPortal::TryConnect()
- 
- PVR_CONNECTION_STATE cPVRClientMediaPortal::Connect(bool updateConnectionState)
- {
--  P8PLATFORM::CLockObject critsec(m_connectionMutex);
-+  std::lock_guard<std::mutex> critsec(m_connectionMutex);
- 
-   string result;
- 
-@@ -317,9 +314,11 @@ void cPVRClientMediaPortal::Disconnect()
- 
-   kodi::Log(ADDON_LOG_INFO, "Disconnect");
- 
--  if (IsRunning())
-+  if (m_running)
-   {
--    StopThread(1000);
-+    m_running = false;
-+    if (m_thread.joinable())
-+      m_thread.join();
-   }
- 
-   if (m_tcpclient->is_valid() && m_bTimeShiftStarted)
-@@ -361,14 +360,14 @@ bool cPVRClientMediaPortal::IsUp()
-   }
- }
- 
--void* cPVRClientMediaPortal::Process(void)
-+void cPVRClientMediaPortal::Process()
- {
-   kodi::Log(ADDON_LOG_DEBUG, "Background thread started.");
- 
-   bool keepWaiting = true;
-   PVR_CONNECTION_STATE state;
- 
--  while (!IsStopped() && keepWaiting)
-+  while (m_running && keepWaiting)
-   {
-     state = Connect(false);
- 
-@@ -396,8 +395,6 @@ void* cPVRClientMediaPortal::Process(void)
-   SetConnectionState(state);
- 
-   kodi::Log(ADDON_LOG_DEBUG, "Background thread finished.");
--
--  return NULL;
- }
- 
- 
-@@ -1188,7 +1185,7 @@ PVR_ERROR cPVRClientMediaPortal::GetRecordings(bool deleted, kodi::addon::PVRRec
-     }
-   }
- 
--  m_iLastRecordingUpdate = P8PLATFORM::GetTimeMs();
-+  m_iLastRecordingUpdate = std::chrono::system_clock::now();
- 
-   return PVR_ERROR_NO_ERROR;
- }
-@@ -1383,7 +1380,7 @@ PVR_ERROR cPVRClientMediaPortal::GetTimers(kodi::addon::PVRTimersResultSet& resu
-     }
-   }
- 
--  if ( P8PLATFORM::GetTimeMs() >  m_iLastRecordingUpdate + 15000)
-+  if ( std::chrono::system_clock::now() >  m_iLastRecordingUpdate + std::chrono::milliseconds(15000))
-   {
-     kodi::addon::CInstancePVRClient::TriggerRecordingUpdate();
-   }
-diff --git a/src/pvrclient-mediaportal.h b/src/pvrclient-mediaportal.h
-index 3087634..e5da832 100644
---- a/src/pvrclient-mediaportal.h
-+++ b/src/pvrclient-mediaportal.h
-@@ -7,6 +7,10 @@
- 
- #pragma once
- 
-+#include <atomic>
-+#include <chrono>
-+#include <mutex>
-+#include <thread>
- #include <vector>
- 
- /* Master defines for client control */
-@@ -17,8 +21,6 @@
- #include "Cards.h"
- #include "epg.h"
- #include "channels.h"
--#include "p8-platform/threads/mutex.h"
--#include "p8-platform/threads/threads.h"
- 
- /* Use a forward declaration here. Including RTSPClient.h via TSReader.h at this point gives compile errors */
- namespace MPTV
-@@ -28,9 +30,7 @@ namespace MPTV
- class cRecording;
- 
- class ATTRIBUTE_HIDDEN cPVRClientMediaPortal
--  : public kodi::addon::CInstancePVRClient,
--    public P8PLATFORM::PreventCopy,
--    public P8PLATFORM::CThread
-+  : public kodi::addon::CInstancePVRClient
- {
- public:
-   /* Class interface */
-@@ -110,7 +110,7 @@ class ATTRIBUTE_HIDDEN cPVRClientMediaPortal
- 
- private:
-   /* TVServerKodi Listening Thread */
--  void* Process(void);
-+  void Process();
-   PVR_CONNECTION_STATE Connect(bool updateConnectionState = true);
- 
-   void LoadGenreTable(void);
-@@ -134,9 +134,9 @@ class ATTRIBUTE_HIDDEN cPVRClientMediaPortal
-   time_t                  m_BackendTime;
-   CCards                  m_cCards;
-   CGenreTable*            m_genretable;
--  P8PLATFORM::CMutex      m_mutex;
--  P8PLATFORM::CMutex      m_connectionMutex;
--  int64_t                 m_iLastRecordingUpdate;
-+  std::mutex              m_mutex;
-+  std::mutex              m_connectionMutex;
-+  std::chrono::system_clock::time_point m_iLastRecordingUpdate;
-   MPTV::CTsReader*        m_tsreader;
-   std::map<int,cChannel>  m_channels;
-   int                     m_signalStateCounter;
-@@ -145,6 +145,9 @@ class ATTRIBUTE_HIDDEN cPVRClientMediaPortal
- 
-   cRecording*             m_lastSelectedRecording;
- 
-+  std::atomic<bool> m_running = {false};
-+  std::thread m_thread;
-+
-   //Used for TV Server communication:
-   std::string SendCommand(const char* command);
-   std::string SendCommand(const std::string& command);

+ 0 - 55
package/kodi-pvr-mediaportal-tvserver/0007-Remove-charset-converter-dependency.patch

@@ -1,55 +0,0 @@
-From bb752566a31029df4ca2c8a2d7fca6680570bfe6 Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Thu, 8 Oct 2020 16:10:44 +0100
-Subject: [PATCH] Remove charset converter dependency
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/windows/FileUtils.cpp | 20 ++++++++++++++++----
- 1 file changed, 16 insertions(+), 4 deletions(-)
-
-diff --git a/src/windows/FileUtils.cpp b/src/windows/FileUtils.cpp
-index 0c8a03e..f829b2a 100644
---- a/src/windows/FileUtils.cpp
-+++ b/src/windows/FileUtils.cpp
-@@ -6,24 +6,36 @@
-  */
- 
- #include "../FileUtils.h"
--#include "p8-platform/windows/CharsetConverter.h"
- #include <string>
- #include "../utils.h"
- #ifdef TARGET_WINDOWS_DESKTOP
- #include <Shlobj.h>
- #endif
- 
--#ifdef TARGET_WINDOWS
- #include <windows.h>
- #include <fileapi.h>
--#endif
-+
-+std::wstring ToW(const char* str, size_t length)
-+{
-+  int result = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, length, nullptr, 0);
-+  if (result == 0)
-+    return std::wstring();
-+
-+  auto newStr = std::make_unique<wchar_t[]>(result);
-+  result = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, length, newStr.get(), result);
-+
-+  if (result == 0)
-+    return std::wstring();
-+
-+  return std::wstring(newStr.get(), result);
-+}
- 
- namespace OS
- {
-   bool CFile::Exists(const std::string& strFileName, long* errCode)
-   {
-     std::string strWinFile = ToWindowsPath(strFileName);
--    std::wstring strWFile = p8::windows::ToW(strWinFile.c_str());
-+    std::wstring strWFile = ToW(strWinFile.c_str(), 0);
-     DWORD dwAttr = GetFileAttributesW(strWFile.c_str());
- 
-     if(dwAttr != 0xffffffff)

+ 0 - 74
package/kodi-pvr-mediaportal-tvserver/0008-Remove-p8-platform-dependency.patch

@@ -1,74 +0,0 @@
-From e78eb2db7c42e302713d5e7129603e56d0e9b43b Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Thu, 8 Oct 2020 16:11:19 +0100
-Subject: [PATCH] Remove p8-platform dependency
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- CMakeLists.txt                                   | 7 ++-----
- debian/control                                   | 2 +-
- depends/common/p8-platform/p8-platform.txt       | 1 -
- depends/windowsstore/p8-platform/p8-platform.txt | 1 -
- 4 files changed, 3 insertions(+), 8 deletions(-)
- delete mode 100644 depends/common/p8-platform/p8-platform.txt
- delete mode 100644 depends/windowsstore/p8-platform/p8-platform.txt
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1226685..f612570 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -4,7 +4,6 @@ project(pvr.mediaportal.tvserver)
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
- 
- find_package(Kodi REQUIRED)
--find_package(p8-platform REQUIRED)
- find_package(TinyXML REQUIRED)
- 
- set(LIVE555_INCLUDE_DIR
-@@ -17,8 +16,7 @@ set(LIVE555_INCLUDE_DIR
- 
- set(LIVE555_DEFINES -DLIVE555 -D_WINSOCK_DEPRECATED_NO_WARNINGS -DSOCKLEN_T=socklen_t -DBSD=1)
- 
--include_directories(${p8-platform_INCLUDE_DIRS}
--                    ${TINYXML_INCLUDE_DIR}
-+include_directories(${TINYXML_INCLUDE_DIR}
-                     ${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways
-                     ${PROJECT_SOURCE_DIR}/src
-                     ${PROJECT_BINARY_DIR}
-@@ -229,8 +227,7 @@ source_group("Header Files\\lib\\live555" FILES ${LIVE555_HEADERS})
- # Make sure that CMake adds all files to the MSVC project
- list(APPEND MPTV_SOURCES ${MPTV_HEADERS} ${TSREADER_SOURCES} ${TSREADER_HEADERS} ${LIVE555_SOURCES} ${LIVE555_HEADERS})
- 
--set(DEPLIBS ${p8-platform_LIBRARIES}
--            ${TINYXML_LIBRARIES})
-+set(DEPLIBS ${TINYXML_LIBRARIES})
- 
- if(WIN32)
-   list(APPEND DEPLIBS ws2_32)
-diff --git a/debian/control b/debian/control
-index 667e47c..e81ff45 100644
---- a/debian/control
-+++ b/debian/control
-@@ -2,7 +2,7 @@ Source: kodi-pvr-mediaportal-tvserver
- Priority: extra
- Maintainer: Nobody <nobody@kodi.tv>
- Build-Depends: debhelper (>= 9.0.0), cmake, libtinyxml-dev,
--               libp8-platform-dev, kodi-addon-dev
-+               kodi-addon-dev
- Standards-Version: 4.1.2
- Section: libs
- Homepage: http://kodi.tv
-diff --git a/depends/common/p8-platform/p8-platform.txt b/depends/common/p8-platform/p8-platform.txt
-deleted file mode 100644
-index 98ed58a..0000000
---- a/depends/common/p8-platform/p8-platform.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--p8-platform https://github.com/xbmc/platform.git cee64e9dc0b69e8d286dc170a78effaabfa09c44
-diff --git a/depends/windowsstore/p8-platform/p8-platform.txt b/depends/windowsstore/p8-platform/p8-platform.txt
-deleted file mode 100644
-index db6f782..0000000
---- a/depends/windowsstore/p8-platform/p8-platform.txt
-+++ /dev/null
-@@ -1 +0,0 @@
--p8-platform https://github.com/afedchin/platform.git win10

+ 0 - 28
package/kodi-pvr-mediaportal-tvserver/0009-Travis-changes-for-cpp17.patch

@@ -1,28 +0,0 @@
-From e613bfbb4561173046451e9bb1ec64c7879de859 Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Sat, 17 Oct 2020 14:06:04 +0100
-Subject: [PATCH] Travis changes for cpp17
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- .travis.yml | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/.travis.yml b/.travis.yml
-index 1f2b61f..285f827 100644
---- a/.travis.yml
-+++ b/.travis.yml
-@@ -10,11 +10,11 @@ env:
- matrix:
-   include:
-     - os: linux
--      dist: xenial
-+      dist: bionic
-       sudo: required
-       compiler: gcc
-     - os: linux
--      dist: xenial
-+      dist: bionic
-       sudo: required
-       compiler: clang
-     - os: linux

+ 0 - 23
package/kodi-pvr-mediaportal-tvserver/0010-Remove-register-keyword-as-no-longer-valid-in-CPP17.patch

@@ -1,23 +0,0 @@
-From 5cf2d4e05673964e269e4b9a2e779d20f57c0d17 Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Sat, 6 Feb 2021 12:56:50 +0000
-Subject: [PATCH] Remove register keyword as no longer valid in CPP17
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/lib/tsreader/DvbUtil.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/lib/tsreader/DvbUtil.cpp b/src/lib/tsreader/DvbUtil.cpp
-index 8c4798a..c973062 100644
---- a/src/lib/tsreader/DvbUtil.cpp
-+++ b/src/lib/tsreader/DvbUtil.cpp
-@@ -77,7 +77,7 @@ namespace MPTV
-     //*******************************************************************
-     uint32_t crc32(char *data, int len)
-     {
--        register int i;
-+        int i;
-         uint32_t crc = 0xffffffff;
- 
-         for (i = 0; i < len; i++)

+ 0 - 42
package/kodi-pvr-mediaportal-tvserver/0011-changelog-and-version-v8.1.1.patch

@@ -1,42 +0,0 @@
-From 79e33e1799976e2196132f90bd7f322f213c1a99 Mon Sep 17 00:00:00 2001
-From: phunkyfish <phunkyfish@gmail.com>
-Date: Sat, 6 Feb 2021 00:16:19 +0000
-Subject: [PATCH] changelog and version v8.1.1
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- pvr.mediaportal.tvserver/addon.xml.in  |  2 +-
- pvr.mediaportal.tvserver/changelog.txt | 10 ++++++++++
- 2 files changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/pvr.mediaportal.tvserver/addon.xml.in b/pvr.mediaportal.tvserver/addon.xml.in
-index de30c2a..1944bc0 100644
---- a/pvr.mediaportal.tvserver/addon.xml.in
-+++ b/pvr.mediaportal.tvserver/addon.xml.in
-@@ -1,7 +1,7 @@
- <?xml version="1.0" encoding="UTF-8"?>
- <addon
-   id="pvr.mediaportal.tvserver"
--  version="8.1.0"
-+  version="8.1.1"
-   name="MediaPortal PVR Client"
-   provider-name="Marcel Groothuis">
-   <requires>@ADDON_DEPENDS@</requires>
-diff --git a/pvr.mediaportal.tvserver/changelog.txt b/pvr.mediaportal.tvserver/changelog.txt
-index 7d1630e..8e06c48 100644
---- a/pvr.mediaportal.tvserver/changelog.txt
-+++ b/pvr.mediaportal.tvserver/changelog.txt
-@@ -1,3 +1,13 @@
-+v8.1.1
-+- Remove p8-platform dependency
-+- Remove charset converter dependency
-+- Use std::thread, std::mutex, condition_variable instead of event and bool defines
-+- Use thread sleep_for instead of p8 time utils
-+- Remove SAFE_DELETE
-+- Use kodi StringUtils
-+- Remove p8 os includes
-+- Revert "Removed no more supported (C++17) declaration keyword (register)"
-+
- v8.1.0
- - Update PVR API 7.1.0
- 

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно