From 9da0dced335607f9873e24a15bfe4df3af516410 Mon Sep 17 00:00:00 2001 From: Jeffrey Hart Date: Tue, 15 Mar 2022 19:25:15 -0700 Subject: [PATCH 01/42] ci: add style check for all packages on PR Adds buildroot style enforce check for all changes. Signed-off-by: Jeffrey Hart --- .github/workflows/lint.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000000..f8494f7c83 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,24 @@ +name: buildroot-style-check + +on: + pull_request: + branches: [ 'chargepoint/**' ] + +jobs: + buildroot_package_check: + runs-on: ubuntu-22.04 + steps: + - name: checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Python setup + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + with: + python-version: 3.9 + - name: Run buildroot package checks + run: | + pip install --upgrade pip + pip install --upgrade flake8 six python-magic + python3 utils/check-package -v **/*.mk + python3 utils/check-package -v **/Config.in* + From 2fe88a7c1702d465bb5450b2715beb91bc3f52b6 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Mon, 19 Apr 2021 14:55:30 -0700 Subject: [PATCH 02/42] support/misc: update the Vagrantfile to use the git checkout The default vagrant downloads a buildroot tarball and builds that, but for testing it is a bit more convenient to just use the shared directory across the vagrant box against the checked out buildroot Signed-off-by: Charles Hardin --- support/misc/Vagrantfile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/support/misc/Vagrantfile b/support/misc/Vagrantfile index 73bdcc8b5e..ce3887e98d 100644 --- a/support/misc/Vagrantfile +++ b/support/misc/Vagrantfile @@ -8,11 +8,20 @@ RELEASE='2024.02' ### Change here for more memory/cores ### -VM_MEMORY=2048 -VM_CORES=1 +VM_MEMORY=5144 +VM_CORES=4 Vagrant.configure('2') do |config| + # ssh keys + config.ssh.forward_agent = true + config.ssh.forward_x11 = true + + # Define the Virtual VM config.vm.box = 'ubuntu/bionic64' + config.vm.synced_folder ".", "/vagrant", disabled: true + vagrant_root = File.join(File.dirname(__FILE__), "..", "..") + config.vm.provision "shell", inline: "mkdir -p /home/vagrant/buildroot" + config.vm.synced_folder vagrant_root, "/home/vagrant/buildroot" config.vm.provider :vmware_fusion do |v, override| v.vmx['memsize'] = VM_MEMORY @@ -52,9 +61,4 @@ Vagrant.configure('2') do |config| apt-get -q -y clean update-locale LC_ALL=C" - config.vm.provision 'shell', privileged: false, inline: - "echo 'Downloading and extracting buildroot #{RELEASE}' - wget -q -c http://buildroot.org/downloads/buildroot-#{RELEASE}.tar.gz - tar axf buildroot-#{RELEASE}.tar.gz" - end From d2f9160f8e740553d9fcd54ebf6ebe591ec3770c Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Mon, 26 Oct 2020 22:52:26 -0700 Subject: [PATCH 03/42] package/dhcp: fix dhcp symlink in target/var/lib/dhcp In a readonly fs configuration the skeleton-init-fs will move the var directories to the usr/share/factory and the run a command like this: mv $(TARGET_DIR)/var $(TARGET_DIR)/usr/share/factory/var mkdir -p $(TARGET_DIR)/var for i in $(TARGET_DIR)/usr/share/factory/var/* \ $(TARGET_DIR)/usr/share/factory/var/lib/* \ $(TARGET_DIR)/usr/share/factory/var/lib/systemd/*; do If the symlink is to the /tmp directory the glob compare on the dhcp link will evaluate and result in an incorrect entry being created in the resulting tmpfs mount on var. L+! /var/lib/dhcp - - - - ../usr/share/factory//var/lib/dhcp So, make the link relative and the result of the configuration doesn't get impacted. Signed-off-by: Charles Hardin --- package/dhcp/dhcp.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk index b3b7fe3203..bebf6c2571 100644 --- a/package/dhcp/dhcp.mk +++ b/package/dhcp/dhcp.mk @@ -107,7 +107,7 @@ define DHCP_INSTALL_CTL_LIBS endef define DHCP_INSTALL_SERVER mkdir -p $(TARGET_DIR)/var/lib - (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp) + (cd $(TARGET_DIR)/var/lib; ln -snf ../../tmp dhcp) $(MAKE) -C $(@D)/server DESTDIR=$(TARGET_DIR) install-sbinPROGRAMS $(INSTALL) -m 0644 -D package/dhcp/dhcpd.conf \ $(TARGET_DIR)/etc/dhcp/dhcpd.conf @@ -117,7 +117,7 @@ endif ifeq ($(BR2_PACKAGE_DHCP_RELAY),y) define DHCP_INSTALL_RELAY mkdir -p $(TARGET_DIR)/var/lib - (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp) + (cd $(TARGET_DIR)/var/lib; ln -snf ../../tmp dhcp) $(MAKE) -C $(@D)/relay DESTDIR=$(TARGET_DIR) install-sbinPROGRAMS endef endif @@ -125,7 +125,7 @@ endif ifeq ($(BR2_PACKAGE_DHCP_CLIENT),y) define DHCP_INSTALL_CLIENT mkdir -p $(TARGET_DIR)/var/lib - (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp) + (cd $(TARGET_DIR)/var/lib; ln -snf ../../tmp dhcp) $(MAKE) -C $(@D)/client DESTDIR=$(TARGET_DIR) sbindir=/sbin \ install-sbinPROGRAMS $(INSTALL) -m 0644 -D package/dhcp/dhclient.conf \ From f337ec5930cb5dfabfbe459e3b9e884f2e9ab7c2 Mon Sep 17 00:00:00 2001 From: mhungerford-cpi Date: Wed, 14 Apr 2021 22:12:55 -0700 Subject: [PATCH 04/42] package/raw2rgbpnm: add raw2rgbpnm package and patches This creates a new buildroot package for raw2rgbpnm raw image debayering tool under the graphics section. This tool converts raw camera images to pnm images. Include support for grbg12 and for generic high-aligned bit shifting (when data is aligned to bit 16 and not bit 0). In the IMX-isi case data is aligned to bit 14. Patch 0001 adds bggr12 support. Patch 0002 adds png output support. Signed-off-by: mhungerford-cpi Signed-off-by: Charles Hardin --- package/Config.in | 1 + ...dd-bggr12-format-and-bggr-workaround.patch | 92 +++++++++++++++++++ .../raw2rgbpnm/0002-add-libpng-support.patch | 54 +++++++++++ package/raw2rgbpnm/Config.in | 5 + package/raw2rgbpnm/raw2rgbpnm.hash | 3 + package/raw2rgbpnm/raw2rgbpnm.mk | 22 +++++ 6 files changed, 177 insertions(+) create mode 100644 package/raw2rgbpnm/0001-add-bggr12-format-and-bggr-workaround.patch create mode 100644 package/raw2rgbpnm/0002-add-libpng-support.patch create mode 100644 package/raw2rgbpnm/Config.in create mode 100644 package/raw2rgbpnm/raw2rgbpnm.hash create mode 100644 package/raw2rgbpnm/raw2rgbpnm.mk diff --git a/package/Config.in b/package/Config.in index 33039331f7..820d04a776 100644 --- a/package/Config.in +++ b/package/Config.in @@ -362,6 +362,7 @@ comment "Graphic libraries" source "package/ocrad/Config.in" source "package/ogre/Config.in" source "package/psplash/Config.in" + source "package/raw2rgbpnm/Config.in" source "package/sdl/Config.in" source "package/sdl_gfx/Config.in" source "package/sdl_image/Config.in" diff --git a/package/raw2rgbpnm/0001-add-bggr12-format-and-bggr-workaround.patch b/package/raw2rgbpnm/0001-add-bggr12-format-and-bggr-workaround.patch new file mode 100644 index 0000000000..37241a411e --- /dev/null +++ b/package/raw2rgbpnm/0001-add-bggr12-format-and-bggr-workaround.patch @@ -0,0 +1,92 @@ +--- a/raw2rgbpnm.c 2021-04-03 23:42:27.329337891 -0700 ++++ b/raw2rgbpnm.c 2021-04-23 17:37:52.460119251 -0700 +@@ -109,6 +109,7 @@ static const struct format_info { + { V4L2_PIX_FMT_SGRBG10, 16, "SGRBG10 (10bit raw bayer)", 0, 0 }, + { V4L2_PIX_FMT_SGRBG10DPCM8, 8, "SGRBG10DPCM8 (10bit raw bayer DPCM compressed to 8 bits)", 0, 0 }, + { V4L2_PIX_FMT_SGRBG12, 16, "SGRBG12 (12bit raw bayer)", 0, 0 }, ++ { V4L2_PIX_FMT_SBGGR12, 16, "SBGGR12 (12bit raw bayer)", 0, 0 }, + { V4L2_PIX_FMT_SBGGR16, 16, "SBGGR16 (16 BGBG.. GRGR..)", 0, 0 }, + { V4L2_PIX_FMT_SGRBG16, 16, "SGRBG16 (16 GRGR.. BGBG..)", 0, 0 }, + }; +@@ -479,10 +480,8 @@ static void raw_to_rgb(const struct form + for (dst_x=0; dst_x>= 6; +- else +- v >>= shift; ++ v >>= highbits; ++ v >>= shift; + if (v<0 || v>=(1<<10)) + printf("WARNING: bayer image pixel values out of range (%i)\n", v); + v *= brightness; +@@ -506,6 +505,41 @@ static void raw_to_rgb(const struct form + } + free(buf); + break; ++ case V4L2_PIX_FMT_SBGGR12: ++ shift += 2; // utilize bay2rgb10 by shifting off 2 bits ++ for (dst_y=0; dst_y>= highbits; ++ v >>= shift; ++ if (v<0 || v>=(1<<10)) ++ printf("WARNING: bayer image pixel values out of range (%i)\n", v); ++ v *= brightness; ++ v >>= 8; ++ if (v < 0) v = 0; ++ if (v >= (1<<10)) v = (1<<10)-1; ++ *p = v; ++ } ++ } ++ ++ // Work around missing SBGGR support by skipping the first row ++ src += src_stride; ++ src_size[1]--; ++ ++ buf = malloc(src_size[0] * src_size[1] * 3); ++ if (buf==NULL) error("out of memory"); ++ qc_imag_bay2rgb10(src, src_stride, buf, src_size[0]*3, src_size[0], src_size[1], 3); ++ for (dst_y=0; dst_y expect bad colors\n"); +@@ -651,7 +685,7 @@ int main(int argc, char *argv[]) + int n = 0, multiple = 0; + + for (;;) { +- int c = getopt(argc, argv, "a:b:f:ghs:w"); ++ int c = getopt(argc, argv, "a:b:f:g:hs:w"); + if (c==-1) break; + switch (c) { + case 'a': +@@ -687,7 +721,7 @@ int main(int argc, char *argv[]) + } + break; + case 'g': +- highbits = 1; ++ highbits = MIN(atoi(optarg), 6); + break; + case 'h': + printf("%s - Convert headerless raw image to RGB file (PNM)\n" +@@ -695,7 +729,7 @@ int main(int argc, char *argv[]) + "-a Select algorithm, use \"-a ?\" for a list\n" + "-b Set brightness (multiplier) to output image (float, default 1.0)\n" + "-f Specify input file format format (-f ? for list, default UYVY)\n" +- "-g Use high bits for Bayer RAW 10 data\n" ++ "-g Shift additional bits for high-aligned Bayer RAW 10 data\n" + "-h Show this help\n", + "-n Assume multiple input frames, extract several PNM files\n" + "-s Specify image size\n" diff --git a/package/raw2rgbpnm/0002-add-libpng-support.patch b/package/raw2rgbpnm/0002-add-libpng-support.patch new file mode 100644 index 0000000000..caeb932ab8 --- /dev/null +++ b/package/raw2rgbpnm/0002-add-libpng-support.patch @@ -0,0 +1,54 @@ +--- a/Makefile 2021-04-03 22:25:20.201260817 -0700 ++++ b/Makefile 2021-04-03 23:53:04.509043771 -0700 +@@ -1,8 +1,9 @@ + CROSS_COMPILE ?= + + CC := $(CROSS_COMPILE)gcc +-CFLAGS ?= -O2 -W -Wall -Iinclude ++CFLAGS ?= -O3 -W -Wall -Iinclude + LDFLAGS ?= ++LDLIBS := -lpng -lz + + %.o : %.c + $(CC) $(CFLAGS) -c -o $@ $< +--- a/raw2rgbpnm.c 2021-04-03 23:42:27.329337891 -0700 ++++ b/raw2rgbpnm.c 2021-04-06 10:05:32.245342294 -0700 +@@ -34,6 +34,7 @@ + #include "utils.h" + #include "raw_to_rgb.h" + #include "yuv_to_rgb.h" ++#include "png.h" + + #ifndef V4L2_PIX_FMT_SGRBG10 + #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B','A','1','0') /* 10bit raw bayer */ +@@ -738,12 +739,24 @@ int main(int argc, char *argv[]) + raw_to_rgb(info, src, size, dst); + sprintf(multi_file_out, "%s-%03i.pnm", file_out, n); + printf("Writing to file `%s'...\n", multiple ? multi_file_out : file_out); +- f = fopen(multiple ? multi_file_out : file_out, "wb"); +- if (!f) error("file open failed"); +- fprintf(f, "P6\n%i %i\n255\n", size[0], size[1]); +- r = fwrite(dst, size[0]*size[1]*3, 1, f); +- if (r!=1) error("write failed"); +- fclose(f); ++ if (strncmp(&file_out[strlen(file_out) - 4], ".png", 4) == 0) { ++ // Encode to RGB24 PNG ++ png_image image = {0}; ++ image.version = PNG_IMAGE_VERSION; ++ image.format = PNG_FORMAT_RGB; ++ image.width = size[0]; ++ image.height = size[1]; ++ png_image_write_to_file(&image, multiple ? multi_file_out : file_out, ++ 0, dst, 0, NULL); ++ } else { ++ // Default output is PNM ++ f = fopen(multiple ? multi_file_out : file_out, "wb"); ++ if (!f) error("file open failed"); ++ fprintf(f, "P6\n%i %i\n255\n", size[0], size[1]); ++ r = fwrite(dst, size[0]*size[1]*3, 1, f); ++ if (r!=1) error("write failed"); ++ fclose(f); ++ } + if (!multiple) break; + src = read_raw_data(file_in, ++n, size, info->bpp); + } while (src != NULL); diff --git a/package/raw2rgbpnm/Config.in b/package/raw2rgbpnm/Config.in new file mode 100644 index 0000000000..83c591cd16 --- /dev/null +++ b/package/raw2rgbpnm/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_RAW2RGBPNM + bool "raw2rgbpnm" + select BR2_PACKAGE_LIBPNG + help + Convert raw Bayer images to netpbm format diff --git a/package/raw2rgbpnm/raw2rgbpnm.hash b/package/raw2rgbpnm/raw2rgbpnm.hash new file mode 100644 index 0000000000..3d054067de --- /dev/null +++ b/package/raw2rgbpnm/raw2rgbpnm.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE +sha256 fdf678024edb6544d7b02651fc0e173b5a31f4872978cbf98061bcfb55cfac03 raw2rgbpnm-b1fa387de809b18208ae9660e0593023af85c333-br1.tar.gz diff --git a/package/raw2rgbpnm/raw2rgbpnm.mk b/package/raw2rgbpnm/raw2rgbpnm.mk new file mode 100644 index 0000000000..b28bb6e684 --- /dev/null +++ b/package/raw2rgbpnm/raw2rgbpnm.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# raw2rgbpnm +# +################################################################################ + +RAW2RGBPNM_VERSION = b1fa387de809b18208ae9660e0593023af85c333 +RAW2RGBPNM_SITE = git://salottisipuli.retiisi.org.uk/~sailus/raw2rgbpnm.git +RAW2RGBPNM_LICENSE = GPL-2.0 +RAW2RGBPNM_LICENSE_FILES = LICENSE + +RAW2RGBPNM_DEPENDENCIES = libpng + +define RAW2RGBPNM_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define RAW2RGBPNM_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/raw2rgbpnm $(TARGET_DIR)/usr/bin/raw2rgbpnm +endef + +$(eval $(generic-package)) From 47d8e16c75579d4813c951ab66b84f520933608f Mon Sep 17 00:00:00 2001 From: mhungerford-cpi Date: Wed, 26 Feb 2020 17:03:26 +0100 Subject: [PATCH 05/42] package/psplash: point to the customized psplash for ChargePoint The customization requires binary updates for image and font files, so this cannot be patched via the normal buildroot means. So, a fork was made from the upstream project and changed. Also adds support for a new logo image and updates the build process to select the image. Signed-off-by: Shubham Sharma Signed-off-by: Matt Hungerford Signed-off-by: Charles Hardin --- package/psplash/psplash-start.service | 6 ++++++ package/psplash/psplash-systemd.service | 1 + package/psplash/psplash.hash | 2 +- package/psplash/psplash.mk | 11 +++++++---- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/package/psplash/psplash-start.service b/package/psplash/psplash-start.service index b97e883e54..25ae86a14b 100644 --- a/package/psplash/psplash-start.service +++ b/package/psplash/psplash-start.service @@ -3,8 +3,14 @@ Description=Starts Psplash Boot screen DefaultDependencies=no RequiresMountsFor=/run +# Psplash may be installed on some devices without a framebuffer +# so ensure it existed before starting +ConditionPathExists=/dev/fb0 + [Service] +Type=notify ExecStart=/usr/bin/psplash -n +RemainAfterExit=yes [Install] WantedBy=sysinit.target diff --git a/package/psplash/psplash-systemd.service b/package/psplash/psplash-systemd.service index 249aa54039..d7bde41f7f 100644 --- a/package/psplash/psplash-systemd.service +++ b/package/psplash/psplash-systemd.service @@ -7,6 +7,7 @@ RequiresMountsFor=/run [Service] ExecStart=/usr/bin/psplash-systemd +RemainAfterExit=yes [Install] WantedBy=sysinit.target diff --git a/package/psplash/psplash.hash b/package/psplash/psplash.hash index 77090d08f6..5a2434f73e 100644 --- a/package/psplash/psplash.hash +++ b/package/psplash/psplash.hash @@ -1,3 +1,3 @@ # Locally computed -sha256 c9f71754f4606e46212a4851d6c1145e4ae8752fd11a2b40e825f04bf79b22ec psplash-44afb7506d43cca15582b4c5b90ba5580344d75d-br1.tar.gz +sha256 0f2a264129b6b38f5beff31c20a432318bea9ac2575cfd07ed3f19929c65c793 psplash-c2ded1d016139b74c208bf1d38c63b44e2aa8a02.tar.gz sha256 f9c375a1be4a41f7b70301dd83c91cb89e41567478859b77eef375a52d782505 COPYING diff --git a/package/psplash/psplash.mk b/package/psplash/psplash.mk index 69f9bf386d..f912486753 100644 --- a/package/psplash/psplash.mk +++ b/package/psplash/psplash.mk @@ -4,14 +4,16 @@ # ################################################################################ -PSPLASH_VERSION = 44afb7506d43cca15582b4c5b90ba5580344d75d -PSPLASH_SITE = https://git.yoctoproject.org/psplash -PSPLASH_SITE_METHOD = git +PSPLASH_VERSION = c2ded1d016139b74c208bf1d38c63b44e2aa8a02 +PSPLASH_SITE = $(call github,ChargePoint,psplash,$(PSPLASH_VERSION)) PSPLASH_LICENSE = GPL-2.0+ PSPLASH_LICENSE_FILES = COPYING PSPLASH_AUTORECONF = YES PSPLASH_DEPENDENCIES = host-gdk-pixbuf host-pkgconf +PSPLASH_CONF_OPTS += --enable-img-fullscreen +PSPLASH_CONF_OPTS += --with-font=roboto + ifeq ($(BR2_PACKAGE_SYSTEMD),y) PSPLASH_DEPENDENCIES += systemd PSPLASH_CONF_OPTS += --with-systemd @@ -23,7 +25,8 @@ PSPLASH_IMAGE = $(call qstrip,$(BR2_PACKAGE_PSPLASH_IMAGE)) ifneq ($(PSPLASH_IMAGE),) define PSPLASH_COPY_IMAGE - cp $(PSPLASH_IMAGE) $(@D)/base-images/psplash-poky.png + cp $(@D)/base-images/$(PSPLASH_IMAGE) \ + $(@D)/base-images/psplash-chargepoint.png endef PSPLASH_POST_EXTRACT_HOOKS += PSPLASH_COPY_IMAGE From 5682e070a46e42c0c1a5ccc85d929fabdaa5b979 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Tue, 6 Sep 2022 21:04:01 -0700 Subject: [PATCH 06/42] package/psplash: add the start order for the psplash systemd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fifo is created from psplash-start and so only having a Requires lists the dependency on psplash-start but not that this service needs to come after the start. Requires= Similar to Wants=, but declares a stronger requirement dependency. Dependencies of this type may also be configured by adding a symlink to a .requires/ directory accompanying the unit file. If this unit gets activated, the units listed will be activated as well. If one of the other units fails to activate, and an ordering dependency After= on the failing unit is set, this unit will not be started. Besides, with or without specifying After=, this unit will be stopped (or restarted) if one of the other units is explicitly stopped (or restarted). Often, it is a better choice to use Wants= instead of Requires= in order to achieve a system that is more robust when dealing with failing services. Note that this dependency type does not imply that the other unit always has to be in active state when this unit is running. Specifically: failing condition checks (such as ConditionPathExists=, ConditionPathIsSymbolicLink=, … — see below) do not cause the start job of a unit with a Requires= dependency on it to fail. Also, some unit types may deactivate on their own (for example, a service process may decide to exit cleanly, or a device may be unplugged by the user), which is not propagated to units having a Requires= dependency. Use the BindsTo= dependency type together with After= to ensure that a unit may never be in active state without a specific other unit also in active state (see below). Signed-off-by: Charles Hardin --- package/psplash/psplash-systemd.service | 1 + 1 file changed, 1 insertion(+) diff --git a/package/psplash/psplash-systemd.service b/package/psplash/psplash-systemd.service index d7bde41f7f..7e53372d26 100644 --- a/package/psplash/psplash-systemd.service +++ b/package/psplash/psplash-systemd.service @@ -3,6 +3,7 @@ Description=Start psplash-systemd progress communication helper DefaultDependencies=no After=systemd-start.service Requires=psplash-start.service +After=psplash-start.service RequiresMountsFor=/run [Service] From bc0ab1e5e5caa2707ae3ded1bb31a61adf79889f Mon Sep 17 00:00:00 2001 From: Michael Robak Date: Thu, 12 Nov 2020 16:22:14 -0800 Subject: [PATCH 07/42] boot/uboot: add u-boot-dtb.imx.log as target The the logfile "u-boot-dtb.imx.log " contains information required by the Code Signer Tool to correctly sign the image and perform validation during bootup. This file is being added to the build so it can be consumed when a given build is to be signed. Example contents: $ cat u-boot-dtb.imx.log Image Type: Freescale IMX Boot Image Image Ver: 2 (i.MX53/6/7 compatible) Mode: DCD Data Size: 495616 Bytes = 484.00 KiB = 0.47 MiB Load Address: 177ff420 Entry Point: 17800000 HAB Blocks: 177ff400 00000000 00074c00 DCD Blocks: 00910000 0000002c 00000300 --- boot/uboot/uboot.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index dda606a880..d69f8d5b0f 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -88,6 +88,7 @@ endif ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_IMX),y) UBOOT_BINS += u-boot-dtb.imx +UBOOT_BINS += u-boot-dtb.imx.log UBOOT_MAKE_TARGET += u-boot-dtb.imx endif From 48c56274d2b6cead057314bb2035e4de86ae34d5 Mon Sep 17 00:00:00 2001 From: Michael Robak Date: Thu, 8 Oct 2020 14:03:17 -0700 Subject: [PATCH 08/42] package/uboot-tools: add force read pem flag to mkimage In some cases an openssl engine implemented by an HSM vendor will use keys and certs stored directly on the filesystem. For example AWS CloudHSM needs a fake pem file which contains a reference to the acutal private key stored in the HSM. This change adds a command line argument (-m) that forces the logic that eads pem files to be used even if an openssl engine is specified when signing a FIT image. $ mkimage -m -k /path/to/keys -N cloudhsm -F /path/to//file.itb Signed-off-by: Michael Robak --- ...s-add-force-read-pem-flag-to-mkimage.patch | 427 ++++++++++++++++++ 1 file changed, 427 insertions(+) create mode 100644 package/uboot-tools/0005-tools-add-force-read-pem-flag-to-mkimage.patch diff --git a/package/uboot-tools/0005-tools-add-force-read-pem-flag-to-mkimage.patch b/package/uboot-tools/0005-tools-add-force-read-pem-flag-to-mkimage.patch new file mode 100644 index 0000000000..286e7de835 --- /dev/null +++ b/package/uboot-tools/0005-tools-add-force-read-pem-flag-to-mkimage.patch @@ -0,0 +1,427 @@ +From f525abc50be4bc5b9e846b0df698c67c1710ab16 Mon Sep 17 00:00:00 2001 +From: Charles Hardin +Date: Thu, 19 May 2022 11:27:56 -0700 +Subject: [PATCH 1/1] tools: add force read pem flag to mkimage + +In some cases an openssl engine implemented by an HSM vendor will +use keys and certs stored directly on the filesystem. For example +AWS CloudHSM needs a fake pem file which contains a reference to +the acutal private key stored in the HSM. + +This change adds a command line argument (-m) that forces the +logic that eads pem files to be used even if an openssl engine +is specified when signing a FIT image. + + $ mkimage -m -k /path/to/keys -N cloudhsm -F /path/to//file.itb + +Signed-off-by: Michael Robak +Signed-off-by: Charles Hardin +--- + common/image-fit-sig.c | 23 ++++++++++++++--------- + common/image-fit.c | 2 +- + include/image.h | 8 ++++++-- + lib/rsa/rsa-sign.c | 14 +++++++++----- + tools/fit_image.c | 1 + + tools/image-host.c | 29 +++++++++++++++++------------ + tools/imagetool.h | 1 + + tools/mkimage.c | 8 ++++++-- + 8 files changed, 55 insertions(+), 31 deletions(-) + +diff --git a/common/image-fit-sig.c b/common/image-fit-sig.c +index 55ddf1879e..fc51173336 100644 +--- a/common/image-fit-sig.c ++++ b/common/image-fit-sig.c +@@ -67,7 +67,8 @@ struct image_region *fit_region_make_list(const void *fit, + + static int fit_image_setup_verify(struct image_sign_info *info, + const void *fit, int noffset, +- int required_keynode, char **err_msgp) ++ int required_keynode, ++ bool force_pem, char **err_msgp) + { + char *algo_name; + const char *padding_name; +@@ -96,6 +97,7 @@ static int fit_image_setup_verify(struct image_sign_info *info, + info->padding = image_get_padding_algo(padding_name); + info->fdt_blob = gd_fdt_blob(); + info->required_keynode = required_keynode; ++ info->force_pem = force_pem; + printf("%s:%s", algo_name, info->keyname); + + if (!info->checksum || !info->crypto || !info->padding) { +@@ -107,7 +109,8 @@ static int fit_image_setup_verify(struct image_sign_info *info, + } + + int fit_image_check_sig(const void *fit, int noffset, const void *data, +- size_t size, int required_keynode, char **err_msgp) ++ size_t size, int required_keynode, ++ bool force_pem, char **err_msgp) + { + struct image_sign_info info; + struct image_region region; +@@ -116,7 +119,7 @@ int fit_image_check_sig(const void *fit, int noffset, const void *data, + + *err_msgp = NULL; + if (fit_image_setup_verify(&info, fit, noffset, required_keynode, +- err_msgp)) ++ force_pem, err_msgp)) + return -1; + + if (fit_image_hash_get_value(fit, noffset, &fit_value, +@@ -160,7 +163,7 @@ static int fit_image_verify_sig(const void *fit, int image_noffset, + if (!strncmp(name, FIT_SIG_NODENAME, + strlen(FIT_SIG_NODENAME))) { + ret = fit_image_check_sig(fit, noffset, data, +- size, -1, &err_msg); ++ size, -1, false, &err_msg); + if (ret) { + puts("- "); + } else { +@@ -243,7 +246,7 @@ int fit_image_verify_required_sigs(const void *fit, int image_noffset, + */ + static int fit_config_check_sig(const void *fit, int noffset, + int required_keynode, int conf_noffset, +- char **err_msgp) ++ bool force_pem, char **err_msgp) + { + char * const exc_prop[] = {"data", "data-size", "data-position"}; + const char *prop, *end, *name; +@@ -264,7 +267,7 @@ static int fit_config_check_sig(const void *fit, int noffset, + fit_get_name(gd_fdt_blob(), required_keynode, NULL)); + *err_msgp = NULL; + if (fit_image_setup_verify(&info, fit, noffset, required_keynode, +- err_msgp)) ++ force_pem, err_msgp)) + return -1; + + if (fit_image_hash_get_value(fit, noffset, &fit_value, +@@ -366,7 +369,8 @@ static int fit_config_check_sig(const void *fit, int noffset, + } + + static int fit_config_verify_sig(const void *fit, int conf_noffset, +- const void *sig_blob, int sig_offset) ++ const void *sig_blob, int sig_offset, ++ bool force_pem) + { + int noffset; + char *err_msg = "No 'signature' subnode found"; +@@ -380,7 +384,8 @@ static int fit_config_verify_sig(const void *fit, int conf_noffset, + if (!strncmp(name, FIT_SIG_NODENAME, + strlen(FIT_SIG_NODENAME))) { + ret = fit_config_check_sig(fit, noffset, sig_offset, +- conf_noffset, &err_msg); ++ conf_noffset, force_pem, ++ &err_msg); + if (ret) { + puts("- "); + } else { +@@ -454,7 +459,7 @@ static int fit_config_verify_required_sigs(const void *fit, int conf_noffset, + reqd_sigs++; + + ret = fit_config_verify_sig(fit, conf_noffset, sig_blob, +- noffset); ++ noffset, false); + if (ret) { + if (reqd_policy_all) { + printf("Failed to verify required signature '%s'\n", +diff --git a/common/image-fit.c b/common/image-fit.c +index e614643fe3..ecdb9b4245 100644 +--- a/common/image-fit.c ++++ b/common/image-fit.c +@@ -1327,7 +1327,7 @@ int fit_image_verify_with_data(const void *fit, int image_noffset, + !strncmp(name, FIT_SIG_NODENAME, + strlen(FIT_SIG_NODENAME))) { + ret = fit_image_check_sig(fit, noffset, data, +- size, -1, &err_msg); ++ size, -1, false, &err_msg); + + /* + * Show an indication on failure, but do not return +diff --git a/include/image.h b/include/image.h +index 459685d4d4..5d3edfa31d 100644 +--- a/include/image.h ++++ b/include/image.h +@@ -1124,6 +1124,7 @@ int fit_cipher_data(const char *keydir, void *keydest, void *fit, + * @comment: Comment to add to signature nodes + * @require_keys: Mark all keys as 'required' + * @engine_id: Engine to use for signing ++ * @force_pem: Force read PEM file if openssl engine is used + * @cmdname: Command name used when reporting errors + * + * Adds hash values for all component images in the FIT blob. +@@ -1139,7 +1140,7 @@ int fit_cipher_data(const char *keydir, void *keydest, void *fit, + int fit_add_verification_data(const char *keydir, const char *keyfile, + void *keydest, void *fit, const char *comment, + int require_keys, const char *engine_id, +- const char *cmdname); ++ bool force_pem, const char *cmdname); + + int fit_image_verify_with_data(const void *fit, int image_noffset, + const void *data, size_t size); +@@ -1278,6 +1279,7 @@ struct image_sign_info { + int required_keynode; /* Node offset of key to use: -1=any */ + const char *require_keys; /* Value for 'required' property */ + const char *engine_id; /* Engine to use for signing */ ++ bool force_pem; /* Force read PEM file */ + /* + * Note: the following two fields are always valid even w/o + * RSA_VERIFY_WITH_PKEY in order to make sure this structure is +@@ -1424,12 +1426,14 @@ int fit_image_verify_required_sigs(const void *fit, int image_noffset, + * if any. If this is given, then the image wil not + * pass verification unless that key is used. If this is + * -1 then any signature will do. ++ * @force_pem: Force read PEM file if openssl engine is used + * @err_msgp: In the event of an error, this will be pointed to a + * help error string to display to the user. + * @return 0 if all verified ok, <0 on error + */ + int fit_image_check_sig(const void *fit, int noffset, const void *data, +- size_t size, int required_keynode, char **err_msgp); ++ size_t size, int required_keynode, bool force_pem, ++ char **err_msgp); + + int fit_image_decrypt_data(const void *fit, + int image_noffset, int cipher_noffset, +diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c +index 5a1583b8f7..5d70e1ec46 100644 +--- a/lib/rsa/rsa-sign.c ++++ b/lib/rsa/rsa-sign.c +@@ -170,14 +170,16 @@ static int rsa_engine_get_pub_key(const char *keydir, const char *name, + * + * @keydir: Directory containing the key (PEM file) or key prefix (engine) + * @name Name of key file (will have a .crt extension) ++ * @force_pem Force reading keys from file even if Engine is used + * @engine Engine to use + * @evpp Returns EVP_PKEY object, or NULL on failure + * @return 0 if ok, -ve on error (in which case *evpp will be set to NULL) + */ + static int rsa_get_pub_key(const char *keydir, const char *name, ++ bool force_pem, + ENGINE *engine, EVP_PKEY **evpp) + { +- if (engine) ++ if (engine && !force_pem) + return rsa_engine_get_pub_key(keydir, name, engine, evpp); + return rsa_pem_get_pub_key(keydir, name, evpp); + } +@@ -297,14 +299,16 @@ static int rsa_engine_get_priv_key(const char *keydir, const char *name, + * + * @keydir: Directory containing the key (PEM file) or key prefix (engine) + * @name Name of key ++ * @force_pem Force reading keys from file even if Engine is used + * @engine Engine to use for signing + * @evpp Returns EVP_PKEY object, or NULL on failure + * @return 0 if ok, -ve on error (in which case *evpp will be set to NULL) + */ + static int rsa_get_priv_key(const char *keydir, const char *name, +- const char *keyfile, ENGINE *engine, EVP_PKEY **evpp) ++ const char *keyfile, ++ bool force_pem, ENGINE *engine, EVP_PKEY **evpp) + { +- if (engine) ++ if (engine && !force_pem) + return rsa_engine_get_priv_key(keydir, name, keyfile, engine, + evpp); + return rsa_pem_get_priv_key(keydir, name, keyfile, evpp); +@@ -506,7 +510,7 @@ int rsa_sign(struct image_sign_info *info, + } + + ret = rsa_get_priv_key(info->keydir, info->keyname, info->keyfile, +- e, &pkey); ++ info->force_pem, e, &pkey); + if (ret) + goto err_priv; + ret = rsa_sign_with_key(pkey, info->padding, info->checksum, region, +@@ -672,7 +676,7 @@ int rsa_add_verify_data(struct image_sign_info *info, void *keydest) + if (ret) + return ret; + } +- ret = rsa_get_pub_key(info->keydir, info->keyname, e, &pkey); ++ ret = rsa_get_pub_key(info->keydir, info->keyname, info->force_pem, e, &pkey); + if (ret) + goto err_get_pub_key; + #if OPENSSL_VERSION_NUMBER < 0x10100000L || \ +diff --git a/tools/fit_image.c b/tools/fit_image.c +index ae30f80783..f7a61c5194 100644 +--- a/tools/fit_image.c ++++ b/tools/fit_image.c +@@ -73,6 +73,7 @@ static int fit_add_file_data(struct image_tool_params *params, size_t size_inc, + params->comment, + params->require_keys, + params->engine_id, ++ params->force_pem, + params->cmdname); + } + +diff --git a/tools/image-host.c b/tools/image-host.c +index 270d36fe45..a744385a21 100644 +--- a/tools/image-host.c ++++ b/tools/image-host.c +@@ -155,7 +155,7 @@ static int fit_image_write_sig(void *fit, int noffset, uint8_t *value, + static int fit_image_setup_sig(struct image_sign_info *info, + const char *keydir, const char *keyfile, void *fit, + const char *image_name, int noffset, const char *require_keys, +- const char *engine_id) ++ const char *engine_id, bool force_pem) + { + const char *node_name; + char *algo_name; +@@ -182,6 +182,7 @@ static int fit_image_setup_sig(struct image_sign_info *info, + info->padding = image_get_padding_algo(padding_name); + info->require_keys = require_keys; + info->engine_id = engine_id; ++ info->force_pem = force_pem; + if (!info->checksum || !info->crypto) { + printf("Unsupported signature algorithm (%s) for '%s' signature node in '%s' image node\n", + algo_name, node_name, image_name); +@@ -213,7 +214,7 @@ static int fit_image_process_sig(const char *keydir, const char *keyfile, + void *keydest, void *fit, const char *image_name, + int noffset, const void *data, size_t size, + const char *comment, int require_keys, const char *engine_id, +- const char *cmdname) ++ bool force_pem, const char *cmdname) + { + struct image_sign_info info; + struct image_region region; +@@ -224,7 +225,7 @@ static int fit_image_process_sig(const char *keydir, const char *keyfile, + + if (fit_image_setup_sig(&info, keydir, keyfile, fit, image_name, + noffset, require_keys ? "image" : NULL, +- engine_id)) ++ engine_id, force_pem)) + return -1; + + node_name = fit_get_name(fit, noffset, NULL); +@@ -604,7 +605,7 @@ int fit_image_cipher_data(const char *keydir, void *keydest, + int fit_image_add_verification_data(const char *keydir, const char *keyfile, + void *keydest, void *fit, int image_noffset, + const char *comment, int require_keys, const char *engine_id, +- const char *cmdname) ++ bool force_pem, const char *cmdname) + { + const char *image_name; + const void *data; +@@ -641,7 +642,8 @@ int fit_image_add_verification_data(const char *keydir, const char *keyfile, + strlen(FIT_SIG_NODENAME))) { + ret = fit_image_process_sig(keydir, keyfile, keydest, + fit, image_name, noffset, data, size, +- comment, require_keys, engine_id, cmdname); ++ comment, require_keys, engine_id, ++ force_pem, cmdname); + } + if (ret) + return ret; +@@ -925,7 +927,8 @@ static int fit_config_get_data(void *fit, int conf_noffset, int noffset, + static int fit_config_process_sig(const char *keydir, const char *keyfile, + void *keydest, void *fit, const char *conf_name, + int conf_noffset, int noffset, const char *comment, +- int require_keys, const char *engine_id, const char *cmdname) ++ int require_keys, const char *engine_id, ++ bool force_pem, const char *cmdname) + { + struct image_sign_info info; + const char *node_name; +@@ -943,7 +946,8 @@ static int fit_config_process_sig(const char *keydir, const char *keyfile, + return -1; + + if (fit_image_setup_sig(&info, keydir, keyfile, fit, conf_name, noffset, +- require_keys ? "conf" : NULL, engine_id)) ++ require_keys ? "conf" : NULL, engine_id, ++ force_pem)) + return -1; + + ret = info.crypto->sign(&info, region, region_count, &value, +@@ -990,7 +994,7 @@ static int fit_config_process_sig(const char *keydir, const char *keyfile, + static int fit_config_add_verification_data(const char *keydir, + const char *keyfile, void *keydest, void *fit, int conf_noffset, + const char *comment, int require_keys, const char *engine_id, +- const char *cmdname) ++ bool force_pem, const char *cmdname) + { + const char *conf_name; + int noffset; +@@ -1009,7 +1013,7 @@ static int fit_config_add_verification_data(const char *keydir, + strlen(FIT_SIG_NODENAME))) { + ret = fit_config_process_sig(keydir, keyfile, keydest, + fit, conf_name, conf_noffset, noffset, comment, +- require_keys, engine_id, cmdname); ++ require_keys, engine_id, force_pem, cmdname); + } + if (ret) + return ret; +@@ -1056,7 +1060,7 @@ int fit_cipher_data(const char *keydir, void *keydest, void *fit, + int fit_add_verification_data(const char *keydir, const char *keyfile, + void *keydest, void *fit, const char *comment, + int require_keys, const char *engine_id, +- const char *cmdname) ++ bool force_pem, const char *cmdname) + { + int images_noffset, confs_noffset; + int noffset; +@@ -1080,7 +1084,7 @@ int fit_add_verification_data(const char *keydir, const char *keyfile, + */ + ret = fit_image_add_verification_data(keydir, keyfile, keydest, + fit, noffset, comment, require_keys, engine_id, +- cmdname); ++ force_pem, cmdname); + if (ret) + return ret; + } +@@ -1104,7 +1108,8 @@ int fit_add_verification_data(const char *keydir, const char *keyfile, + ret = fit_config_add_verification_data(keydir, keyfile, keydest, + fit, noffset, comment, + require_keys, +- engine_id, cmdname); ++ engine_id, force_pem, ++ cmdname); + if (ret) + return ret; + } +diff --git a/tools/imagetool.h b/tools/imagetool.h +index e229a34ffc..f48e7b3be3 100644 +--- a/tools/imagetool.h ++++ b/tools/imagetool.h +@@ -83,6 +83,7 @@ struct image_tool_params { + int bl_len; /* Block length in byte for external data */ + const char *engine_id; /* Engine to use for signing */ + bool reset_timestamp; /* Reset the timestamp on an existing image */ ++ bool force_pem; /* Force read pem files Engine is used */ + }; + + /* +diff --git a/tools/mkimage.c b/tools/mkimage.c +index cc7b242faf..4cd03ac749 100644 +--- a/tools/mkimage.c ++++ b/tools/mkimage.c +@@ -113,7 +113,8 @@ static void usage(const char *msg) + " -F => re-sign existing FIT image\n" + " -p => place external data at a static position\n" + " -r => mark keys used as 'required' in dtb\n" +- " -N => openssl engine to use for signing\n"); ++ " -N => openssl engine to use for signing\n" ++ " -m => force read PEM file with openssl engine\n"); + #else + fprintf(stderr, + "Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)\n"); +@@ -152,7 +153,7 @@ static void process_args(int argc, char **argv) + int opt; + + while ((opt = getopt(argc, argv, +- "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) { ++ "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:lmn:N:p:O:rR:qstT:vVx")) != -1) { + switch (opt) { + case 'a': + params.addr = strtoull(optarg, &ptr, 16); +@@ -242,6 +243,9 @@ static void process_args(int argc, char **argv) + case 'l': + params.lflag = 1; + break; ++ case 'm': ++ params.force_pem = true; ++ break; + case 'n': + params.imagename = optarg; + break; +-- +2.32.1 (Apple Git-133) + From 0e41c937d886fcb08a8cea33b30814214bf82efb Mon Sep 17 00:00:00 2001 From: Aswath Gajendran Date: Wed, 9 Feb 2022 21:52:16 +0000 Subject: [PATCH 09/42] package/imx-seco: add choices for imx8 socs Changes added to select ahab container image for different imx8 socs including imx8dxl. Signed-off-by: Aswath Gajendran --- package/freescale-imx/imx-seco/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/freescale-imx/imx-seco/Config.in b/package/freescale-imx/imx-seco/Config.in index 7abdd7eb0d..a9a2e92a3e 100644 --- a/package/freescale-imx/imx-seco/Config.in +++ b/package/freescale-imx/imx-seco/Config.in @@ -32,7 +32,7 @@ config BR2_PACKAGE_IMX_SECO_MX8DXLA1 config BR2_PACKAGE_IMX_SECO_MX8DXLB0 bool "imx-seco-mx8dxlb0" - depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL + depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X config BR2_PACKAGE_IMX_SECO_MX8QMB0 bool "imx-seco-mx8qmb0" From 8e9bb8e12229647117c25ab511a2db00bf4cc88d Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Wed, 12 May 2021 18:52:40 -0700 Subject: [PATCH 10/42] package/libcoap: enable the examples for interop testing There is an example coap-client that is particularly useful for debugging interactions against various coap servers running on different endpoints. Signed-off-by: Charles Hardin --- package/libcoap/libcoap.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/libcoap/libcoap.mk b/package/libcoap/libcoap.mk index 29161142f6..fe35bbbbb6 100644 --- a/package/libcoap/libcoap.mk +++ b/package/libcoap/libcoap.mk @@ -12,7 +12,7 @@ LIBCOAP_LICENSE_FILES = COPYING LICENSE LIBCOAP_CPE_ID_VENDOR = libcoap LIBCOAP_DEPENDENCIES = host-pkgconf LIBCOAP_CONF_OPTS = \ - --disable-examples --disable-examples-source --without-tinydtls + --enable-examples --enable-examples-source --without-tinydtls LIBCOAP_AUTORECONF = YES # 0001-coap_oscore-c-Fix-parsing-OSCORE-configuration-information.patch From 401f045e9ea26014d4eb21731856b4410a9fdb99 Mon Sep 17 00:00:00 2001 From: Jeff Hart Date: Fri, 6 Aug 2021 18:33:00 -0700 Subject: [PATCH 11/42] package/systemd: set options for resolver mode systemd-resolved has a single hardlink set to compat mode which does not allow for features such as DNS caching and other fun things. This choice allows the hard-link to be changed between a couple of operating modes, the default (compat) and the more useful variant stub which allows the resolver to act as a caching daemon. NOTE: systemd recommends default resolver mode Signed-off-by: Jeff Hart --- package/systemd/Config.in | 38 ++++++++++++++++++++++++++++++++++++++ package/systemd/systemd.mk | 8 ++++++++ 2 files changed, 46 insertions(+) diff --git a/package/systemd/Config.in b/package/systemd/Config.in index aa5143d484..7d2fb1fdaf 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -442,6 +442,44 @@ config BR2_PACKAGE_SYSTEMD_RESOLVED https://www.freedesktop.org/software/systemd/man/systemd-resolved.html +if BR2_PACKAGE_SYSTEMD_RESOLVED + +choice + prompt "systemd-resolved mode" + default BR2_PACKAGE_SYSTEMD_RESOLVED_MODE_COMPAT + help + systemd-resolved default operating mode + +config BR2_PACKAGE_SYSTEMD_RESOLVED_MODE_COMPAT + bool "compat mode (resolve.conf managed by service)" + help + systemd-resolved has 4 operating modes. In the + buildroot default mode a hardlink is mainted where + upstream dns servers are written to + /run/systemd/resolve/resolv.conf and hard-linked to + /etc/resolv.conf. This has no benefits of cache or + other settings. + + https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html#/etc/resolv.conf + +config BR2_PACKAGE_SYSTEMD_RESOLVED_MODE_STUB + bool "stub mode (reslove.conf pointed at 127.0.0.53)" + help + systemd-resolved has 4 operating modes. In stub + resovler mode systemd-resolved listens on local + 127.0.0.53:53 and will perform advanced functions + like RR caching, advanced routing and so on. + + In this mode the resolver hard link is set from + /run/systemd/resolve/stub-resolv.conf -> + /etc/resolv.conf + + https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html#/etc/resolv.conf + +endchoice + +endif + config BR2_PACKAGE_SYSTEMD_RFKILL bool "enable rfkill tools" help diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index c6b006d1fb..4c69942e73 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -524,10 +524,18 @@ SYSTEMD_CONF_OPTS += -Dnetworkd=false endif ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y) +ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED_MODE_COMPAT),y) define SYSTEMD_INSTALL_RESOLVCONF_HOOK ln -sf ../run/systemd/resolve/resolv.conf \ $(TARGET_DIR)/etc/resolv.conf endef +endif +ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED_MODE_STUB),y) +define SYSTEMD_INSTALL_RESOLVCONF_HOOK + ln -sf ../run/systemd/resolve/stub-resolv.conf \ + $(TARGET_DIR)/etc/resolv.conf +endef +endif SYSTEMD_CONF_OPTS += -Dnss-resolve=true -Dresolve=true SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - systemd Resolver else From f3ca91b25f660405e2e00c89571b2ebdd5e2c954 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Tue, 22 Feb 2022 19:50:29 -0800 Subject: [PATCH 12/42] package/systemd: add configuration support for SysV compat The compatible flags for the init and rc directories are disabled by default, so allow a configuration option to set the expected paths to /etc/init.d and /etc respectively. This allows a hybrid systemd approach as needed for startup Signed-off-by: Charles Hardin --- package/systemd/Config.in | 9 +++++++++ package/systemd/systemd.mk | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/package/systemd/Config.in b/package/systemd/Config.in index 7d2fb1fdaf..ad09bb7f69 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -616,4 +616,13 @@ config BR2_PACKAGE_SYSTEMD_VCONSOLE_DEFAULT_KEYMAP Default keymap for the system. Leave empty to not set a default keymap. +config BR2_PACKAGE_SYSTEMD_SYSV_COMPAT + bool "enable sysvinit/sysvrcd compat" + help + systemd-sysv-generator creates a wrapper service for sysv + init scripts in /etc/init.d/* at boot and when configuration + of the system manager is reloaded + + https://www.freedesktop.org/software/systemd/man/systemd-sysv-generator.html + endif diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index 4c69942e73..8604b95269 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -93,8 +93,6 @@ SYSTEMD_CONF_OPTS += \ -Dsulogin-path=/usr/sbin/sulogin \ -Dsystem-gid-max=999 \ -Dsystem-uid-max=999 \ - -Dsysvinit-path= \ - -Dsysvrcnd-path= \ -Dtelinit-path= \ -Dtests=false \ -Dtmpfiles=true \ @@ -508,6 +506,12 @@ else SYSTEMD_CONF_OPTS += -Dsysupdate=false endif +ifeq ($(BR2_PACKAGE_SYSTEMD_SYSV_COMPAT),y) +SYSTEMD_CONF_OPTS += -Dsysvinit-path='/etc/init.d' -Dsysvrcnd-path='/etc' +else +SYSTEMD_CONF_OPTS += -Dsysvinit-path='' -Dsysvrcnd-path='' +endif + ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y) SYSTEMD_CONF_OPTS += -Dnetworkd=true SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - systemd Network Management From 352687e799572b6152777b075e31998e541a9fc8 Mon Sep 17 00:00:00 2001 From: Jeff Hart Date: Mon, 20 Sep 2021 20:10:26 -0700 Subject: [PATCH 13/42] package/modemmanaager: enable AT interface with bool flag ModemManager only allows AT commands to be sent over dbus if the --debug option is specified. Add a config option to allow setting the compile-time flag to allow the AT command interface outside of debug-only mode. Signed-off-by: jhart-cpi --- package/modem-manager/Config.in | 7 +++++++ package/modem-manager/modem-manager.mk | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/package/modem-manager/Config.in b/package/modem-manager/Config.in index 6990996a86..bbbf274bf5 100644 --- a/package/modem-manager/Config.in +++ b/package/modem-manager/Config.in @@ -38,6 +38,13 @@ config BR2_PACKAGE_MODEM_MANAGER_LIBQRTR comment "QRTR support needs a toolchain w/ headers >= 4.15" depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15 +config BR2_PACKAGE_MODEM_MANAGER_AT_INTERFACE + bool "Always enable AT commands" + default n + help + This option enables the AT command interface + without --debug flag being required + endif comment "modemmanager needs a toolchain w/ wchar, threads, dynamic library" diff --git a/package/modem-manager/modem-manager.mk b/package/modem-manager/modem-manager.mk index 979a80a8e9..5ccbdf587f 100644 --- a/package/modem-manager/modem-manager.mk +++ b/package/modem-manager/modem-manager.mk @@ -80,6 +80,10 @@ else MODEM_MANAGER_CONF_OPTS += -Dbash_completion=false endif +ifeq ($(BR2_PACKAGE_MODEM_MANAGER_AT_INTERFACE),y) +MODEM_MANAGER_CONF_OPTS += -Dat_command_via_dbus=true +endif + define MODEM_MANAGER_INSTALL_INIT_SYSV $(INSTALL) -m 0755 -D package/modem-manager/S44modem-manager \ $(TARGET_DIR)/etc/init.d/S44modem-manager From b1a8fa40aeeab91234c9e16765f2a56ab515b258 Mon Sep 17 00:00:00 2001 From: Michael Rosen Date: Tue, 15 Feb 2022 15:38:14 -0800 Subject: [PATCH 14/42] package/cmake: add openssl dependency to cmake Some cmake packages leverage fetching dependencies via FetchContent which requires TLS support in cmake to fetch over secure channels like HTTPS and SSH. Previous concerns around leaking host dependencies seems to have been resolved. Signed-off-by: Michael Rosen --- package/cmake/cmake.mk | 4 ++-- package/libopenssl/libopenssl.mk | 2 ++ package/libzlib/libzlib.mk | 2 ++ package/pkg-generic.mk | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk index 23d00b95c5..dba66daa7e 100644 --- a/package/cmake/cmake.mk +++ b/package/cmake/cmake.mk @@ -21,12 +21,13 @@ CMAKE_IGNORE_CVES = CVE-2016-10642 # host-cmake package, then the (target-)cmake package can be built # using the cmake infrastructure; # * CMake bundles its dependencies within its sources. This is the -# reason why the host-cmake package has no dependencies:, whereas +# reason why the host-cmake package has few dependencies:, whereas # the (target-)cmake package has a lot of dependencies, using only # the system-wide libraries instead of rebuilding and statically # linking with the ones bundled into the CMake sources. CMAKE_DEPENDENCIES = zlib jsoncpp libcurl libarchive expat bzip2 xz libuv rhash +HOST_CMAKE_DEPENDENCIES = host-openssl CMAKE_CONF_OPTS = \ -DKWSYS_LFS_WORKS=TRUE \ @@ -58,7 +59,6 @@ define HOST_CMAKE_CONFIGURE_CMDS -DCMAKE_C_FLAGS="$(HOST_CMAKE_CFLAGS)" \ -DCMAKE_CXX_FLAGS="$(HOST_CMAKE_CXXFLAGS)" \ -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)" \ - -DCMAKE_USE_OPENSSL:BOOL=OFF \ -DBUILD_CursesDialog=OFF \ ) endef diff --git a/package/libopenssl/libopenssl.mk b/package/libopenssl/libopenssl.mk index feb5026c02..acd04f7e58 100644 --- a/package/libopenssl/libopenssl.mk +++ b/package/libopenssl/libopenssl.mk @@ -54,6 +54,8 @@ endif define HOST_LIBOPENSSL_CONFIGURE_CMDS cd $(@D); \ $(HOST_CONFIGURE_OPTS) \ + CC="$(HOSTCC_NOCCACHE)" \ + CXX="$(HOSTCXX_NOCCACHE)" \ ./config \ --prefix=$(HOST_DIR) \ --openssldir=$(HOST_DIR)/etc/ssl \ diff --git a/package/libzlib/libzlib.mk b/package/libzlib/libzlib.mk index bc5092d9a9..d14cab3d85 100644 --- a/package/libzlib/libzlib.mk +++ b/package/libzlib/libzlib.mk @@ -40,6 +40,8 @@ define HOST_LIBZLIB_CONFIGURE_CMDS (cd $(@D); rm -rf config.cache; \ $(HOST_CONFIGURE_ARGS) \ $(HOST_CONFIGURE_OPTS) \ + CC="$(HOSTCC_NOCCACHE)" \ + CXX="$(HOSTCXX_NOCCACHE)" \ ./configure \ --prefix="$(HOST_DIR)" \ --sysconfdir="$(HOST_DIR)/etc" \ diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 577a148c1e..8cdf420e33 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -792,7 +792,7 @@ $(2)_EXTRACT_DEPENDENCIES += \ endif ifeq ($$(BR2_CCACHE),y) -ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate host-ccache host-cmake host-hiredis host-pkgconf host-zstd,$(1)),) +ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate host-ccache host-cmake host-hiredis host%openssl host-pkgconf host%zlib host-zstd,$(1)),) $(2)_DEPENDENCIES += host-ccache endif endif From a1fa8b85d74c55701eaccf1a6676ace3c21c7f1b Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Wed, 11 May 2022 16:54:36 -0700 Subject: [PATCH 15/42] package/sdbus-cpp: add support to build the host stub generator Add a host option to build the xml2cpp-codegen part of the sdbus-cpp package for use in creating adaptor and proxy implementations from the D-Bus IDL. Signed-off-by: David Leeds Signed-off-by: Charles Hardin --- package/sdbus-cpp/Config.in.host | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/sdbus-cpp/Config.in.host b/package/sdbus-cpp/Config.in.host index d62a65ae84..0177a83ae6 100644 --- a/package/sdbus-cpp/Config.in.host +++ b/package/sdbus-cpp/Config.in.host @@ -1,5 +1,8 @@ config BR2_PACKAGE_HOST_SDBUS_CPP bool "host sdbus-c++" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_HOST_SYSTEMD + select BR2_PACKAGE_HOST_PKGCONF depends on BR2_HOST_GCC_AT_LEAST_7 help sdbus-c++ is a high-level C++ D-Bus library for Linux From 551d88aa7588f73fa913e4898fe8e4e1d287bae3 Mon Sep 17 00:00:00 2001 From: Jeff Hart Date: Thu, 17 Sep 2020 11:23:44 -0700 Subject: [PATCH 16/42] package/libwebsockets: add extra cmake LWS_BUILD_HASH arguments if the LWS_BUILD_HASH is not set then default to an unknown value which is expected to avoid a zero length string. Signed-off-by: Jeff Hart Signed-off-by: David Leeds --- .../0001-define-LWS_BUILD_HASH-cmake.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 package/libwebsockets/0001-define-LWS_BUILD_HASH-cmake.patch diff --git a/package/libwebsockets/0001-define-LWS_BUILD_HASH-cmake.patch b/package/libwebsockets/0001-define-LWS_BUILD_HASH-cmake.patch new file mode 100644 index 0000000000..395f464a85 --- /dev/null +++ b/package/libwebsockets/0001-define-LWS_BUILD_HASH-cmake.patch @@ -0,0 +1,14 @@ +diff -Naur libwebsockets-4.2.0.orig/CMakeLists.txt libwebsockets-4.2.0/CMakeLists.txt +--- libwebsockets-4.2.0.orig/CMakeLists.txt 2021-04-15 16:44:02.000000000 +0000 ++++ libwebsockets-4.2.0/CMakeLists.txt 2021-05-08 18:59:08.350508559 +0000 +@@ -366,6 +366,10 @@ + set(LWS_BUILD_HASH ${GIT_USER}@${GIT_HOST}-${GIT_HASH}) + endif() + ++ if ("${LWS_BUILD_HASH}" STREQUAL "") ++ set(LWS_BUILD_HASH "unknown") ++ endif() ++ + message("Git commit hash: ${LWS_BUILD_HASH}") + endif() + From d6c7d5f8822b43a1e0477f0506482bd3bfb2023c Mon Sep 17 00:00:00 2001 From: Jeff Hart Date: Tue, 11 May 2021 12:41:30 -0700 Subject: [PATCH 17/42] package/libwebsockets: add sd-event support if systemd is installed Signed-off-by: Jeff Hart --- package/libwebsockets/libwebsockets.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk index c00c44cac3..84942c9951 100644 --- a/package/libwebsockets/libwebsockets.mk +++ b/package/libwebsockets/libwebsockets.mk @@ -90,6 +90,13 @@ else LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBUV=OFF endif +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +LIBWEBSOCKETS_DEPENDENCIES += systemd +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SDEVENT=ON +else +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SDEVENT=OFF +endif + ifeq ($(BR2_SHARED_LIBS),y) LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_STATIC=OFF endif From dbbf6b227f6644a13e1c5007db0a2380625ab09f Mon Sep 17 00:00:00 2001 From: Jeffrey Hart Date: Fri, 18 Mar 2022 16:21:35 -0700 Subject: [PATCH 18/42] package/libwebsockets: add option to enable or disable netlink support Adds an option that disables or enables netlink at build time. Signed-off-by: Jeffrey Hart --- package/libwebsockets/Config.in | 8 ++++++++ package/libwebsockets/libwebsockets.mk | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/package/libwebsockets/Config.in b/package/libwebsockets/Config.in index 05c132641e..6490c3d081 100644 --- a/package/libwebsockets/Config.in +++ b/package/libwebsockets/Config.in @@ -19,6 +19,14 @@ config BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL unconditionally compiled in for library versions prior to 3.2.0. +config BR2_PACKAGE_LIBWEBSOCKETS_NETLINK + bool "enable netlink monitoring" + default y + help + libwebsockets will track link status with NETLINK + on Linux if avilable. Turn off to prevent potential + issues with IPv6 support. + endif comment "libwebsockets needs a toolchain w/ dynamic library" diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk index 84942c9951..960bc31a73 100644 --- a/package/libwebsockets/libwebsockets.mk +++ b/package/libwebsockets/libwebsockets.mk @@ -105,4 +105,10 @@ ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL),y) LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_EXTERNAL_POLL=ON endif +ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS_NETLINK),y) +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_NETLINK=1 +else +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_NETLINK=0 +endif + $(eval $(cmake-package)) From c67d0be335c80417058c8fc2a265b87b96d7b209 Mon Sep 17 00:00:00 2001 From: jhart-cpi Date: Tue, 30 Aug 2022 15:35:58 -0700 Subject: [PATCH 19/42] package/libwebsockets: add support for doing non-blocking DNS Add kconfig bool for turning on/off libwebsockets non-blocking internal DNS resolver. Signed-off-by: jhart-cpi --- package/libwebsockets/Config.in | 6 ++++++ package/libwebsockets/libwebsockets.mk | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/package/libwebsockets/Config.in b/package/libwebsockets/Config.in index 6490c3d081..f6b4724217 100644 --- a/package/libwebsockets/Config.in +++ b/package/libwebsockets/Config.in @@ -27,6 +27,12 @@ config BR2_PACKAGE_LIBWEBSOCKETS_NETLINK on Linux if avilable. Turn off to prevent potential issues with IPv6 support. +config BR2_PACKAGE_LIBWEBSOCKETS_ASYNCDNS + bool "enable async DNS resolution" + default n + help + Use nonblocking lws internal IPv4 + IPv6 DNS resolver + endif comment "libwebsockets needs a toolchain w/ dynamic library" diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk index 960bc31a73..02a5959ecd 100644 --- a/package/libwebsockets/libwebsockets.mk +++ b/package/libwebsockets/libwebsockets.mk @@ -111,4 +111,11 @@ else LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_NETLINK=0 endif +ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS_ASYNCDNS),y) +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SYS_ASYNC_DNS=ON +else +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SYS_ASYNC_DNS=OFF +endif + + $(eval $(cmake-package)) From dfde67a7f52f15c969e400529cc9c3ee66656e8d Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Sun, 18 Sep 2022 09:03:47 -0700 Subject: [PATCH 20/42] toolchain/toolchain-external: update aarch64 toolchain for host aarch64 The developer arm toolchains do not have a aarch64 host aarch64 target toolchain. This was built using the tools/docker/emb-toolchain-arm dockerfiles on an aarch64 and needed to be uploaded to the build archifacts on its own. Signed-off-by: Charles Hardin --- .../toolchain-external/toolchain-external-arm-aarch64/Config.in | 2 +- .../toolchain-external-arm-aarch64.hash | 1 + .../toolchain-external-arm-aarch64.mk | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in index 2565707def..7958cbe735 100644 --- a/toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in @@ -1,7 +1,7 @@ config BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64 bool "Arm AArch64 13.2.rel1" depends on BR2_aarch64 - depends on BR2_HOSTARCH = "x86_64" + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "aarch64" depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_13 select BR2_TOOLCHAIN_EXTERNAL_GLIBC select BR2_TOOLCHAIN_HAS_SSP diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.hash b/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.hash index 9de90d4b06..69a69b7b66 100644 --- a/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.hash +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.hash @@ -1,2 +1,3 @@ # From https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz.sha256asc sha256 12fcdf13a7430655229b20438a49e8566e26551ba08759922cdaf4695b0d4e23 arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz +sha256 1ea16dfaaca3e8a97c31ba5b441db82ba78b00cf6d3a6f63226bd35b5af3bf8e arm-gnu-toolchain-13.2.rel1-aarch64-aarch64-none-linux-gnu.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.mk b/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.mk index f9adda8921..114fb37655 100644 --- a/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.mk +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.mk @@ -7,6 +7,6 @@ TOOLCHAIN_EXTERNAL_ARM_AARCH64_VERSION = 13.2.rel1 TOOLCHAIN_EXTERNAL_ARM_AARCH64_SITE = https://developer.arm.com/-/media/Files/downloads/gnu/$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_VERSION)/binrel -TOOLCHAIN_EXTERNAL_ARM_AARCH64_SOURCE = arm-gnu-toolchain-$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_VERSION)-x86_64-aarch64-none-linux-gnu.tar.xz +TOOLCHAIN_EXTERNAL_ARM_AARCH64_SOURCE = arm-gnu-toolchain-$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_VERSION)-$(HOSTARCH)-aarch64-none-linux-gnu.tar.xz $(eval $(toolchain-external-package)) From c3db95193da19d73dee62e36470b7954ef1737df Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Tue, 17 Jan 2023 18:13:11 -0800 Subject: [PATCH 21/42] package/qt5{base, declarative}: custom package from license QT 5.15.12 The QT maintainance releases are not publicly available without a license and the 5.15.8 release at the KDE sites has the following issues that prevent it working with gcc11. - QTBUG-106256 qml crash when binding alias to property - QTBUG-100431 Crash in libQt5Qml V4 engine caused by wrong memory - QTBUG-106377 Cannot create QML_SINGLETON class with newer gcc versions So, a qt-everything tarball was downloaded and converted into a buildroot compatible tarball that can be used with the existing recipes. tar -xJf qt-everywhere-src-5.15.12.tar.xz cd qt-everywhere-src-5.15.12 tar --transform=s/^qtbase/qtbase-5.15.12/ \ -cvjf chargepoint-qtbase-5.15.12.tar.bz2 qtbase tar --transform=s/^qtdeclarative/qtdeclarative-5.15.12/ \ -cvjf chargepoint-qtdeclarative-5.15.12.tar.bz2 qtdeclarative NOTE: All buildroot patches are removed with the new version bump Fixes: PLAT-7423 Signed-off-by: Charles Hardin --- ...tbase-Fix-build-error-when-using-EGL.patch | 37 ----------- ...ble-conversion-enable-for-microblaze.patch | 29 --------- ...3-double-conversion-enable-for-nios2.patch | 26 -------- ...-double-conversion-enable-for-xtensa.patch | 29 --------- ...r-obscure-EGLNativeDisplayType-types.patch | 63 ------------------- .../qt5base/0006-Fix-build-on-riscv32.patch | 46 -------------- ...figure.json-fix-atomicfptr-detection.patch | 48 -------------- ...onvenience-add-missing-QList-include.patch | 37 ----------- package/qt5/qt5base/qt5base.hash | 2 +- package/qt5/qt5base/qt5base.mk | 18 +++++- .../qt5/qt5declarative/qt5declarative.hash | 2 +- package/qt5/qt5declarative/qt5declarative.mk | 18 +++++- 12 files changed, 32 insertions(+), 323 deletions(-) delete mode 100644 package/qt5/qt5base/0001-qtbase-Fix-build-error-when-using-EGL.patch delete mode 100644 package/qt5/qt5base/0002-double-conversion-enable-for-microblaze.patch delete mode 100644 package/qt5/qt5base/0003-double-conversion-enable-for-nios2.patch delete mode 100644 package/qt5/qt5base/0004-double-conversion-enable-for-xtensa.patch delete mode 100644 package/qt5/qt5base/0005-eglfs-avoid-breaking-compilation-for-obscure-EGLNativeDisplayType-types.patch delete mode 100644 package/qt5/qt5base/0006-Fix-build-on-riscv32.patch delete mode 100644 package/qt5/qt5base/0007-src-corelib-configure.json-fix-atomicfptr-detection.patch delete mode 100644 package/qt5/qt5base/0008-eglconvenience-add-missing-QList-include.patch diff --git a/package/qt5/qt5base/0001-qtbase-Fix-build-error-when-using-EGL.patch b/package/qt5/qt5base/0001-qtbase-Fix-build-error-when-using-EGL.patch deleted file mode 100644 index 6876498022..0000000000 --- a/package/qt5/qt5base/0001-qtbase-Fix-build-error-when-using-EGL.patch +++ /dev/null @@ -1,37 +0,0 @@ -From c11299086b7718332e2b4fbc37ce6f6ff427c5ba Mon Sep 17 00:00:00 2001 -From: Yuqing Zhu -Date: Mon, 27 Mar 2017 15:33:35 +0800 -Subject: [PATCH] qtbase: Fix build error when using EGL -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit - -A build error was occurring due to missing EGL configuration. - -Fixed by adding the necessary ties to the EGL pkg-config. - -Task-number: QTBUG-61712 -Change-Id: I87190ea39392b4604c563cf9d89edb85068d85fc -Upstream-Status: Pending -Signed-off-by: Gaël PORTAY ---- - mkspecs/features/egl.prf | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/mkspecs/features/egl.prf b/mkspecs/features/egl.prf -index 9fa0c9e219..85d5852ba6 100644 ---- a/mkspecs/features/egl.prf -+++ b/mkspecs/features/egl.prf -@@ -1,3 +1,9 @@ -+# egl headers need a definition -+PKG_CONFIG = $$pkgConfigExecutable() -+PKGCONFIG_CFLAGS = $$system($$PKG_CONFIG --cflags egl) -+PKGCONFIG_CFLAGS = $$find(PKGCONFIG_CFLAGS, ^-D.*) -+QMAKE_CFLAGS_EGL = $$PKGCONFIG_CFLAGS -+ - INCLUDEPATH += $$QMAKE_INCDIR_EGL - LIBS_PRIVATE += $$QMAKE_LIBS_EGL - QMAKE_CFLAGS += $$QMAKE_CFLAGS_EGL --- -2.16.1 - diff --git a/package/qt5/qt5base/0002-double-conversion-enable-for-microblaze.patch b/package/qt5/qt5base/0002-double-conversion-enable-for-microblaze.patch deleted file mode 100644 index a772eb978e..0000000000 --- a/package/qt5/qt5base/0002-double-conversion-enable-for-microblaze.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a02b5e3bb41026ca6031d01942a093e9ce54edf3 Mon Sep 17 00:00:00 2001 -From: Peter Seiderer -Date: Tue, 21 Aug 2018 21:11:40 +0200 -Subject: [PATCH] double-conversion: enable for microblaze - -Signed-off-by: Peter Seiderer -[Rebased for Qt5.12.0] -Signed-off-by: Peter Seiderer -[Rebased for Qt5.14.0] -Signed-off-by: Peter Seiderer ---- - src/3rdparty/double-conversion/include/double-conversion/utils.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h -index 70e697ca..2bb8e389 100644 ---- a/src/3rdparty/double-conversion/include/double-conversion/utils.h -+++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h -@@ -102,6 +102,7 @@ int main(int argc, char** argv) { - defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ - defined(__riscv) || \ - defined(__or1k__) || defined(__arc__) || \ -+ defined(__microblaze__) || \ - defined(__EMSCRIPTEN__) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(__mc68000__) || \ --- -2.23.0 - diff --git a/package/qt5/qt5base/0003-double-conversion-enable-for-nios2.patch b/package/qt5/qt5base/0003-double-conversion-enable-for-nios2.patch deleted file mode 100644 index 79e276b17f..0000000000 --- a/package/qt5/qt5base/0003-double-conversion-enable-for-nios2.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e3f63db3124caf5bde9cf688eba563f7f025662d Mon Sep 17 00:00:00 2001 -From: Peter Seiderer -Date: Sun, 8 Mar 2020 18:08:26 +0100 -Subject: [PATCH] double-conversion: enable for nios2 - -[Upstream: https://github.com/google/double-conversion/commit/a54561be5588ac9b16d3c20760b9b554168bb8aa] -Signed-off-by: Peter Seiderer ---- - src/3rdparty/double-conversion/include/double-conversion/utils.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h -index d29de950..55ca5bf5 100644 ---- a/src/3rdparty/double-conversion/include/double-conversion/utils.h -+++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h -@@ -87,6 +87,7 @@ int main(int argc, char** argv) { - defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \ - defined(__hppa__) || defined(__ia64__) || \ - defined(__mips__) || \ -+ defined(__nios2__) || \ - defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ - defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ - defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ --- -2.25.1 - diff --git a/package/qt5/qt5base/0004-double-conversion-enable-for-xtensa.patch b/package/qt5/qt5base/0004-double-conversion-enable-for-xtensa.patch deleted file mode 100644 index e2ead9bd2c..0000000000 --- a/package/qt5/qt5base/0004-double-conversion-enable-for-xtensa.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f423f160b984c47d831b10447af046bfbd6a3ba1 Mon Sep 17 00:00:00 2001 -From: Peter Seiderer -Date: Tue, 10 Mar 2020 09:01:31 +0100 -Subject: [PATCH] double-conversion: enable for xtensa - -[Upstream: https://github.com/google/double-conversion/commit/a54561be5588ac9b16d3c20760b9b554168bb8aa] -Signed-off-by: Peter Seiderer -[Rebased for qtbase-everywhere-src-5.14.0] -Signed-off-by: Peter Seiderer ---- - .../double-conversion/include/double-conversion/utils.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h -index 89ab1a31..001ce55f 100644 ---- a/src/3rdparty/double-conversion/include/double-conversion/utils.h -+++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h -@@ -103,7 +103,7 @@ int main(int argc, char** argv) { - defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ - defined(__riscv) || \ - defined(__or1k__) || defined(__arc__) || \ -- defined(__microblaze__) || \ -+ defined(__microblaze__) || defined(__XTENSA__) || \ - defined(__EMSCRIPTEN__) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(__mc68000__) || \ --- -2.26.0 - diff --git a/package/qt5/qt5base/0005-eglfs-avoid-breaking-compilation-for-obscure-EGLNativeDisplayType-types.patch b/package/qt5/qt5base/0005-eglfs-avoid-breaking-compilation-for-obscure-EGLNativeDisplayType-types.patch deleted file mode 100644 index 3621cdb2d3..0000000000 --- a/package/qt5/qt5base/0005-eglfs-avoid-breaking-compilation-for-obscure-EGLNativeDisplayType-types.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 0eb7058b473069a04cde60a800dfd04148c0c8b1 Mon Sep 17 00:00:00 2001 -From: Yann E. MORIN -Date: Sat, 14 Dec 2020 21:15:17 +0100 -Subject: [PATCH] plugins/eglfs/gbm: don't FTBFS when EGLNativeDisplayType is not a pointer - -On some platforms, EGLNativeDisplayType is not a pointer, but some kind -of integer, like an int (e.g. TI's SGX) or an unsigned int. In those -cases, the build breaks with: - - qeglfskmsgbmintegration.cpp: In member function ‘virtual void* QEglFSKmsGbmIntegration::createDisplay(EGLNativeDisplayType)’: - qeglfskmsgbmintegration.cpp:83:60: error: invalid conversion from ‘EGLNativeDisplayType’ {aka ‘int’} to ‘void*’ [-fpermissive] - 83 | display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, nativeDisplay, nullptr); - | ^~~~~~~~~~~~~ - | | - | EGLNativeDisplayType {aka int} - -We fix that by casting nativeDisplay to void* as expected by -getPlatformDisplay(). - -We can do that, because usually, nativeDisplay is already a pointer, and -thus this cast is a no-op. When it is not already a pointer, we either -don't care because the code path will not be taken at runtime, or the -integer really is an opaque handle to some internal, low-level memory -management, much like a void* is an pointer to an opaque memory type... - -It is to be noted, though, that in some ABIs (like x32), the size of a -nativeDisplay that is not already a pointer, might be bigger than that -of a pointer. There is not much we can do here anyway, since there would -be no way to fit that in a void* to begin with, and the build will still -fail for those situations. Those types of ABIs are far frome being -widespread, the most prominent one, x32, even being retired... - -To be noted further: a more usual solution (as suggested in QTBUG-72567 -or in Gerrit:248270) would be to first cast to a qintptr or a quintptr, -before finally casting to a void*. However, casting to either (resp.) -qintptr or quintptr first, risk the case that nativeDisplay is of the other -kind of signedness, (resp.) unsigned or signed, which would also cause -some compile-time breakage. - -Finally, if nativeDisplay is something that is not an int-like, and that -can't be cast into a void*, this would be hugely weird, so much so, that -we do not even attempt to catter for that case. - -Fixes: QTBUG-72567 -Inspired-by: https://codereview.qt-project.org/c/qt/qtbase/+/248270 -Signed-off-by: Yann E. MORIN ---- - -diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp -index d495a8d..059a580 100644 ---- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp -+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp -@@ -80,7 +80,9 @@ - } - - if (getPlatformDisplay) { -- display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, nativeDisplay, nullptr); -+ // EGLNativeDisplayType may be int on some platforms but those -+ // won't hit this path. Have to keep it compiling nonetheless. -+ display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, reinterpret_cast(nativeDisplay), nullptr); - } else { - qCDebug(qLcEglfsKmsDebug, "No eglGetPlatformDisplay for GBM, falling back to eglGetDisplay"); - display = eglGetDisplay(nativeDisplay); diff --git a/package/qt5/qt5base/0006-Fix-build-on-riscv32.patch b/package/qt5/qt5base/0006-Fix-build-on-riscv32.patch deleted file mode 100644 index 5561acb9ae..0000000000 --- a/package/qt5/qt5base/0006-Fix-build-on-riscv32.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 035dc537bee26e3b63a211b2835d8560439e161f Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -Date: Fri, 27 Aug 2021 16:28:32 +0200 -Subject: Fix build on riscv32 - -riscv32 fails to build because __NR_futex is not defined on this -architecture: - -In file included from thread/qmutex_linux.cpp:45, - from thread/qmutex.cpp:804: -thread/qfutex_p.h: In function 'int QtLinuxFutex::_q_futex(int*, int, int, quintptr, int*, int)': -thread/qfutex_p.h:116:30: error: '__NR_futex' was not declared in this scope; did you mean '_q_futex'? - 116 | int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3); - | ^~~~~~~~~~ - | _q_futex - -Pick-to: 6.1 6.2 -Fixes: QTBUG-96067 -Change-Id: Ib6a9bcc496f37e69ac39362cb0a021fccaf311f5 -Reviewed-by: Thiago Macieira -[Retrieved from: -https://code.qt.io/cgit/qt/qtbase.git/commit/?id=035dc537bee26e3b63a211b2835d8560439e161f] -Signed-off-by: Fabrice Fontaine ---- - src/corelib/thread/qfutex_p.h | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h -index 40482b6fc1..037207a5c0 100644 ---- a/src/corelib/thread/qfutex_p.h -+++ b/src/corelib/thread/qfutex_p.h -@@ -103,6 +103,11 @@ QT_END_NAMESPACE - // if not defined in linux/futex.h - # define FUTEX_PRIVATE_FLAG 128 // added in v2.6.22 - -+// RISC-V does not supply __NR_futex -+# ifndef __NR_futex -+# define __NR_futex __NR_futex_time64 -+# endif -+ - QT_BEGIN_NAMESPACE - namespace QtLinuxFutex { - constexpr inline bool futexAvailable() { return true; } --- -cgit v1.2.1 - diff --git a/package/qt5/qt5base/0007-src-corelib-configure.json-fix-atomicfptr-detection.patch b/package/qt5/qt5base/0007-src-corelib-configure.json-fix-atomicfptr-detection.patch deleted file mode 100644 index 5f0f81a4bd..0000000000 --- a/package/qt5/qt5base/0007-src-corelib-configure.json-fix-atomicfptr-detection.patch +++ /dev/null @@ -1,48 +0,0 @@ -From e9d1f80dffb4e29e44fc0b0627704af15cdd281a Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -Date: Sun, 13 Mar 2022 12:05:04 +0100 -Subject: [PATCH] src/corelib/configure.json: fix atomicfptr detection - -Fix atomicfptr detection on sparc v8 by linking with libatomic if needed -to avoid the following build failure: - -/sysroot -std=gnu++11 -w -fPIC -I. -I/home/peko/autobuild/instance-0/output-1/build/qt5base-d16bf02a11953dcac01dca73e6f3778f293adefe/mkspecs/devices/linux-buildroot-g++ -o main.o main.cpp -> /home/peko/autobuild/instance-0/output-1/host/bin/sparc-linux-g++ --sysroot=/home/peko/autobuild/instance-0/output-1/host/sparc-buildroot-linux-uclibc/sysroot --sysroot=/home/peko/autobuild/instance-0/output-1/host/sparc-buildroot-linux-uclibc/sysroot -Wl,-O1 -o atomicfptr main.o -lexecinfo -lrt -lpthread -ldl -> /home/peko/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/10.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: main.o: in function `test(std::atomic volatile&)': -> main.cpp:(.text+0x40): undefined reference to `__atomic_compare_exchange_4' -> collect2: error: ld returned 1 exit status -> make[1]: *** [Makefile:69: atomicfptr] Error 1 - -[...] - -ERROR: detected a std::atomic implementation that fails for function pointers. -Please apply the patch corresponding to your Standard Library vendor, found in - qtbase/config.tests/atomicfptr - -Fixes: - - http://autobuild.buildroot.org/results/5a20e984a5536165056b3fbd93b8712e8ddbeed4 - -Signed-off-by: Fabrice Fontaine -[Upstream status: -https://invent.kde.org/qt/qt/qtbase/-/merge_requests/138] ---- - src/corelib/configure.json | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/corelib/configure.json b/src/corelib/configure.json -index 9b5d19d41b..ac88f5856c 100644 ---- a/src/corelib/configure.json -+++ b/src/corelib/configure.json -@@ -309,7 +309,8 @@ - "test(fptr);" - ], - "qmake": "CONFIG += c++11" -- } -+ }, -+ "use": "libatomic" - }, - "clock-monotonic": { - "label": "POSIX monotonic clock", --- -2.34.1 - diff --git a/package/qt5/qt5base/0008-eglconvenience-add-missing-QList-include.patch b/package/qt5/qt5base/0008-eglconvenience-add-missing-QList-include.patch deleted file mode 100644 index c7127291e4..0000000000 --- a/package/qt5/qt5base/0008-eglconvenience-add-missing-QList-include.patch +++ /dev/null @@ -1,37 +0,0 @@ -From f681f428477812e54484f631b0da332cc2e00eaa Mon Sep 17 00:00:00 2001 -From: Peter Seiderer -Date: Wed, 16 Mar 2022 19:08:55 +0100 -Subject: [PATCH] eglconvenience: add missing QList include -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes: - - qeglconvenience.cpp:418:23: error: variable ‘QList extensions’ has initializer but incomplete type - 418 | QList extensions = - | ^~~~~~~~~~ - qeglconvenience.cpp:420:65: error: invalid use of incomplete type ‘class QList’ - 420 | (eglQueryString(display, EGL_EXTENSIONS))).split(' '); - | ^ - -Signed-off-by: Peter Seiderer ---- - src/platformsupport/eglconvenience/qeglconvenience.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp -index 5303d37c..daceeb8b 100644 ---- a/src/platformsupport/eglconvenience/qeglconvenience.cpp -+++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp -@@ -38,6 +38,7 @@ - ****************************************************************************/ - - #include -+#include - #include - - #ifdef Q_OS_LINUX --- -2.35.1 - diff --git a/package/qt5/qt5base/qt5base.hash b/package/qt5/qt5base/qt5base.hash index ffc474f49e..177d13b2c8 100644 --- a/package/qt5/qt5base/qt5base.hash +++ b/package/qt5/qt5base/qt5base.hash @@ -1,5 +1,5 @@ # Locally calculated -sha256 935d01f5c34903ad9e979431cec7a8a59332ed3fc539e639f5ba87e8d6989b9d qtbase-da6e958319e95fe564d3b30c931492dd666bfaff.tar.bz2 +sha256 c9f83ed806a3f080a3ac0347c8cffb00e29ac63a63a34cedf8afd3778afd0455 chargepoint-qtbase-5.15.12.tar.bz2 # Hashes for license files: sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE.GPL2 diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index e173639cca..e5ad7a85ac 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -4,9 +4,21 @@ # ################################################################################ -QT5BASE_VERSION = da6e958319e95fe564d3b30c931492dd666bfaff -QT5BASE_SITE = $(QT5_SITE)/qtbase/-/archive/$(QT5BASE_VERSION) -QT5BASE_SOURCE = qtbase-$(QT5BASE_VERSION).tar.bz2 +# +# Licensed package from QT is not available publicly and so use +# the internal site to download the package. This is generated +# from the qt-everything tarball release as follows. +# +# tar -xJf qt-everywhere-src-5.15.12.tar.xz +# cd qt-everywhere-src-5.15.12 +# tar --transform=s/^qtbase/qtbase-5.15.12/ \ +# -cvjf chargepoint-qtbase-5.15.12.tar.bz2 qtbase +# +# Then publish the resulting tarball into the qt5base directory +# +QT5BASE_VERSION = 5.15.12 +QT5BASE_SITE = $(BR2_PRIMARY_SITE)/qt5base +QT5BASE_SOURCE = chargepoint-qtbase-$(QT5BASE_VERSION).tar.bz2 QT5BASE_CPE_ID_VENDOR = qt QT5BASE_CPE_ID_PRODUCT = qt diff --git a/package/qt5/qt5declarative/qt5declarative.hash b/package/qt5/qt5declarative/qt5declarative.hash index 3db5c94458..004c223277 100644 --- a/package/qt5/qt5declarative/qt5declarative.hash +++ b/package/qt5/qt5declarative/qt5declarative.hash @@ -1,5 +1,5 @@ # Locally calculated -sha256 bebd1205aa087f529b8824f0284e127e08672ff7ce36a6b865cd921514ec1192 qtdeclarative-960a980dc885622cb84990c4da75d5060318302d.tar.bz2 +sha256 a2cad9655b2b15ae8958bac16341d19769a047e3561b39ce383c126893ee7913 chargepoint-qtdeclarative-5.15.12.tar.bz2 # Hashes for license files: sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE.GPL2 diff --git a/package/qt5/qt5declarative/qt5declarative.mk b/package/qt5/qt5declarative/qt5declarative.mk index 99c88e7d06..b9b0d8c103 100644 --- a/package/qt5/qt5declarative/qt5declarative.mk +++ b/package/qt5/qt5declarative/qt5declarative.mk @@ -4,9 +4,21 @@ # ################################################################################ -QT5DECLARATIVE_VERSION = 960a980dc885622cb84990c4da75d5060318302d -QT5DECLARATIVE_SITE = $(QT5_SITE)/qtdeclarative/-/archive/$(QT5DECLARATIVE_VERSION) -QT5DECLARATIVE_SOURCE = qtdeclarative-$(QT5DECLARATIVE_VERSION).tar.bz2 +# +# Licensed package from QT is not available publicly and so use +# the internal site to download the package. This is generated +# from the qt-everything tarball release as follows. +# +# tar -xJf qt-everywhere-src-5.15.12.tar.xz +# cd qt-everywhere-src-5.15.12 +# tar --transform=s/^qtdeclarative/qtbase-5.15.12/ \ +# -cvjf chargepoint-qtdeclarative-5.15.12.tar.bz2 qtdeclarative +# +# Then publish the resulting tarball into the qt5base directory +# +QT5DECLARATIVE_VERSION = 5.15.12 +QT5DECLARATIVE_SITE = $(BR2_PRIMARY_SITE)/qt5declarative +QT5DECLARATIVE_SOURCE = chargepoint-qtdeclarative-$(QT5DECLARATIVE_VERSION).tar.bz2 QT5DECLARATIVE_INSTALL_STAGING = YES QT5DECLARATIVE_SYNC_QT_HEADERS = YES From 761daa789ba1b06f6d355ca1c7da28be81a01859 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Mon, 25 Mar 2024 21:12:58 -0700 Subject: [PATCH 22/42] package/qt5: add a gcc13 compiler fix patch for qt5location The headers for defining types has changed in gcc versions, so the uint8_t classes require a cstdint include explicitly. Signed-off-by: Charles Hardin --- .../qt5location/2000-fix-gcc13-compiler.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/qt5/qt5location/2000-fix-gcc13-compiler.patch diff --git a/package/qt5/qt5location/2000-fix-gcc13-compiler.patch b/package/qt5/qt5location/2000-fix-gcc13-compiler.patch new file mode 100644 index 0000000000..b1067a49fe --- /dev/null +++ b/package/qt5/qt5location/2000-fix-gcc13-compiler.patch @@ -0,0 +1,34 @@ +diff --git a/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp b/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp +index a28c59a4..92d928a3 100644 +--- a/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp ++++ b/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp +@@ -1,5 +1,6 @@ + #pragma once + ++#include + #include + #include + #include +diff --git a/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp b/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp +index 13498ccb..4dc82a88 100644 +--- a/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp ++++ b/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + #include + + // Polyfill needed by Qt when building for Android with GCC +diff --git a/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp b/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp +index bc959c9a..2fc62bba 100644 +--- a/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp ++++ b/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp +@@ -1,5 +1,6 @@ + #pragma once + ++#include + #include + + namespace mbgl { From da0e15431712e07a8f986fae8a76caadeb5e5dff Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Tue, 20 Jun 2023 19:03:14 -0700 Subject: [PATCH 23/42] support/download: add a helper scipt to generate scmversions Primarily focused on uboot and linux, getting the scmversion from the custom repository references is required for change control tracking off of different builds and pipelines. So, extend the download framework to generate these files while the locks are being held for the generation to avoid the git information from changes during the download process. Signed-off-by: Charles Hardin --- package/pkg-download.mk | 1 + support/download/dl-wrapper | 7 +++-- support/download/git | 8 +++++ support/download/scmversion | 63 +++++++++++++++++++++++++++++++++++++ support/download/svn | 10 ++++++ 5 files changed, 86 insertions(+), 3 deletions(-) create mode 100755 support/download/scmversion diff --git a/package/pkg-download.mk b/package/pkg-download.mk index 30eeb6b1fc..817944cfc0 100644 --- a/package/pkg-download.mk +++ b/package/pkg-download.mk @@ -119,6 +119,7 @@ define DOWNLOAD -N '$($(2)_RAWNAME)' \ -o '$($(2)_DL_DIR)/$(notdir $(1))' \ $(if $(filter YES,$($(2)_SVN_EXTERNALS)),-r) \ + $(if $($(2)_SCMVERSION),-s) \ $(if $($(2)_GIT_SUBMODULES),-r) \ $(if $($(2)_GIT_LFS),-l) \ $(foreach uri,$(call DOWNLOAD_URIS,$(1),$(2)),-u $(uri)) \ diff --git a/support/download/dl-wrapper b/support/download/dl-wrapper index 35428faeef..475ff62ebc 100755 --- a/support/download/dl-wrapper +++ b/support/download/dl-wrapper @@ -17,7 +17,7 @@ # We want to catch any unexpected failure, and exit immediately. set -e -export BR_BACKEND_DL_GETOPTS=":hc:d:o:n:N:H:lru:qf:e" +export BR_BACKEND_DL_GETOPTS=":hc:d:o:n:N:H:slru:qf:e" main() { local OPT OPTARG @@ -25,7 +25,7 @@ main() { local -a uris hfiles # Parse our options; anything after '--' is for the backend - while getopts ":c:d:D:o:n:N:H:lrf:u:qp:" OPT; do + while getopts ":c:d:D:o:n:N:H:slrf:u:qp:" OPT; do case "${OPT}" in c) cset="${OPTARG}";; d) dl_dir="${OPTARG}";; @@ -34,6 +34,7 @@ main() { n) raw_base_name="${OPTARG}";; N) base_name="${OPTARG}";; H) hfiles+=( "${OPTARG}" );; + s) scmversion="-s";; l) large_file="-l";; r) recurse="-r";; f) filename="${OPTARG}";; @@ -129,7 +130,7 @@ main() { -f "${filename}" \ -u "${uri}" \ -o "${tmpf}" \ - ${quiet} ${large_file} ${recurse} -- "${@}" + ${quiet} ${scmversion} ${large_file} ${recurse} -- "${@}" then # cd back to keep path coherence cd "${OLDPWD}" diff --git a/support/download/git b/support/download/git index 6654d98a00..50f7d8e9da 100755 --- a/support/download/git +++ b/support/download/git @@ -12,6 +12,7 @@ set -e # # Options: # -q Be quiet. +# -s Generate an scmversion file # -r Clone and archive sub-modules. # -o FILE Generate archive in FILE. # -u URI Clone from repository at URI. @@ -52,11 +53,13 @@ _on_error() { } quiet= +scmversion=0 large_file=0 recurse=0 while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do case "${OPT}" in q) quiet=-q; exec >/dev/null;; + s) scmversion=1;; l) large_file=1;; r) recurse=1;; o) output="${OPTARG}";; @@ -228,6 +231,11 @@ fi popd >/dev/null +# If an scmversion is needed then generate the version information +if [ ${scmversion} -eq 1 ]; then + "${0%/*}/scmversion" "${git_cache}" "${git_cache}/.scmversion" +fi + # Generate the archive. # We do not want the .git dir; we keep other .git files, in case they are the # only files in their directory. diff --git a/support/download/scmversion b/support/download/scmversion new file mode 100755 index 0000000000..7a26e82bfd --- /dev/null +++ b/support/download/scmversion @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +set -x +set -e + +# Helper to generate an scmversion in a dowload script before +# the tarball is created. Because the tarball has to exclude +# repository directories like .git and .hg to make reproducible +# archives on subsequent downloads the version information is +# not available during the builds for a script like setlocalversion +# to run. +# +# So, this is hook to call right before the make tarball gz that +# will generate a .scmversion file that will be included in an +# archive and then available during the build steps. +# +# Call it with: +# $1: the path to the srctree (see mk_tar_gz in helpers) +# $2: output file +# +# Because this can fail for a variety of reason, there is no exit +# code to avoid build breakage. It is assumed the scripts will be +# reproducible because they are based on the contents that get generated + +while getopts :q OPT; do + case "${OPT}" in + q) exec >/dev/null;; + \?) exit 1;; + esac +done +shift $((OPTIND-1)) + +srctree="${1}" +scmversion="${2}" + +# Bail early if no srctree or scmversion +if [ -z "${srctree}" -o -z "${scmversion}" ]; then + exit 0 +fi + +# Does the scmversion exist and readonly +if [ -f "${scmversion}" -a ! -w "${scmversion}" ]; then + printf "WARNING: scmversion %s is readonly\n" "${scmversion}" >&2 + exit 0 +fi + +# +# Generate the scmversion from some expected locations in srctree +# and fallback to the buildroot version of setlocalversion another +# script is not used +# +if [ -x "${srctree}/setlocalversion" ]; then + res=$(cd "${srctree}"; ./setlocalversion ||:) +elif [ -x "${srctree}/scripts/setlocalversion" ]; then + res=$(cd "${srctree}"; ./scripts/setlocalversion ||:) +elif [ -x "${srctree}/tools/setlocalversion" ]; then + res=$(cd "${srctree}"; ./tools/setlocalversion ||:) +fi +if [ -z "${res}" ]; then + res=$("${0%/*}/../scripts/setlocalversion" "${srctree}") +fi + +[ -n "${res}" ] && (echo "${res}" > "${scmversion}") +exit 0 diff --git a/support/download/svn b/support/download/svn index 1decb2310b..e17eb7d1f1 100755 --- a/support/download/svn +++ b/support/download/svn @@ -17,6 +17,7 @@ set -e # -c REV Use revision REV. # -n NAME Use basename NAME. # -r Recursive, i.e. use externals +# -s Generate an scmversion file # # Environment: # SVN : the svn command to call @@ -26,6 +27,7 @@ set -e quiet= externals=--ignore-externals +scmversion=0 while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do case "${OPT}" in q) quiet=-q;; @@ -34,6 +36,7 @@ while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do c) rev="${OPTARG}";; n) basename="${OPTARG}";; r) externals=;; + s) scmversion=1;; :) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;; \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; esac @@ -73,6 +76,13 @@ while [ ${#} -gt 0 ]; do esac done +if [ ${scmversion} -eq 1 ]; then + svnrevision="$( _plain_svn info "'${uri}@${rev}'" \ + |sed -r -e '/^Last Changed Rev: /!d; s///' + )" + printf -- '-svn%s' "${svnrevision}" > "${basename}/.scmversion" +fi + # Get the date of the revision, to generate reproducible archives. # The output format is YYYY-MM-DDTHH:MM:SS.mmmuuuZ (i.e. always in the # UTC timezone), which we can feed as-is to the --mtime option for tar. From 42b85997a417cb8b70bb488b02d86e940dc35ad3 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Tue, 20 Jun 2023 19:04:46 -0700 Subject: [PATCH 24/42] boot/uboot: add a scmversion rsync hook when overriding srcdir During development the override srcdir is often used with a local git repo and branch. To help track the builds used in those flows it is useful to have the scm version available as part of the info. With this hook, the auto generated version include will include the example. #define PLAIN_VERSION "2018.03-01358-gbda75d6a8b" #define U_BOOT_VERSION "U-Boot " PLAIN_VERSION Signed-off-by: Charles Hardin --- boot/uboot/uboot.mk | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index d69f8d5b0f..6565eba1bc 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -28,18 +28,29 @@ UBOOT_SOURCE = $(notdir $(UBOOT_TARBALL)) else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT),y) UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) UBOOT_SITE_METHOD = git +UBOOT_SCMVERSION = YES else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_HG),y) UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) UBOOT_SITE_METHOD = hg else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_SVN),y) UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) UBOOT_SITE_METHOD = svn +UBOOT_SCMVERSION = YES else # Handle stable official U-Boot versions UBOOT_SITE = https://ftp.denx.de/pub/u-boot UBOOT_SOURCE = u-boot-$(UBOOT_VERSION).tar.bz2 endif +ifneq ($(UBOOT_OVERRIDE_SRCDIR),) +define UBOOT_SCMVERSION_HOOK + $(TOPDIR)/support/download/scmversion \ + $(abspath $(UBOOT_OVERRIDE_SRCDIR)) $(@D)/.scmversion +endef + +UBOOT_POST_RSYNC_HOOKS += UBOOT_SCMVERSION_HOOK +endif + ifeq ($(BR2_TARGET_UBOOT)$(BR2_TARGET_UBOOT_LATEST_VERSION),y) BR_NO_CHECK_HASH_FOR += $(UBOOT_SOURCE) endif @@ -553,10 +564,10 @@ endif # BR2_TARGET_UBOOT_CUSTOM_TARBALL ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT)$(BR2_TARGET_UBOOT_CUSTOM_HG),y) ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)),) $(error No custom U-Boot repository URL specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_URL setting) -endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_URL +endif # qstrip BR2_TARGET_UBOOT_CUSTOM_REPO_URL ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION)),) $(error No custom U-Boot repository version specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION setting) -endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_VERSION +endif # qstrip BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION endif # BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG endif # BR2_TARGET_UBOOT && BR_BUILDING From 8e87279e8d7d216e4f81389e82cb6b52d37d6cd8 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Tue, 20 Jun 2023 19:05:47 -0700 Subject: [PATCH 25/42] linux: add a scmversion rsync hook when overriding srcdir During development the override srcdir is often used with a local git repo and branch. To help track the builds used in those flows it is useful to have the scm version available as part of the info. With this hook, the auto generated version include will include the example. #define UTS_RELEASE "5.4.70-00031-g92c23d10d003" Signed-off-by: Charles Hardin --- linux/linux.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/linux/linux.mk b/linux/linux.mk index 53e2ad6d48..0a7c9c23cd 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -24,12 +24,14 @@ LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y) LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) LINUX_SITE_METHOD = git +LINUX_SCMVERSION = YES else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_HG),y) LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) LINUX_SITE_METHOD = hg else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_SVN),y) LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) LINUX_SITE_METHOD = svn +LINUX_SCMVERSION = YES else ifeq ($(BR2_LINUX_KERNEL_LATEST_CIP_VERSION)$(BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION),y) LINUX_SOURCE = linux-cip-$(LINUX_VERSION).tar.gz LINUX_SITE = https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/snapshot @@ -46,6 +48,15 @@ LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword $(subst ., ,$(LINUX_ endif endif +ifneq ($(LINUX_OVERRIDE_SRCDIR),) +define LINUX_SCMVERSION_HOOK + $(TOPDIR)/support/download/scmversion \ + $(abspath $(LINUX_OVERRIDE_SRCDIR)) $(@D)/.scmversion +endef + +LINUX_POST_RSYNC_HOOKS += LINUX_SCMVERSION_HOOK +endif + ifeq ($(BR2_LINUX_KERNEL)$(BR2_LINUX_KERNEL_LATEST_VERSION),y) BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE) endif From 5e2f4af42f8e8ea67cd22b950fe240480ae17ab8 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Mon, 3 Jul 2023 21:27:01 -0700 Subject: [PATCH 26/42] package/go-native: add a new download only package for go compilers The go-native is mainly for the aarch64 support since that was added after the go-bootstrap written in C was dropped. So, to get a cross compiler for go a host/native compiler needs to be available to generate the setup for the needed target. Signed-off-by: Charles Hardin --- package/Config.in.host | 1 + package/go-native/Config.in.host | 12 ++++++++ package/go-native/go-native.hash | 5 ++++ package/go-native/go-native.mk | 48 ++++++++++++++++++++++++++++++++ package/go/Config.in.host | 6 ++-- package/go/go.mk | 12 +++++++- 6 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 package/go-native/Config.in.host create mode 100644 package/go-native/go-native.hash create mode 100644 package/go-native/go-native.mk diff --git a/package/Config.in.host b/package/Config.in.host index f03ca16b7b..514c5dfb77 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -46,6 +46,7 @@ menu "Host utilities" source "package/go/Config.in.host" source "package/go-bootstrap-stage1/Config.in.host" source "package/go-bootstrap-stage2/Config.in.host" + source "package/go-native/Config.in.host" source "package/google-breakpad/Config.in.host" source "package/gptfdisk/Config.in.host" source "package/imagemagick/Config.in.host" diff --git a/package/go-native/Config.in.host b/package/go-native/Config.in.host new file mode 100644 index 0000000000..7e978e02b5 --- /dev/null +++ b/package/go-native/Config.in.host @@ -0,0 +1,12 @@ +config BR2_PACKAGE_HOST_GO_NATIVE_ARCH_SUPPORTS + bool + # See https://go.dev/dl/ for supported architecture downloads + default y if BR2_HOSTARCH = "x86" + default y if BR2_HOSTARCH = "x86_64" + default y if BR2_HOSTARCH = "arm" + default y if BR2_HOSTARCH = "aarch64" + +config BR2_PACKAGE_HOST_GO_NATIVE + bool "host go-native" + depends on BR2_PACKAGE_HOST_GO_NATIVE_ARCH_SUPPORTS + default y if !BR2_PACKAGE_HOST_GO_BOOTSTRAP_ARCH_SUPPORTS diff --git a/package/go-native/go-native.hash b/package/go-native/go-native.hash new file mode 100644 index 0000000000..506073ae4a --- /dev/null +++ b/package/go-native/go-native.hash @@ -0,0 +1,5 @@ +# From https://go.dev/dl/ +sha256 d394ac8fecf66812c78ffba7fb9a265bb1b9917564c7fd77f0edb0df6d5777a1 go1.20.5.linux-386.tar.gz +sha256 d7ec48cde0d3d2be2c69203bc3e0a44de8660b9c09a6e85c4732a3f7dc442612 go1.20.5.linux-amd64.tar.gz +sha256 aa2fab0a7da20213ff975fa7876a66d47b48351558d98851b87d1cfef4360d09 go1.20.5.linux-arm64.tar.gz +sha256 79d8210efd4390569912274a98dffc16eb85993cccdeef4d704e9b0dfd50743a go1.20.5.linux-armv6l.tar.gz diff --git a/package/go-native/go-native.mk b/package/go-native/go-native.mk new file mode 100644 index 0000000000..49045f8269 --- /dev/null +++ b/package/go-native/go-native.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# go-native +# +################################################################################ + +# Fixup the host arch as needed +ifeq ($(HOSTARCH),x86) +GO_NATIVE_HOST_ARCH = 386 +else ifeq ($(HOSTARCH),x86_64) +GO_NATIVE_HOST_ARCH = amd64 +else ifeq ($(HOSTARCH),arm) +GO_NATIVE_HOST_ARCH = armv6l +else ifeq ($(HOSTARCH),aarch64) +GO_NATIVE_HOST_ARCH = arm64 +else +GO_NATIVE_HOST_ARCH = $(HOSTARCH) +endif + +# Download the native tools from the stable versions from golang +GO_NATIVE_VERSION = 1.20.5 +GO_NATIVE_SITE = https://go.dev/dl +GO_NATIVE_LICENSE = BSD-3-Clause +GO_NATIVE_LICENSE_FILES = LICENSE + +HOST_GO_NATIVE_SOURCE = go$(GO_NATIVE_VERSION).linux-$(GO_NATIVE_HOST_ARCH).tar.gz + +# To build programs that need cgo support the toolchain needs to be +# available, so the toolchain is not needed to build host-go-native +# itself, but needed by other packages that depend on +# host-go-native. +HOST_GO_NATIVE_DEPENDENCIES = toolchain + +HOST_GO_NATIVE_ROOT = $(HOST_DIR)/lib/go-$(GO_NATIVE_VERSION) + +define HOST_GO_NATIVE_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_NATIVE_ROOT)/bin/go + $(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_NATIVE_ROOT)/bin/gofmt + + cp -a $(@D)/lib $(HOST_GO_NATIVE_ROOT)/ + cp -a $(@D)/pkg $(HOST_GO_NATIVE_ROOT)/ + + # There is a known issue which requires the go sources to be installed + # https://golang.org/issue/2775 + cp -a $(@D)/src $(HOST_GO_NATIVE_ROOT)/ +endef + +$(eval $(host-generic-package)) diff --git a/package/go/Config.in.host b/package/go/Config.in.host index b87b862cec..161128ec2e 100644 --- a/package/go/Config.in.host +++ b/package/go/Config.in.host @@ -2,7 +2,8 @@ config BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS bool default y - depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS \ + || BR2_PACKAGE_HOST_GO_NATIVE_ARCH_SUPPORTS # See https://go.dev/doc/install/source#environment # See src/go/build/syslist.go for the list of supported architectures depends on (BR2_arm && BR2_TOOLCHAIN_SUPPORTS_PIE) || BR2_aarch64 \ @@ -30,4 +31,5 @@ config BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS config BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS bool default y - depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS \ + || BR2_PACKAGE_HOST_GO_NATIVE_ARCH_SUPPORTS diff --git a/package/go/go.mk b/package/go/go.mk index 9efd4a3123..542228c1a4 100644 --- a/package/go/go.mk +++ b/package/go/go.mk @@ -12,7 +12,11 @@ GO_LICENSE = BSD-3-Clause GO_LICENSE_FILES = LICENSE GO_CPE_ID_VENDOR = golang +ifeq ($(BR2_PACKAGE_HOST_GO_NATIVE),y) +HOST_GO_DEPENDENCIES = host-go-native +else HOST_GO_DEPENDENCIES = host-go-bootstrap-stage2 +endif HOST_GO_GOPATH = $(HOST_DIR)/share/go-path HOST_GO_HOST_CACHE = $(HOST_DIR)/share/host-go-cache HOST_GO_ROOT = $(HOST_DIR)/lib/go @@ -125,10 +129,16 @@ HOST_GO_HOST_ENV = \ # The go build system is not compatible with ccache, so use # HOSTCC_NOCCACHE. See https://github.com/golang/go/issues/11685. +ifeq ($(BR2_PACKAGE_HOST_GO_NATIVE),y) HOST_GO_MAKE_ENV = \ + GOROOT_BOOTSTRAP=$(HOST_GO_NATIVE_ROOT) +else +HOST_GO_MAKE_ENV = \ + GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_STAGE2_ROOT) +endif +HOST_GO_MAKE_ENV += \ GO111MODULE=off \ GOCACHE=$(HOST_GO_HOST_CACHE) \ - GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_STAGE2_ROOT) \ GOROOT_FINAL=$(HOST_GO_ROOT) \ GOROOT="$(@D)" \ GOBIN="$(@D)/bin" \ From e3a816648d92951c147e400d6ccd3862d4138beb Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Mon, 21 Aug 2023 18:15:14 -0700 Subject: [PATCH 27/42] package/python-dateutil: add host python package for dependencies A host package for build support needs the dateutil module and so enable the dependency. Signed-off-by: Charles Hardin --- package/python-dateutil/python-dateutil.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/python-dateutil/python-dateutil.mk b/package/python-dateutil/python-dateutil.mk index b75f510bce..d45a047ba8 100644 --- a/package/python-dateutil/python-dateutil.mk +++ b/package/python-dateutil/python-dateutil.mk @@ -10,5 +10,7 @@ PYTHON_DATEUTIL_SETUP_TYPE = setuptools PYTHON_DATEUTIL_LICENSE = BSD-3-Clause PYTHON_DATEUTIL_LICENSE_FILES = LICENSE PYTHON_DATEUTIL_DEPENDENCIES = host-python-setuptools-scm +HOST_PYTHON_DATEUTIL_DEPENDENCIES = host-python-setuptools-scm host-python-six $(eval $(python-package)) +$(eval $(host-python-package)) From 39e1c5f5afb0ace93e563cb048d30ae95a74dae5 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Mon, 21 Aug 2023 18:18:11 -0700 Subject: [PATCH 28/42] package/python-docopt: add host python package for dependencies A host package like pykwalify needs the docopt module for buid support and so enable the dependency. Signed-off-by: Charles Hardin --- package/python-docopt/python-docopt.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/python-docopt/python-docopt.mk b/package/python-docopt/python-docopt.mk index f87d2f85a6..d326f4f0aa 100644 --- a/package/python-docopt/python-docopt.mk +++ b/package/python-docopt/python-docopt.mk @@ -11,3 +11,4 @@ PYTHON_DOCOPT_LICENSE_FILES = LICENSE-MIT PYTHON_DOCOPT_SETUP_TYPE = setuptools $(eval $(python-package)) +$(eval $(host-python-package)) From 64926be5c0661af7f23581057c81cf5e91ee06ba Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Mon, 21 Aug 2023 18:20:03 -0700 Subject: [PATCH 29/42] package/python-ruamel-yaml: add host python package for dependencies A host package like pykwalify needs to the ruamel module for build support and so enable the dependency. Signed-off-by: Charles Hardin --- package/python-ruamel-yaml/python-ruamel-yaml.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/python-ruamel-yaml/python-ruamel-yaml.mk b/package/python-ruamel-yaml/python-ruamel-yaml.mk index a6fed3bc2c..4f5691c981 100644 --- a/package/python-ruamel-yaml/python-ruamel-yaml.mk +++ b/package/python-ruamel-yaml/python-ruamel-yaml.mk @@ -14,3 +14,4 @@ PYTHON_RUAMEL_YAML_CPE_ID_VENDOR = ruamel.yaml_project PYTHON_RUAMEL_YAML_CPE_ID_PRODUCT = ruamel.yaml $(eval $(python-package)) +$(eval $(host-python-package)) From 6901b3525610c80bfea3b8db5c9aeeabed80bc53 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Thu, 3 Aug 2023 14:02:03 -0700 Subject: [PATCH 30/42] package/python-pykwalify: add required package for zephyr cmake When building zephyrproject-rtos based firmware, the cmake integrates with python scripts that can be run using the buildroot host-python dependencies. This is useful for the sdk setups and associated build steps for the firmware. See https://github.com/zephyrproject-rtos/zephyr for the build steps that are used in the cmake and the requirements are satisfied for the majority of build minus this package. Signed-off-by: Charles Hardin --- package/Config.in | 1 + package/python-pykwalify/Config.in | 9 ++++++++ .../python-pykwalify/python-pykwalify.hash | 6 +++++ package/python-pykwalify/python-pykwalify.mk | 23 +++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 package/python-pykwalify/Config.in create mode 100644 package/python-pykwalify/python-pykwalify.hash create mode 100644 package/python-pykwalify/python-pykwalify.mk diff --git a/package/Config.in b/package/Config.in index 820d04a776..96bb552242 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1264,6 +1264,7 @@ menu "External python modules" source "package/python-pyicu/Config.in" source "package/python-pyinotify/Config.in" source "package/python-pyjwt/Config.in" + source "package/python-pykwalify/Config.in" source "package/python-pylibfdt/Config.in" source "package/python-pylibftdi/Config.in" source "package/python-pylru/Config.in" diff --git a/package/python-pykwalify/Config.in b/package/python-pykwalify/Config.in new file mode 100644 index 0000000000..03afe31865 --- /dev/null +++ b/package/python-pykwalify/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_PYKWALIFY + bool "python-pykwalify" + select BR2_PACKAGE_PYTHON_DATEUTIL # runtime + select BR2_PACKAGE_PYTHON_DOCOPT # runtime + select BR2_PACKAGE_PYTHON_RUAMEL_YAML # runtime + help + Python lib/cli for JSON/YAML schema validation. + + http://github.com/grokzen/pykwalify diff --git a/package/python-pykwalify/python-pykwalify.hash b/package/python-pykwalify/python-pykwalify.hash new file mode 100644 index 0000000000..6ddfb6306a --- /dev/null +++ b/package/python-pykwalify/python-pykwalify.hash @@ -0,0 +1,6 @@ +# md5, sha256 from https://pypi.org/pypi/pykwalify/json +md5 153197598f8508a49aefc0f44156c2b8 pykwalify-1.8.0.tar.gz +sha256 796b2ad3ed4cb99b88308b533fb2f559c30fa6efb4fa9fda11347f483d245884 pykwalify-1.8.0.tar.gz +# Locally computed sha256 checksums +sha256 626fafd952ab0345edc227f2d565835fe1fd14067ae0d635ee3e47289b773dc4 LICENSE +sha256 f89f247ddd2b9fdff655668148da4b6feaa9175fa44dd244d233006d0f551cd5 docs/license.rst diff --git a/package/python-pykwalify/python-pykwalify.mk b/package/python-pykwalify/python-pykwalify.mk new file mode 100644 index 0000000000..8a0bc6a227 --- /dev/null +++ b/package/python-pykwalify/python-pykwalify.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# python-pykwalify +# +################################################################################ + +PYTHON_PYKWALIFY_VERSION = 1.8.0 +PYTHON_PYKWALIFY_SOURCE = pykwalify-$(PYTHON_PYKWALIFY_VERSION).tar.gz +PYTHON_PYKWALIFY_SITE = https://files.pythonhosted.org/packages/d5/77/2d6849510dbfce5f74f1f69768763630ad0385ad7bb0a4f39b55de3920c7 +PYTHON_PYKWALIFY_SETUP_TYPE = setuptools +PYTHON_PYKWALIFY_LICENSE = MIT +PYTHON_PYKWALIFY_LICENSE_FILES = LICENSE docs/license.rst +PYTHON_PYKWALIFY_DEPENDENCIES = \ + python-dateutil \ + python-docopt \ + python-ruamel-yaml +HOST_PYTHON_PYKWALIFY_DEPENDENCIES = \ + host-python-dateutil \ + host-python-docopt \ + host-python-ruamel-yaml + +$(eval $(python-package)) +$(eval $(host-python-package)) From c70e58bf08051a767f398eba5dcc452eb564015b Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Wed, 23 Aug 2023 15:18:25 -0700 Subject: [PATCH 31/42] package/python-colorama: add in host package for dependencies To generate various reports requires a host package for generating those reports. Signed-off-by: Charles Hardin --- package/python-colorama/python-colorama.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/python-colorama/python-colorama.mk b/package/python-colorama/python-colorama.mk index d633e00602..4ac914710e 100644 --- a/package/python-colorama/python-colorama.mk +++ b/package/python-colorama/python-colorama.mk @@ -11,5 +11,8 @@ PYTHON_COLORAMA_SETUP_TYPE = pep517 PYTHON_COLORAMA_LICENSE = BSD-3-Clause PYTHON_COLORAMA_LICENSE_FILES = LICENSE.txt PYTHON_COLORAMA_DEPENDENCIES = host-python-hatchling +HOST_PYTHON_COLORAMA_SETUP_TYPE = pep517 +HOST_PYTHON_COLORAMA_DEPENDENCIES = host-python-hatchling $(eval $(python-package)) +$(eval $(host-python-package)) From 03184f9d604490fad1cf1609dfd8b6dc06eb3a46 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Thu, 24 Aug 2023 12:24:36 -0700 Subject: [PATCH 32/42] package/python3: add the configuration to support python curses To support the menuconfig options for the build in the sdk, add in the curses as an option. Signed-off-by: Charles Hardin --- package/ncurses/ncurses.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk index 00e1c0d424..1193892ede 100644 --- a/package/ncurses/ncurses.mk +++ b/package/ncurses/ncurses.mk @@ -154,6 +154,7 @@ HOST_NCURSES_CONF_ENV = \ HOST_NCURSES_CONF_OPTS = \ --with-shared \ + --enable-overwrite \ --without-gpm \ --without-manpages \ --without-cxx \ From b91110050c421a3893088a4d71f182c9fc7a77c6 Mon Sep 17 00:00:00 2001 From: David Schneider Date: Fri, 15 Sep 2023 11:24:11 +0200 Subject: [PATCH 33/42] feat(package/freescale-imx/firmware-sentinel): create package i.MX Sentinel Firmware is used for i.MX Advanced High Assurance Boot (AHAB). For previous i.MX generations this was provided by imx-seco package. Co-authored-by: Bernhard Kellner [PLAT-8084] --- package/freescale-imx/Config.in | 1 + .../freescale-imx/firmware-sentinel/Config.in | 31 +++++++++++++++++++ .../firmware-sentinel/firmware-sentinel.hash | 5 +++ .../firmware-sentinel/firmware-sentinel.mk | 27 ++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 package/freescale-imx/firmware-sentinel/Config.in create mode 100644 package/freescale-imx/firmware-sentinel/firmware-sentinel.hash create mode 100644 package/freescale-imx/firmware-sentinel/firmware-sentinel.mk diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index 3211592468..b8db8e1c9b 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -150,6 +150,7 @@ source "package/freescale-imx/imx-vpu-hantro/Config.in" source "package/freescale-imx/imx-vpuwrap/Config.in" source "package/freescale-imx/firmware-ele-imx/Config.in" source "package/freescale-imx/firmware-imx/Config.in" +source "package/freescale-imx/firmware-sentinel/Config.in" source "package/freescale-imx/imx-sc-firmware/Config.in" source "package/freescale-imx/imx-seco/Config.in" source "package/freescale-imx/imx-vpu-hantro-daemon/Config.in" diff --git a/package/freescale-imx/firmware-sentinel/Config.in b/package/freescale-imx/firmware-sentinel/Config.in new file mode 100644 index 0000000000..c2b8706bd3 --- /dev/null +++ b/package/freescale-imx/firmware-sentinel/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_FIRMWARE_SENTINEL + bool "firmware-sentinel" + depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93 + help + i.MX Sentinel firmware + + This library is provided by Freescale as-is and doesn't have + an upstream. + +if BR2_PACKAGE_FIRMWARE_SENTINEL + +choice + prompt "i.MX Sentinel Firmware Release" + default BR2_PACKAGE_FIRMWARE_SENTINEL_MX93A0 if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93 + help + Select the appropriate ahab container image to install + to match the iMX asics revision. + + Note - mismatches result in a failure to boot + +config BR2_PACKAGE_FIRMWARE_SENTINEL_MX93A0 + bool "imx-sentinel-mx93a0" + depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93 + +endchoice + +config BR2_PACKAGE_FIRMWARE_SENTINEL_AHAB_CONTAINER_IMAGE + string + default "mx93a0-ahab-container.img" if BR2_PACKAGE_FIRMWARE_SENTINEL_MX93A0 + +endif diff --git a/package/freescale-imx/firmware-sentinel/firmware-sentinel.hash b/package/freescale-imx/firmware-sentinel/firmware-sentinel.hash new file mode 100644 index 0000000000..44a645499b --- /dev/null +++ b/package/freescale-imx/firmware-sentinel/firmware-sentinel.hash @@ -0,0 +1,5 @@ +# Locally calculated +sha256 269480417a8ae9aa4cc4101ab947287fc33455a931021dbdc4d9badb5212bceb firmware-sentinel-0.11.bin +sha256 b158adaac5e2d1c7fa6e739ff168ab498957e3303070f1c0b0e66d9a8f02a354 EULA +sha256 de37a0bcbf1717b910c1a53ea6eab853c404e61e8143bb6c081d39f532571e54 COPYING +sha256 c800aaca3a7e9f470d99d7cde0a48c95982ed601d4c306f7b8f43f3710054f28 SCR.txt diff --git a/package/freescale-imx/firmware-sentinel/firmware-sentinel.mk b/package/freescale-imx/firmware-sentinel/firmware-sentinel.mk new file mode 100644 index 0000000000..de916861a5 --- /dev/null +++ b/package/freescale-imx/firmware-sentinel/firmware-sentinel.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# firmware-sentinel +# +################################################################################ + +FIRMWARE_SENTINEL_VERSION = 0.11 +FIRMWARE_SENTINEL_SITE = $(FREESCALE_IMX_SITE) +FIRMWARE_SENTINEL_SOURCE = firmware-sentinel-$(FIRMWARE_SENTINEL_VERSION).bin + +FIRMWARE_SENTINEL_LICENSE = NXP Semiconductor Software License Agreement +FIRMWARE_SENTINEL_LICENSE_FILES = EULA COPYING SCR.txt +FIRMWARE_SENTINEL_REDISTRIBUTE = NO + +define FIRMWARE_SENTINEL_EXTRACT_CMDS + $(call NXP_EXTRACT_HELPER,$(FIRMWARE_SENTINEL_DL_DIR)/$(FIRMWARE_SENTINEL_SOURCE)) +endef + +FIRMWARE_SENTINEL_INSTALL_IMAGES = YES + +FIRMWARE_SENTINEL_AHAB_CONTAINER_IMAGE = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_SENTINEL_AHAB_CONTAINER_IMAGE)) + +define FIRMWARE_SENTINEL_INSTALL_IMAGES_CMDS + cp $(@D)/$(FIRMWARE_SENTINEL_AHAB_CONTAINER_IMAGE) $(BINARIES_DIR)/ahab-container.img +endef + +$(eval $(generic-package)) From bd75010fa41626d4799945f9d3e05c084bd68ab2 Mon Sep 17 00:00:00 2001 From: David Schneider Date: Thu, 12 Oct 2023 11:32:46 +0200 Subject: [PATCH 34/42] package/python-intelhex: enable as host package Zephyr build system depends on intelhex Python package. --- package/python-intelhex/python-intelhex.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/python-intelhex/python-intelhex.mk b/package/python-intelhex/python-intelhex.mk index cc8b973f0f..56f758e643 100644 --- a/package/python-intelhex/python-intelhex.mk +++ b/package/python-intelhex/python-intelhex.mk @@ -12,3 +12,4 @@ PYTHON_INTELHEX_LICENSE = BSD-3-Clause PYTHON_INTELHEX_LICENSE_FILES = LICENSE.txt $(eval $(python-package)) +$(eval $(host-python-package)) From 7e9dcdb25c5dbc901b120ce985e268af77845129 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Sun, 15 Oct 2023 10:34:45 -0700 Subject: [PATCH 35/42] package/python3: when using the host curses use readline as well The autotool finds the curses as expected, but there is a hook in setup.py that is not immediately obvious. def detect_readline_curses(self): # readline readline_termcap_library = "" curses_library = "" ... snip snip ... Which detects the host readline and then ends up trying to use ncursesw instead of the cureses in the host tools. So, by using the host-readline then curses library is the same as expected. Signed-off-by: Charles Hardin --- package/python3/python3.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 5d9d77af50..d3232cd7b5 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -55,7 +55,7 @@ HOST_PYTHON3_CONF_OPTS += --disable-bzip2 endif ifeq ($(BR2_PACKAGE_HOST_PYTHON3_CURSES),y) -HOST_PYTHON3_DEPENDENCIES += host-ncurses +HOST_PYTHON3_DEPENDENCIES += host-ncurses host-readline else HOST_PYTHON3_CONF_OPTS += --disable-curses endif From 12e87effbcb2a04d503f8347bfc3c9085b082754 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Tue, 5 Dec 2023 12:22:11 -0800 Subject: [PATCH 36/42] package/python-click: enable as host python package Zephyr build system depends on click and since it is a build it will run the host packages. Traceback (most recent call last): File "emb-mcu-local/extern/zephyrproject/bootloader/mcuboot/" \ "scripts/imgtool.py", line 19, in from imgtool import main File "emb-mcu-local/extern/zephyrproject/bootloader/mcuboot/" \ "scripts/imgtool/main.py", line 21, in import click ModuleNotFoundError: No module named 'click' Signed-off-by: Charles Hardin --- package/python-click/python-click.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/python-click/python-click.mk b/package/python-click/python-click.mk index 0e29ff034e..3223ab39ce 100644 --- a/package/python-click/python-click.mk +++ b/package/python-click/python-click.mk @@ -12,3 +12,4 @@ PYTHON_CLICK_LICENSE_FILES = LICENSE.rst PYTHON_CLICK_SETUP_TYPE = setuptools $(eval $(python-package)) +$(eval $(host-python-package)) From ad00b2bc67be51eedc9ec5c29da85157a1629bb5 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Tue, 5 Dec 2023 15:00:21 -0800 Subject: [PATCH 37/42] package/python-cbor2: enable as host python package Zephyr build system depends on click and since it is a build it will run the host packages. Traceback (most recent call last): File "emb-mcu-local/extern/zephyrproject/bootloader/" \ "mcuboot/scripts/imgtool/boot_record.py", line 21, in from cbor2 import dumps ModuleNotFoundError: No module named 'cbor2' Signed-off-by: Charles Hardin --- package/python-cbor2/python-cbor2.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/python-cbor2/python-cbor2.mk b/package/python-cbor2/python-cbor2.mk index 5040301867..586401f7e8 100644 --- a/package/python-cbor2/python-cbor2.mk +++ b/package/python-cbor2/python-cbor2.mk @@ -11,6 +11,8 @@ PYTHON_CBOR2_SETUP_TYPE = setuptools PYTHON_CBOR2_LICENSE = MIT PYTHON_CBOR2_LICENSE_FILES = LICENSE.txt PYTHON_CBOR2_DEPENDENCIES = host-python-setuptools-scm +HOST_PYTHON_CBOR2_DEPENDENCIES = host-python-setuptools-scm PYTHON_CBOR2_ENV = CBOR2_BUILD_C_EXTENSION=1 $(eval $(python-package)) +$(eval $(host-python-package)) From a61fad243ed27e66ca3a3bc4fae63b065422edd1 Mon Sep 17 00:00:00 2001 From: Geert Lens Date: Tue, 12 Dec 2023 11:33:23 +0100 Subject: [PATCH 38/42] package/balena-engine: bump to version 20.10.40 This version adds support for cgroups v2 which are enforced by systemd. Changelog: https://github.com/balena-os/balena-engine/releases/tag/v20.10.40 --- package/balena-engine/balena-engine.hash | 2 +- package/balena-engine/balena-engine.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/balena-engine/balena-engine.hash b/package/balena-engine/balena-engine.hash index 6a92a40cc8..cde062348a 100644 --- a/package/balena-engine/balena-engine.hash +++ b/package/balena-engine/balena-engine.hash @@ -1,3 +1,3 @@ # Locally computed -sha256 1482b64e35d5406be719e362647ed7d0599cf4eead7770247ebd972c4c85ede5 balena-engine-20.10.26.tar.gz +sha256 6aa4e8653801ce1496296653dff173b5a9a3b0355709b5ce484c4e1e6e331aba balena-engine-20.10.40.tar.gz sha256 7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8 LICENSE diff --git a/package/balena-engine/balena-engine.mk b/package/balena-engine/balena-engine.mk index 49d526a465..f8726280b3 100644 --- a/package/balena-engine/balena-engine.mk +++ b/package/balena-engine/balena-engine.mk @@ -4,7 +4,7 @@ # ################################################################################ -BALENA_ENGINE_VERSION = 20.10.26 +BALENA_ENGINE_VERSION = 20.10.40 BALENA_ENGINE_SITE = $(call github,balena-os,balena-engine,v$(BALENA_ENGINE_VERSION)) BALENA_ENGINE_LICENSE = Apache-2.0 @@ -83,10 +83,10 @@ endef define BALENA_ENGINE_INSTALL_SYMLINK ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-daemon ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-containerd - ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-containerd-shim ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-containerd-ctr ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-runc ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-proxy + ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-containerd-shim-runc-v2 $(if $(BR2_PACKAGE_TINI),ln -f -s tini $(TARGET_DIR)/usr/bin/balena-engine-init) endef BALENA_ENGINE_POST_INSTALL_TARGET_HOOKS += BALENA_ENGINE_INSTALL_SYMLINK From 5263717f051c09356b81955700f5466a9e8dd4ad Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Fri, 12 Jan 2024 18:32:01 -0800 Subject: [PATCH 39/42] package/freescale-imx: update the packages to support linux 6.1.x - update the firmware-imx versions to the 6.1.x versions - Get newer imx-gpu versions (shamelessly stolen from yocto) Signed-off-by: Carl Norum Signed-off-by: Charles Hardin --- package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash | 4 ++-- package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk | 4 ++-- package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash | 4 ++-- package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 4 ++-- package/freescale-imx/imx-seco/Config.in | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash b/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash index 580b31e453..4e6e68eb15 100644 --- a/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash +++ b/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash @@ -1,5 +1,5 @@ # Locally calculated -sha256 1ed29a4818161198b658ffc428dff7c154c38f5ba48d7358ed9b0be261d72b99 imx-gpu-g2d-6.4.11.p1.2-arm.bin -sha256 cdf096c9b15c773ad600b24ec8888c1c4a33711c195c655e9411d4b66a992c25 imx-gpu-g2d-6.4.11.p1.2-aarch64.bin +sha256 37ca1ddb0ea6e19eaac75939517aaf5db27a47aeecf95f021a81089601933452 imx-gpu-g2d-6.4.11.p2.0-arm-173c22a.bin +sha256 025d41007177b95dfc43fabc75447ac048ad7973cbda22970c9d36640fb990e5 imx-gpu-g2d-6.4.11.p2.0-aarch64-173c22a.bin sha256 913ba38d4be97361c3d0fa9bf2f6dbe7b1c0c41213dd268fb6738db9704dbe32 COPYING sha256 4fd8bb45a2ec22117d20cfea84370e2a3a2cd99e8e177138bed0938137b1aeb3 EULA diff --git a/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk b/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk index 87fe08ebe3..d60db23f70 100644 --- a/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk +++ b/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk @@ -5,9 +5,9 @@ ################################################################################ ifeq ($(BR2_aarch64),y) -IMX_GPU_G2D_VERSION = 6.4.11.p1.2-aarch64 +IMX_GPU_G2D_VERSION = 6.4.11.p2.0-aarch64-173c22a else -IMX_GPU_G2D_VERSION = 6.4.11.p1.2-arm +IMX_GPU_G2D_VERSION = 6.4.11.p2.0-arm-173c22a endif IMX_GPU_G2D_SITE = $(FREESCALE_IMX_SITE) IMX_GPU_G2D_SOURCE = imx-gpu-g2d-$(IMX_GPU_G2D_VERSION).bin diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash index a380e1b712..4c66936fa2 100644 --- a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash +++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash @@ -1,5 +1,5 @@ # Locally calculated -sha256 491ac012d691e27856769296e2334ad1b6f45e31ffe7313fcdb028c75b3b69ae imx-gpu-viv-6.4.11.p1.2-aarch32-1e0c396.bin -sha256 d5904cbbe33a3c1160e9cd15c44d78df25d0dbd7b251add796673af53d3046f6 imx-gpu-viv-6.4.11.p1.2-aarch64-1e0c396.bin +sha256 18f25c68db762953ccbf051fc3559ab8587fdcbf84e1248275f91f8bdc9853ec imx-gpu-viv-6.4.11.p2.0-aarch32-173c22a.bin +sha256 b28828549a75cfd5d86716e3697e9f770e1cef1e90e919b22ea3b1df5de821ca imx-gpu-viv-6.4.11.p2.0-aarch64-173c22a.bin sha256 913ba38d4be97361c3d0fa9bf2f6dbe7b1c0c41213dd268fb6738db9704dbe32 COPYING sha256 4fd8bb45a2ec22117d20cfea84370e2a3a2cd99e8e177138bed0938137b1aeb3 EULA diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk index 5a13419e3e..90f8f2885d 100644 --- a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk @@ -5,9 +5,9 @@ ################################################################################ ifeq ($(BR2_aarch64),y) -IMX_GPU_VIV_VERSION = 6.4.11.p1.2-aarch64-1e0c396 +IMX_GPU_VIV_VERSION = 6.4.11.p2.0-aarch64-173c22a else -IMX_GPU_VIV_VERSION = 6.4.11.p1.2-aarch32-1e0c396 +IMX_GPU_VIV_VERSION = 6.4.11.p2.0-aarch32-173c22a endif IMX_GPU_VIV_SITE = $(FREESCALE_IMX_SITE) IMX_GPU_VIV_SOURCE = imx-gpu-viv-$(IMX_GPU_VIV_VERSION).bin diff --git a/package/freescale-imx/imx-seco/Config.in b/package/freescale-imx/imx-seco/Config.in index a9a2e92a3e..7abdd7eb0d 100644 --- a/package/freescale-imx/imx-seco/Config.in +++ b/package/freescale-imx/imx-seco/Config.in @@ -32,7 +32,7 @@ config BR2_PACKAGE_IMX_SECO_MX8DXLA1 config BR2_PACKAGE_IMX_SECO_MX8DXLB0 bool "imx-seco-mx8dxlb0" - depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X + depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL config BR2_PACKAGE_IMX_SECO_MX8QMB0 bool "imx-seco-mx8qmb0" From c40a102854acf10f74a25a743c68ae4201b72c2b Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Wed, 13 Mar 2024 14:35:38 -0700 Subject: [PATCH 40/42] package/libcap: avoid calling /sbin/ldconfig during the host build There is snippet in the install path that calls /sbin/ldconfig when a variable FAKEROOT is empty install-shared-cap: install-common-cap $(MINCAPLIBNAME) install -m 0755 $(MINCAPLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MINCAPLIBNAME) ln -sf $(MINCAPLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MAJCAPLIBNAME) ln -sf $(MAJCAPLIBNAME) $(FAKEROOT)$(LIBDIR)/$(CAPLIBNAME) ifeq ($(FAKEROOT),) -/sbin/ldconfig endif And this variable is defined when DESTDIR is used, so still define prefix but use the DESTDIR in the host build as well to avoid calling ldconfig at all. Signed-off-by: Charles Hardin --- package/libcap/libcap.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk index fe2f24ad8c..bd963bc590 100644 --- a/package/libcap/libcap.mk +++ b/package/libcap/libcap.mk @@ -56,7 +56,7 @@ HOST_LIBCAP_MAKE_FLAGS = \ DYNAMIC=yes \ GOLANG=no \ lib=lib \ - prefix=$(HOST_DIR) \ + prefix= \ RAISE_SETFCAP=no define HOST_LIBCAP_BUILD_CMDS @@ -65,7 +65,8 @@ define HOST_LIBCAP_BUILD_CMDS endef define HOST_LIBCAP_INSTALL_CMDS - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBCAP_MAKE_FLAGS) install + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBCAP_MAKE_FLAGS) \ + DESTDIR=$(HOST_DIR) install endef $(eval $(generic-package)) From 38a66e04e27e25a6b9ab54b10386324ce4ee3be6 Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Wed, 13 Mar 2024 14:39:11 -0700 Subject: [PATCH 41/42] package/tensorflow-lite: apply the patches series from upstream There is a patch series to add tensorflow-lite to buildroot and so apply this as one commit since the upstream will be post 2024.02 and this allows the package to be used in the release branch now. https://patchwork.ozlabs.org/project/buildroot/list/?series=346546 Signed-off-by: Charles Hardin --- DEVELOPERS | 12 +++ package/Config.in | 10 +++ ...nly-when-needed-for-tests-benchmarks.patch | 41 ++++++++++ package/cpuinfo/Config.in | 17 +++++ package/cpuinfo/cpuinfo.hash | 4 + package/cpuinfo/cpuinfo.mk | 17 +++++ package/farmhash/Config.in | 12 +++ package/farmhash/farmhash.hash | 4 + package/farmhash/farmhash.mk | 14 ++++ package/fft2d/Config.in | 7 ++ package/fft2d/fft2d.hash | 4 + package/fft2d/fft2d.mk | 23 ++++++ ...le-CXX-unless-building-tests-benchma.patch | 48 ++++++++++++ package/fp16/Config.in | 8 ++ package/fp16/fp16.hash | 4 + package/fp16/fp16.mk | 20 +++++ package/gemmlowp/Config.in | 12 +++ package/gemmlowp/gemmlowp.hash | 4 + package/gemmlowp/gemmlowp.mk | 16 ++++ package/psimd/Config.in | 6 ++ package/psimd/psimd.hash | 4 + package/psimd/psimd.mk | 15 ++++ package/pthreadpool/Config.in | 8 ++ package/pthreadpool/pthreadpool.hash | 4 + package/pthreadpool/pthreadpool.mk | 33 +++++++++ package/ruy/Config.in | 22 ++++++ package/ruy/ruy.hash | 4 + package/ruy/ruy.mk | 18 +++++ .../0001-lite-Update-CMakeLists.txt.patch | 49 ++++++++++++ ...dd-SYSTEM_FARMHASH-cmake-config-flag.patch | 74 +++++++++++++++++++ .../0003-Fix-FindFlatBuffers-cmake-file.patch | 51 +++++++++++++ ...ink-tensorflow-lite-against-gemmlowp.patch | 32 ++++++++ ...2000-fix-missing-cstdint-for-aarch64.patch | 11 +++ package/tensorflow-lite/Config.in | 36 +++++++++ package/tensorflow-lite/tensorflow-lite.hash | 4 + package/tensorflow-lite/tensorflow-lite.mk | 59 +++++++++++++++ package/xnnpack/Config.in | 27 +++++++ package/xnnpack/xnnpack.hash | 4 + package/xnnpack/xnnpack.mk | 18 +++++ 39 files changed, 756 insertions(+) create mode 100644 package/cpuinfo/0001-Enable-CXX-only-when-needed-for-tests-benchmarks.patch create mode 100644 package/cpuinfo/Config.in create mode 100644 package/cpuinfo/cpuinfo.hash create mode 100644 package/cpuinfo/cpuinfo.mk create mode 100644 package/farmhash/Config.in create mode 100644 package/farmhash/farmhash.hash create mode 100644 package/farmhash/farmhash.mk create mode 100644 package/fft2d/Config.in create mode 100644 package/fft2d/fft2d.hash create mode 100644 package/fft2d/fft2d.mk create mode 100644 package/fp16/0001-CMake-don-t-enable-CXX-unless-building-tests-benchma.patch create mode 100644 package/fp16/Config.in create mode 100644 package/fp16/fp16.hash create mode 100644 package/fp16/fp16.mk create mode 100644 package/gemmlowp/Config.in create mode 100644 package/gemmlowp/gemmlowp.hash create mode 100644 package/gemmlowp/gemmlowp.mk create mode 100644 package/psimd/Config.in create mode 100644 package/psimd/psimd.hash create mode 100644 package/psimd/psimd.mk create mode 100644 package/pthreadpool/Config.in create mode 100644 package/pthreadpool/pthreadpool.hash create mode 100644 package/pthreadpool/pthreadpool.mk create mode 100644 package/ruy/Config.in create mode 100644 package/ruy/ruy.hash create mode 100644 package/ruy/ruy.mk create mode 100644 package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch create mode 100644 package/tensorflow-lite/0002-Add-SYSTEM_FARMHASH-cmake-config-flag.patch create mode 100644 package/tensorflow-lite/0003-Fix-FindFlatBuffers-cmake-file.patch create mode 100644 package/tensorflow-lite/0004-Don-t-link-tensorflow-lite-against-gemmlowp.patch create mode 100644 package/tensorflow-lite/2000-fix-missing-cstdint-for-aarch64.patch create mode 100644 package/tensorflow-lite/Config.in create mode 100644 package/tensorflow-lite/tensorflow-lite.hash create mode 100644 package/tensorflow-lite/tensorflow-lite.mk create mode 100644 package/xnnpack/Config.in create mode 100644 package/xnnpack/xnnpack.hash create mode 100644 package/xnnpack/xnnpack.mk diff --git a/DEVELOPERS b/DEVELOPERS index 0bfe91f064..f16316e897 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2868,6 +2868,18 @@ N: Stefan Nickl F: board/freescale/imx8dxlevk/ F: configs/freescale_imx8dxlevk_defconfig +N: Stefan Hager +F: package/cpuinfo/ +F: package/farmhash/ +F: package/fp16/ +F: package/fft2d/ +F: package/gemmlowp/ +F: package/psimd/ +F: package/pthreadpool/ +F: package/ruy/ +F: package/tensorflow-lite/ +F: package/xnnpack/ + N: Stefan Ott F: package/unbound/ diff --git a/package/Config.in b/package/Config.in index 96bb552242..b7457289bb 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1734,6 +1734,7 @@ menu "Hardware handling" source "package/bcm2835/Config.in" source "package/c-periphery/Config.in" source "package/ccid/Config.in" + source "package/cpuinfo/Config.in" source "package/dtc/Config.in" source "package/gnu-efi/Config.in" source "package/hackrf/Config.in" @@ -2110,13 +2111,17 @@ menu "Other" source "package/elfutils/Config.in" source "package/ell/Config.in" source "package/falcosecurity-libs/Config.in" + source "package/farmhash/Config.in" + source "package/fft2d/Config.in" source "package/fftw/Config.in" source "package/flann/Config.in" source "package/flatbuffers/Config.in" source "package/flatcc/Config.in" + source "package/fp16/Config.in" source "package/fxdiv/Config.in" source "package/gconf/Config.in" source "package/gdal/Config.in" + source "package/gemmlowp/Config.in" source "package/gflags/Config.in" source "package/gli/Config.in" source "package/glibmm/Config.in" @@ -2222,15 +2227,19 @@ endif source "package/protobuf/Config.in" source "package/protobuf-c/Config.in" source "package/protozero/Config.in" + source "package/psimd/Config.in" + source "package/pthreadpool/Config.in" source "package/qhull/Config.in" source "package/qlibc/Config.in" source "package/reproc/Config.in" source "package/riemann-c-client/Config.in" + source "package/ruy/Config.in" source "package/shapelib/Config.in" source "package/skalibs/Config.in" source "package/sphinxbase/Config.in" source "package/startup-notification/Config.in" source "package/tbb/Config.in" + source "package/tensorflow-lite/Config.in" source "package/tinycbor/Config.in" source "package/tl-expected/Config.in" source "package/tllist/Config.in" @@ -2239,6 +2248,7 @@ endif source "package/uvw/Config.in" source "package/volk/Config.in" source "package/xapian/Config.in" + source "package/xnnpack/Config.in" endmenu menu "Security" diff --git a/package/cpuinfo/0001-Enable-CXX-only-when-needed-for-tests-benchmarks.patch b/package/cpuinfo/0001-Enable-CXX-only-when-needed-for-tests-benchmarks.patch new file mode 100644 index 0000000000..7aeef0edc0 --- /dev/null +++ b/package/cpuinfo/0001-Enable-CXX-only-when-needed-for-tests-benchmarks.patch @@ -0,0 +1,41 @@ +From 66dbf4fbe202318860caeab3b1ef9c2fe70e2c4c Mon Sep 17 00:00:00 2001 +From: James Hilliard +Date: Sun, 29 Jan 2023 16:55:08 -0700 +Subject: [PATCH] Enable CXX only when needed for tests/benchmarks + +Signed-off-by: James Hilliard +[Upstream status: +https://github.com/pytorch/cpuinfo/pull/133] +--- + CMakeLists.txt | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9f4d1d1..9e1c153 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,7 +3,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR) + # ---[ Setup project + PROJECT( + cpuinfo +- LANGUAGES C CXX ++ LANGUAGES C + ) + + # ---[ Options. +@@ -103,6 +103,12 @@ ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS|Darwin| + ENDIF() + ENDIF() + ++IF(CPUINFO_SUPPORTED_PLATFORM) ++ IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS OR CPUINFO_BUILD_BENCHMARKS) ++ ENABLE_LANGUAGE(CXX) ++ ENDIF() ++ENDIF() ++ + # ---[ Download deps + SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps + CACHE PATH "Confu-style dependencies source directory") +-- +2.34.1 + diff --git a/package/cpuinfo/Config.in b/package/cpuinfo/Config.in new file mode 100644 index 0000000000..257480f068 --- /dev/null +++ b/package/cpuinfo/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_CPUINFO_ARCH_SUPPORTS + bool + default y if BR2_aarch64 + default y if BR2_arm + default y if BR2_i386 + default y if BR2_x86_64 + +config BR2_PACKAGE_CPUINFO + bool "cpuinfo" + depends on BR2_PACKAGE_CPUINFO_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + help + CPU INFOrmation library, cpuinfo is a library to detect + essential for performance optimization information about + host CPU. + + https://github.com/pytorch/cpuinfo diff --git a/package/cpuinfo/cpuinfo.hash b/package/cpuinfo/cpuinfo.hash new file mode 100644 index 0000000000..7dd0d57172 --- /dev/null +++ b/package/cpuinfo/cpuinfo.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 cf243e7ac07cd5e2ac58dcb29f8a9047b7887452212aead2ddf1ceda45cc66dd cpuinfo-eb4a6674bfe9cf91b63b9817412ae5f6862c8432.tar.gz +# License files, locally calculated +sha256 8e7e60636c3aa0cb03571a1a841ce5697f9551ff92b3c426c2561613d15ade70 LICENSE diff --git a/package/cpuinfo/cpuinfo.mk b/package/cpuinfo/cpuinfo.mk new file mode 100644 index 0000000000..d59513eea3 --- /dev/null +++ b/package/cpuinfo/cpuinfo.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# cpuinfo +# +################################################################################ + +CPUINFO_VERSION = eb4a6674bfe9cf91b63b9817412ae5f6862c8432 +CPUINFO_SITE = $(call github,pytorch,cpuinfo,$(CPUINFO_VERSION)) +CPUINFO_LICENSE = BSD-2-Clause +CPUINFO_LICENSE_FILES = LICENSE +CPUINFO_INSTALL_STAGING = YES +CPUINFO_CONF_OPTS = \ + -DCPUINFO_BUILD_UNIT_TESTS=OFF \ + -DCPUINFO_BUILD_MOCK_TESTS=OFF \ + -DCPUINFO_BUILD_BENCHMARKS=OFF + +$(eval $(cmake-package)) diff --git a/package/farmhash/Config.in b/package/farmhash/Config.in new file mode 100644 index 0000000000..ef22898774 --- /dev/null +++ b/package/farmhash/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_FARMHASH + bool "farmhash" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + FarmHash, a family of hash functions. + + https://github.com/google/farmhash + +comment "farmhash needs a toolchain w/ C++11" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 diff --git a/package/farmhash/farmhash.hash b/package/farmhash/farmhash.hash new file mode 100644 index 0000000000..afdfc0f994 --- /dev/null +++ b/package/farmhash/farmhash.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 18392cf0736e1d62ecbb8d695c31496b6507859e8c75541d7ad0ba092dc52115 farmhash-0d859a811870d10f53a594927d0d0b97573ad06d.tar.gz +# License files, locally calculated +sha256 4162dd091caae234f72d3b57e138174f733e736b2430a4c51b098b17d866fcb6 COPYING diff --git a/package/farmhash/farmhash.mk b/package/farmhash/farmhash.mk new file mode 100644 index 0000000000..6ab7d1a88b --- /dev/null +++ b/package/farmhash/farmhash.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# farmhash +# +################################################################################ + +FARMHASH_VERSION = 0d859a811870d10f53a594927d0d0b97573ad06d +FARMHASH_SITE = $(call github,google,farmhash,$(FARMHASH_VERSION)) +FARMHASH_LICENSE = MIT +FARMHASH_LICENSE_FILES = COPYING +FARMHASH_INSTALL_STAGING = YES +FARMHASH_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" + +$(eval $(autotools-package)) diff --git a/package/fft2d/Config.in b/package/fft2d/Config.in new file mode 100644 index 0000000000..38394f6170 --- /dev/null +++ b/package/fft2d/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_FFT2D + bool "fft2d" + help + This is a package to calculate Discrete Fourier/Cosine/Sine + Transforms of 2,3-dimensional sequences of length 2^N. + + http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html diff --git a/package/fft2d/fft2d.hash b/package/fft2d/fft2d.hash new file mode 100644 index 0000000000..a1b1a326ae --- /dev/null +++ b/package/fft2d/fft2d.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 ada7e99087c4ed477bfdf11413f2ba8db8a840ba9bbf8ac94f4f3972e2a7cec9 fft2d.tgz +# License files, locally calculated +sha256 0b2a2082537735a2a576dbec2e8f9c1a09812eac6df6a389502a6ba860072906 readme2d.txt diff --git a/package/fft2d/fft2d.mk b/package/fft2d/fft2d.mk new file mode 100644 index 0000000000..781b545e2e --- /dev/null +++ b/package/fft2d/fft2d.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# fft2d +# +################################################################################ + +FFT2D_VERSION = 2006.12.28 +FFT2D_SITE = https://www.kurims.kyoto-u.ac.jp/~ooura +FFT2D_SOURCE = fft2d.tgz +FFT2D_LICENSE = MIT-like +FFT2D_LICENSE_FILES = readme2d.txt +FFT2D_INSTALL_STAGING = YES +# Only installs headers/sources +FFT2D_INSTALL_TARGET = NO + +define FFT2D_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.c $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.f $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.h $(STAGING_DIR)/usr/include/fft2d +endef + +$(eval $(generic-package)) diff --git a/package/fp16/0001-CMake-don-t-enable-CXX-unless-building-tests-benchma.patch b/package/fp16/0001-CMake-don-t-enable-CXX-unless-building-tests-benchma.patch new file mode 100644 index 0000000000..b3c5219d59 --- /dev/null +++ b/package/fp16/0001-CMake-don-t-enable-CXX-unless-building-tests-benchma.patch @@ -0,0 +1,48 @@ +From eba14b5277ed8f155eb333f4bbe9f99366e3dece Mon Sep 17 00:00:00 2001 +From: James Hilliard +Date: Sun, 29 Jan 2023 21:43:50 -0700 +Subject: [PATCH] CMake: don't enable CXX unless building tests/benchmarks + +We only need CXX support when building tests/benchmarks. + +Fixes: +CMake Error at CMakeLists.txt:6 (PROJECT): + No CMAKE_CXX_COMPILER could be found. + + Tell CMake where to find the compiler by setting either the environment + variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path + to the compiler, or to the compiler name if it is in the PATH. + +Signed-off-by: James Hilliard +[Upstream status: +https://github.com/Maratyszcza/FP16/pull/22] +--- + CMakeLists.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e7d127..8028c07 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,13 +3,17 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) + INCLUDE(GNUInstallDirs) + + # ---[ Project +-PROJECT(FP16 C CXX) ++PROJECT(FP16 C) + + # ---[ Options. + OPTION(FP16_BUILD_TESTS "Build FP16 unit tests" ON) + OPTION(FP16_BUILD_BENCHMARKS "Build FP16 micro-benchmarks" ON) + + # ---[ CMake options ++IF(FP16_BUILD_TESTS OR FP16_BUILD_BENCHMARKS) ++ ENABLE_LANGUAGE(CXX) ++ENDIF() ++ + IF(FP16_BUILD_TESTS) + ENABLE_TESTING() + ENDIF() +-- +2.34.1 + diff --git a/package/fp16/Config.in b/package/fp16/Config.in new file mode 100644 index 0000000000..e07c6ebb8a --- /dev/null +++ b/package/fp16/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_FP16 + bool "fp16" + select BR2_PACKAGE_PSIMD + help + Header-only library for conversion to/from half-precision + floating point formats. + + https://github.com/Maratyszcza/FP16 diff --git a/package/fp16/fp16.hash b/package/fp16/fp16.hash new file mode 100644 index 0000000000..63634eb2cf --- /dev/null +++ b/package/fp16/fp16.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 a91f4770ff9c39f4d72e339c379f566b3bbb359fa66122d85fc0bae3dde7abc7 fp16-0a92994d729ff76a58f692d3028ca1b64b145d91.tar.gz +# License files, locally calculated +sha256 17e4f539024be2749ee729d1e2f01d24cef12ece8c9bf18e91a4349be29c80bf LICENSE diff --git a/package/fp16/fp16.mk b/package/fp16/fp16.mk new file mode 100644 index 0000000000..80710523fb --- /dev/null +++ b/package/fp16/fp16.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# fp16 +# +################################################################################ + +FP16_VERSION = 0a92994d729ff76a58f692d3028ca1b64b145d91 +FP16_SITE = $(call github,Maratyszcza,FP16,$(FP16_VERSION)) +FP16_LICENSE = MIT +FP16_LICENSE_FILES = LICENSE +FP16_INSTALL_STAGING = YES +# Only installs a header +FP16_INSTALL_TARGET = NO +FP16_DEPENDENCIES = psimd +FP16_CONF_OPTS = \ + -DFP16_BUILD_TESTS=OFF \ + -DFP16_BUILD_BENCHMARKS=OFF \ + -DPSIMD_SOURCE_DIR="$(PSIMD_DIR)" + +$(eval $(cmake-package)) diff --git a/package/gemmlowp/Config.in b/package/gemmlowp/Config.in new file mode 100644 index 0000000000..379450d1b0 --- /dev/null +++ b/package/gemmlowp/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_GEMMLOWP + bool "gemmlowp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + Low-precision matrix multiplication. + + https://github.com/google/gemmlowp + +comment "gemmlowp needs a toolchain w/ C++11" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 diff --git a/package/gemmlowp/gemmlowp.hash b/package/gemmlowp/gemmlowp.hash new file mode 100644 index 0000000000..7c56a18bb6 --- /dev/null +++ b/package/gemmlowp/gemmlowp.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 cc8a22b6f071c3781e6b4b72654c89b1cdc198e72ebadebb17638eac205344c1 gemmlowp-08e4bb339e34017a0835269d4a37c4ea04d15a69.tar.gz +# License files, locally calculated +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/package/gemmlowp/gemmlowp.mk b/package/gemmlowp/gemmlowp.mk new file mode 100644 index 0000000000..9489dccbe5 --- /dev/null +++ b/package/gemmlowp/gemmlowp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# gemmlowp +# +################################################################################ + +GEMMLOWP_VERSION = 08e4bb339e34017a0835269d4a37c4ea04d15a69 +GEMMLOWP_SITE = $(call github,google,gemmlowp,$(GEMMLOWP_VERSION)) +GEMMLOWP_LICENSE = Apache-2.0 +GEMMLOWP_LICENSE_FILES = LICENSE +GEMMLOWP_INSTALL_STAGING = YES +# Only installs a header +GEMMLOWP_INSTALL_TARGET = NO +GEMMLOWP_SUBDIR = contrib + +$(eval $(cmake-package)) diff --git a/package/psimd/Config.in b/package/psimd/Config.in new file mode 100644 index 0000000000..c5c51ca2ef --- /dev/null +++ b/package/psimd/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PSIMD + bool "psimd" + help + Portable 128-bit SIMD intrinsics. + + https://github.com/Maratyszcza/psimd diff --git a/package/psimd/psimd.hash b/package/psimd/psimd.hash new file mode 100644 index 0000000000..5692e79bd6 --- /dev/null +++ b/package/psimd/psimd.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 f6c4dab91ae9a03b3019e7cab0572743afd0e1b6e75b97fcca50259c737c924e psimd-072586a71b55b7f8c584153d223e95687148a900.tar.gz +# License files, locally calculated +sha256 984ce1e0b8ee89d234e28b960381f240e03a07a8031f35012f9c3256f56964e2 LICENSE diff --git a/package/psimd/psimd.mk b/package/psimd/psimd.mk new file mode 100644 index 0000000000..be0090a32f --- /dev/null +++ b/package/psimd/psimd.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# psimd +# +################################################################################ + +PSIMD_VERSION = 072586a71b55b7f8c584153d223e95687148a900 +PSIMD_SITE = $(call github,Maratyszcza,psimd,$(PSIMD_VERSION)) +PSIMD_LICENSE = MIT +PSIMD_LICENSE_FILES = LICENSE +PSIMD_INSTALL_STAGING = YES +# Only installs a header +PSIMD_INSTALL_TARGET = NO + +$(eval $(cmake-package)) diff --git a/package/pthreadpool/Config.in b/package/pthreadpool/Config.in new file mode 100644 index 0000000000..194ae33f85 --- /dev/null +++ b/package/pthreadpool/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PTHREADPOOL + bool "pthreadpool" + select BR2_PACKAGE_FXDIV + help + Pthreadpool is a portable and efficient thread pool + implementation. + + https://github.com/Maratyszcza/pthreadpool diff --git a/package/pthreadpool/pthreadpool.hash b/package/pthreadpool/pthreadpool.hash new file mode 100644 index 0000000000..8f15132595 --- /dev/null +++ b/package/pthreadpool/pthreadpool.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 6b0018ce7c926b718ed3ecbed1e48c8a083df60529b33ef2c7232260d3c32f61 pthreadpool-edeb5d6b967bef092ff195ab40e216fa5ac11f61.tar.gz +# License files, locally calculated +sha256 57814a606b4d0fb087d9a534919084b6c11b58a4174cb5a4aef200187780dc3a LICENSE diff --git a/package/pthreadpool/pthreadpool.mk b/package/pthreadpool/pthreadpool.mk new file mode 100644 index 0000000000..75327951df --- /dev/null +++ b/package/pthreadpool/pthreadpool.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# pthreadpool +# +################################################################################ + +PTHREADPOOL_VERSION = edeb5d6b967bef092ff195ab40e216fa5ac11f61 +PTHREADPOOL_SITE = $(call github,Maratyszcza,pthreadpool,$(PTHREADPOOL_VERSION)) +PTHREADPOOL_LICENSE = BSD-2-Clause +PTHREADPOOL_LICENSE_FILES = LICENSE +PTHREADPOOL_INSTALL_STAGING = YES +PTHREADPOOL_DEPENDENCIES = fxdiv + +PTHREADPOOL_CFLAGS = $(TARGET_CFLAGS) +PTHREADPOOL_CXXFLAGS = $(TARGET_CXXFLAGS) + +ifeq ($(BR2_PACKAGE_CPUINFO),y) +PTHREADPOOL_DEPENDENCIES += cpuinfo +PTHREADPOOL_CFLAGS += -DPTHREADPOOL_USE_CPUINFO=1 +PTHREADPOOL_CXXFLAGS += -DPTHREADPOOL_USE_CPUINFO=1 +else +PTHREADPOOL_CFLAGS += -DPTHREADPOOL_USE_CPUINFO=0 +PTHREADPOOL_CXXFLAGS += -DPTHREADPOOL_USE_CPUINFO=0 +endif + +PTHREADPOOL_CONF_OPTS = \ + -DCMAKE_C_FLAGS="$(PTHREADPOOL_CFLAGS)" \ + -DCMAKE_CXX_FLAGS="$(PTHREADPOOL_CXXFLAGS)" \ + -DFXDIV_SOURCE_DIR="$(FXDIV_DIR)" \ + -DPTHREADPOOL_BUILD_TESTS=OFF \ + -DPTHREADPOOL_BUILD_BENCHMARKS=OFF + +$(eval $(cmake-package)) diff --git a/package/ruy/Config.in b/package/ruy/Config.in new file mode 100644 index 0000000000..cc137a403c --- /dev/null +++ b/package/ruy/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_RUY_ARCH_SUPPORTS + bool + default y if BR2_PACKAGE_CPUINFO_ARCH_SUPPORTS + +config BR2_PACKAGE_RUY + bool "ruy" + depends on BR2_PACKAGE_CPUINFO_ARCH_SUPPORTS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14 + depends on BR2_TOOLCHAIN_HAS_THREADS # cpuinfo + select BR2_PACKAGE_CPUINFO + help + Ruy is a matrix multiplication library. Its focus is to cover + the matrix multiplication needs of neural network inference + engines. Its initial user has been TensorFlow Lite, where it + is used by default on the ARM CPU architecture. + + https://github.com/google/ruy + +comment "ruy needs a toolchain w/ C++14, threads" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ruy/ruy.hash b/package/ruy/ruy.hash new file mode 100644 index 0000000000..675b457b1c --- /dev/null +++ b/package/ruy/ruy.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 e151a5b55059a6e83ded001787e1a8889ba1e5e4eaa5bc836b9b660e7e1cb519 ruy-21a85fef159f9942f636a43b14c64b481c2a05b2.tar.gz +# License files, locally calculated +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/package/ruy/ruy.mk b/package/ruy/ruy.mk new file mode 100644 index 0000000000..1e8141f91b --- /dev/null +++ b/package/ruy/ruy.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# ruy +# +################################################################################ + +RUY_VERSION = 21a85fef159f9942f636a43b14c64b481c2a05b2 +RUY_SITE = $(call github,google,ruy,$(RUY_VERSION)) +RUY_LICENSE = Apache-2.0 +RUY_LICENSE_FILES = LICENSE +RUY_INSTALL_STAGING = YES +RUY_DEPENDENCIES = cpuinfo +RUY_CONF_OPTS = \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DRUY_FIND_CPUINFO=ON \ + -DRUY_MINIMAL_BUILD=ON + +$(eval $(cmake-package)) diff --git a/package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch b/package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch new file mode 100644 index 0000000000..53b5170681 --- /dev/null +++ b/package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch @@ -0,0 +1,49 @@ +From 081c2e4e3cf021efb2853a485a18b563e88f6117 Mon Sep 17 00:00:00 2001 +From: Terry Heo +Date: Tue, 1 Nov 2022 15:55:30 -0700 +Subject: [PATCH] lite: Update CMakeLists.txt + +This changes are needed to build kernel tests. + +PiperOrigin-RevId: 485439972 + +Signed-off-by: James Hilliard +[james.hilliard1@gmail.com: backport from upstream commit +081c2e4e3cf021efb2853a485a18b563e88f6117] +--- + tensorflow/lite/CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 9dfbb4b72f3..fd8b3faf1e2 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -209,6 +209,9 @@ list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*tflite_with_xnnpack\\.cc$") + # Exclude Flex related files. + list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*with_selected_ops\\.cc$") + ++# Exclude tensorflow_profiler_logger files. ++list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*tensorflow_profiler_logger\\.cc$") ++ + if(_TFLITE_ENABLE_MMAP) + list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*mmap_allocation_disabled\\.cc$") + else() +@@ -222,6 +225,7 @@ if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "iOS") + endif() + populate_tflite_source_vars("core" TFLITE_CORE_SRCS) + populate_tflite_source_vars("core/api" TFLITE_CORE_API_SRCS) ++populate_tflite_source_vars("core/c" TFLITE_CORE_C_SRCS) + populate_tflite_source_vars("c" TFLITE_C_SRCS) + populate_tflite_source_vars("delegates" TFLITE_DELEGATES_SRCS) + if(TFLITE_ENABLE_GPU) +@@ -483,6 +487,7 @@ endif() + # TFLite library + set(_ALL_TFLITE_SRCS + ${TFLITE_CORE_API_SRCS} ++ ${TFLITE_CORE_C_SRCS} + ${TFLITE_CORE_SRCS} + ${TFLITE_C_SRCS} + ${TFLITE_DELEGATES_FLEX_SRCS} +-- +2.34.1 + diff --git a/package/tensorflow-lite/0002-Add-SYSTEM_FARMHASH-cmake-config-flag.patch b/package/tensorflow-lite/0002-Add-SYSTEM_FARMHASH-cmake-config-flag.patch new file mode 100644 index 0000000000..99db29e354 --- /dev/null +++ b/package/tensorflow-lite/0002-Add-SYSTEM_FARMHASH-cmake-config-flag.patch @@ -0,0 +1,74 @@ +From d8451a9048d09692994c40a6f9bc928e70ed79b5 Mon Sep 17 00:00:00 2001 +From: James Hilliard +Date: Mon, 28 Nov 2022 21:36:34 -0700 +Subject: [PATCH] Add SYSTEM_FARMHASH cmake config flag + +Since farmhash does not install a cmake package we need to +search for the library and headers to use the provided +version. + +Signed-off-by: James Hilliard +[james.hilliard1@gmail.com: backport from upstream commit +d8451a9048d09692994c40a6f9bc928e70ed79b5] +--- + tensorflow/lite/g3doc/guide/build_cmake.md | 1 + + .../tools/cmake/modules/Findfarmhash.cmake | 30 +++++++++++++++---- + 2 files changed, 26 insertions(+), 5 deletions(-) + +diff --git a/tensorflow/lite/g3doc/guide/build_cmake.md b/tensorflow/lite/g3doc/guide/build_cmake.md +index 6950a365bb8..6de955e70b0 100644 +--- a/tensorflow/lite/g3doc/guide/build_cmake.md ++++ b/tensorflow/lite/g3doc/guide/build_cmake.md +@@ -81,6 +81,7 @@ variables to point to your library installations. + ```sh + cmake ../tensorflow_src/tensorflow/lite -DTFLITE_ENABLE_INSTALL=ON \ + -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \ ++ -DSYSTEM_FARMHASH=ON \ + -Dabsl_DIR=/lib/cmake/absl \ + -DEigen3_DIR=/share/eigen3/cmake \ + -DFlatbuffers_DIR=/lib/cmake/flatbuffers \ +diff --git a/tensorflow/lite/tools/cmake/modules/Findfarmhash.cmake b/tensorflow/lite/tools/cmake/modules/Findfarmhash.cmake +index 1b0dc28f624..97b43298f13 100644 +--- a/tensorflow/lite/tools/cmake/modules/Findfarmhash.cmake ++++ b/tensorflow/lite/tools/cmake/modules/Findfarmhash.cmake +@@ -13,12 +13,32 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-# tensorflow-lite uses find_package for this package, so override the system +-# installation and build from source instead. +-include(farmhash) +-if(farmhash_POPULATED) ++# tensorflow-lite uses find_package for this package, so build from ++# source if the system version is not enabled. ++ ++if(SYSTEM_FARMHASH) ++ include(FindPackageHandleStandardArgs) ++ find_path(FARMHASH_ROOT_DIR NAMES include/farmhash.h) ++ find_library(FARMHASH_LIB NAMES farmhash PATHS ${FARMHASH_ROOT_DIR}/lib ${FARMHASH_LIB_PATH}) ++ find_path(FARMHASH_INCLUDE_DIRS NAMES farmhash.h PATHS ${FARMHASH_ROOT_DIR}/include) ++ find_package_handle_standard_args(farmhash DEFAULT_MSG FARMHASH_LIB FARMHASH_INCLUDE_DIRS) ++endif() ++ ++if(farmhash_FOUND) ++ add_library(farmhash SHARED IMPORTED GLOBAL) ++ set_target_properties(farmhash PROPERTIES ++ IMPORTED_LOCATION ${FARMHASH_LIB} ++ INTERFACE_INCLUDE_DIRECTORIES ${FARMHASH_INCLUDE_DIRS} ++ ) ++else() ++ include(farmhash) ++ if(farmhash_POPULATED) ++ get_target_property(FARMHASH_INCLUDE_DIRS farmhash INTERFACE_DIRECTORIES) ++ endif() ++endif() ++ ++if(farmhash_FOUND OR farmhash_POPULATED) + set(FARMHASH_FOUND TRUE) +- get_target_property(FARMHASH_INCLUDE_DIRS farmhash INTERFACE_DIRECTORIES) + add_library(farmhash::farmhash ALIAS farmhash) + set(FARMHASH_LIBRARIES farmhash::farmhash) + endif() +-- +2.34.1 + diff --git a/package/tensorflow-lite/0003-Fix-FindFlatBuffers-cmake-file.patch b/package/tensorflow-lite/0003-Fix-FindFlatBuffers-cmake-file.patch new file mode 100644 index 0000000000..1d511ca441 --- /dev/null +++ b/package/tensorflow-lite/0003-Fix-FindFlatBuffers-cmake-file.patch @@ -0,0 +1,51 @@ +From d8f98dd9f2b437cca5954b38cb48d9c21733f67d Mon Sep 17 00:00:00 2001 +From: James Hilliard +Date: Thu, 24 Nov 2022 14:29:06 -0700 +Subject: [PATCH] Fix FindFlatBuffers cmake file + +Capitalization needs to match for system cmake override to work: +https://github.com/google/flatbuffers/blob/v22.11.23/CMake/FindFlatBuffers.cmake + +Signed-off-by: James Hilliard +[james.hilliard1@gmail.com: backport from upstream commit +d8f98dd9f2b437cca5954b38cb48d9c21733f67d] +--- + tensorflow/lite/CMakeLists.txt | 2 +- + tensorflow/lite/g3doc/guide/build_cmake.md | 2 +- + .../modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} | 0 + 3 files changed, 2 insertions(+), 2 deletions(-) + rename tensorflow/lite/tools/cmake/modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} (100%) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..c2ee9edfb61 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -143,7 +143,7 @@ find_package(absl REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(farmhash REQUIRED) + find_package(fft2d REQUIRED) +-find_package(Flatbuffers REQUIRED) ++find_package(FlatBuffers REQUIRED) + find_package(gemmlowp REQUIRED) + find_package(NEON_2_SSE REQUIRED) + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library +diff --git a/tensorflow/lite/g3doc/guide/build_cmake.md b/tensorflow/lite/g3doc/guide/build_cmake.md +index 6950a365bb8..9cb7ebac326 100644 +--- a/tensorflow/lite/g3doc/guide/build_cmake.md ++++ b/tensorflow/lite/g3doc/guide/build_cmake.md +@@ -83,7 +83,7 @@ cmake ../tensorflow_src/tensorflow/lite -DTFLITE_ENABLE_INSTALL=ON \ + -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \ + -Dabsl_DIR=/lib/cmake/absl \ + -DEigen3_DIR=/share/eigen3/cmake \ +- -DFlatbuffers_DIR=/lib/cmake/flatbuffers \ ++ -DFlatBuffers_DIR=/lib/cmake/flatbuffers \ + -DNEON_2_SSE_DIR=/lib/cmake/NEON_2_SSE \ + -Dcpuinfo_DIR=/share/cpuinfo \ + -Druy_DIR=/lib/cmake/ruy +diff --git a/tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake b/tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +similarity index 100% +rename from tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake +rename to tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +-- +2.34.1 + diff --git a/package/tensorflow-lite/0004-Don-t-link-tensorflow-lite-against-gemmlowp.patch b/package/tensorflow-lite/0004-Don-t-link-tensorflow-lite-against-gemmlowp.patch new file mode 100644 index 0000000000..d9ad78ef9e --- /dev/null +++ b/package/tensorflow-lite/0004-Don-t-link-tensorflow-lite-against-gemmlowp.patch @@ -0,0 +1,32 @@ +From fb584589f707853d85a081c99b1b82598c2631c1 Mon Sep 17 00:00:00 2001 +From: James Hilliard +Date: Thu, 24 Nov 2022 15:10:27 -0700 +Subject: [PATCH] Don't link tensorflow-lite against gemmlowp + +We can't link against gemmlowp as it is a header only library. + +Fixes: +/bin/ld: cannot find -lgemmlowp: No such file or directory + +Signed-off-by: James Hilliard +[james.hilliard1@gmail.com: backport from upstream commit +fb584589f707853d85a081c99b1b82598c2631c1] +--- + tensorflow/lite/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..3fe5ed15605 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -560,7 +560,6 @@ target_link_libraries(tensorflow-lite + farmhash + fft2d_fftsg2d + flatbuffers::flatbuffers +- gemmlowp + ruy::ruy + pthreadpool + ${CMAKE_DL_LIBS} +-- +2.34.1 + diff --git a/package/tensorflow-lite/2000-fix-missing-cstdint-for-aarch64.patch b/package/tensorflow-lite/2000-fix-missing-cstdint-for-aarch64.patch new file mode 100644 index 0000000000..ad84c17c60 --- /dev/null +++ b/package/tensorflow-lite/2000-fix-missing-cstdint-for-aarch64.patch @@ -0,0 +1,11 @@ +diff -Naur tensorflow-lite-2.11.0.orig/tensorflow/lite/kernels/internal/spectrogram.h tensorflow-lite-2.11.0/tensorflow/lite/kernels/internal/spectrogram.h +--- tensorflow-lite-2.11.0.orig/tensorflow/lite/kernels/internal/spectrogram.h 2022-11-15 17:17:12.000000000 -0800 ++++ tensorflow-lite-2.11.0/tensorflow/lite/kernels/internal/spectrogram.h 2024-03-13 13:36:00.976492144 -0700 +@@ -32,6 +32,7 @@ + #define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_ + + #include ++#include + #include + #include + diff --git a/package/tensorflow-lite/Config.in b/package/tensorflow-lite/Config.in new file mode 100644 index 0000000000..8685ec0c71 --- /dev/null +++ b/package/tensorflow-lite/Config.in @@ -0,0 +1,36 @@ +config BR2_PACKAGE_TENSORFLOW_LITE_ARCH_SUPPORTS + bool + default y if BR2_aarch64 + default y if BR2_arm + default y if BR2_i386 + default y if BR2_x86_64 + depends on BR2_PACKAGE_CPUINFO_ARCH_SUPPORTS + +config BR2_PACKAGE_TENSORFLOW_LITE + bool "tensorflow-lite" + depends on BR2_PACKAGE_TENSORFLOW_LITE_ARCH_SUPPORTS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17 + depends on BR2_TOOLCHAIN_HAS_THREADS # cpuinfo + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_SHARED_LIBS + select BR2_PACKAGE_CPUINFO + select BR2_PACKAGE_EIGEN + select BR2_PACKAGE_FARMHASH + select BR2_PACKAGE_FFT2D + select BR2_PACKAGE_FLATBUFFERS + select BR2_PACKAGE_GEMMLOWP + select BR2_PACKAGE_LIBABSEIL_CPP + select BR2_PACKAGE_NEON_2_SSE + select BR2_PACKAGE_RUY if BR2_PACKAGE_RUY_ARCH_SUPPORTS + select BR2_PACKAGE_XNNPACK if BR2_PACKAGE_XNNPACK_ARCH_SUPPORTS + help + Tensorflow Lite dynamic library and headers: Inference engine + to run previously trained machine learning models. + +comment "tensorflow-lite needs a toolchain w/ glibc, C++17, threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || !BR2_TOOLCHAIN_HAS_THREADS + +comment "tensorflow-lite needs a toolchain w/ shared libraries" + depends on !BR2_SHARED_LIBS diff --git a/package/tensorflow-lite/tensorflow-lite.hash b/package/tensorflow-lite/tensorflow-lite.hash new file mode 100644 index 0000000000..7d9035707b --- /dev/null +++ b/package/tensorflow-lite/tensorflow-lite.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48 tensorflow-lite-2.11.0.tar.gz +# License files, locally calculated +sha256 71c6915d04265772a0339bed47276942c678b45cc01534210ebe6984fd1aec65 LICENSE diff --git a/package/tensorflow-lite/tensorflow-lite.mk b/package/tensorflow-lite/tensorflow-lite.mk new file mode 100644 index 0000000000..433eff3242 --- /dev/null +++ b/package/tensorflow-lite/tensorflow-lite.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# tensorflow-lite +# +################################################################################ + +TENSORFLOW_LITE_VERSION = 2.11.0 +TENSORFLOW_LITE_SITE = $(call github,tensorflow,tensorflow,v$(TENSORFLOW_LITE_VERSION)) +TENSORFLOW_LITE_INSTALL_STAGING = YES +TENSORFLOW_LITE_LICENSE = Apache-2.0 +TENSORFLOW_LITE_LICENSE_FILES = LICENSE +TENSORFLOW_LITE_SUBDIR = tensorflow/lite +TENSORFLOW_LITE_SUPPORTS_IN_SOURCE_BUILD = NO +TENSORFLOW_LITE_DEPENDENCIES += \ + host-pkgconf \ + host-flatbuffers \ + cpuinfo \ + eigen \ + farmhash \ + fft2d \ + flatbuffers \ + gemmlowp \ + libabseil-cpp \ + neon-2-sse + +TENSORFLOW_LITE_CONF_OPTS = \ + -Dabsl_DIR=$(STAGING_DIR)/usr/lib/cmake/absl \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -I$(STAGING_DIR)/usr/include/gemmlowp" \ + -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DEigen3_DIR=$(STAGING_DIR)/usr/share/eigen3/cmake \ + -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ + -DFETCHCONTENT_QUIET=OFF \ + -DFFT2D_SOURCE_DIR=$(STAGING_DIR)/usr/include/fft2d \ + -DFlatBuffers_DIR=$(STAGING_DIR)/usr/lib/cmake/flatbuffers \ + -DNEON_2_SSE_DIR=$(STAGING_DIR)/usr/lib/cmake/NEON_2_SSE \ + -DSYSTEM_FARMHASH=ON \ + -DTFLITE_ENABLE_EXTERNAL_DELEGATE=ON \ + -DTFLITE_ENABLE_GPU=OFF \ + -DTFLITE_ENABLE_INSTALL=ON \ + -DTFLITE_ENABLE_MMAP=ON \ + -DTFLITE_ENABLE_NNAPI=OFF + +ifeq ($(BR2_PACKAGE_RUY),y) +TENSORFLOW_LITE_DEPENDENCIES += ruy +TENSORFLOW_LITE_CONF_OPTS += -DTFLITE_ENABLE_RUY=ON +else +TENSORFLOW_LITE_CONF_OPTS += -DTFLITE_ENABLE_RUY=OFF +endif + +ifeq ($(BR2_PACKAGE_XNNPACK),y) +TENSORFLOW_LITE_DEPENDENCIES += xnnpack +TENSORFLOW_LITE_CONF_OPTS += -DTFLITE_ENABLE_XNNPACK=ON -Dxnnpack_POPULATED=ON +else +TENSORFLOW_LITE_CONF_OPTS += -DTFLITE_ENABLE_XNNPACK=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/xnnpack/Config.in b/package/xnnpack/Config.in new file mode 100644 index 0000000000..1b186ac055 --- /dev/null +++ b/package/xnnpack/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_XNNPACK_ARCH_SUPPORTS + bool + default y if BR2_aarch64 + default y if BR2_arm + default y if BR2_i386 + default y if BR2_x86_64 + depends on BR2_PACKAGE_CPUINFO_ARCH_SUPPORTS + +config BR2_PACKAGE_XNNPACK + bool "xnnpack" + depends on BR2_PACKAGE_XNNPACK_ARCH_SUPPORTS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14 + depends on BR2_TOOLCHAIN_HAS_THREADS # cpuinfo + select BR2_PACKAGE_CPUINFO + select BR2_PACKAGE_FP16 + select BR2_PACKAGE_FXDIV + select BR2_PACKAGE_PTHREADPOOL + help + XNNPACK is a highly optimized solution for neural network + inference on ARM, x86, WebAssembly, and RISC-V platforms. + + https://github.com/google/XNNPACK + +comment "xnnpack needs a toolchain w/ C++14, threads" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/xnnpack/xnnpack.hash b/package/xnnpack/xnnpack.hash new file mode 100644 index 0000000000..e31eb690e2 --- /dev/null +++ b/package/xnnpack/xnnpack.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 fb519d082e5fcaa11e849386ad00e38b9ebde2cc9363032394516cd0d00295c3 xnnpack-e4b2b942b4a6d84b680ed690fee42ae99865945c.tar.gz +# License files, locally calculated +sha256 63f519e15726f4c4f830bd958f694c84fecb4e0a4cacc527d2696bb71ef95ada LICENSE diff --git a/package/xnnpack/xnnpack.mk b/package/xnnpack/xnnpack.mk new file mode 100644 index 0000000000..f53f45dc74 --- /dev/null +++ b/package/xnnpack/xnnpack.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xnnpack +# +################################################################################ + +XNNPACK_VERSION = e4b2b942b4a6d84b680ed690fee42ae99865945c +XNNPACK_SITE = $(call github,google,XNNPACK,$(XNNPACK_VERSION)) +XNNPACK_LICENSE = BSD-3-Clause +XNNPACK_LICENSE_FILES = LICENSE +XNNPACK_INSTALL_STAGING = YES +XNNPACK_DEPENDENCIES = cpuinfo fp16 fxdiv pthreadpool +XNNPACK_CONF_OPTS = \ + -DXNNPACK_BUILD_TESTS=OFF \ + -DXNNPACK_BUILD_BENCHMARKS=OFF \ + -DXNNPACK_USE_SYSTEM_LIBS=ON + +$(eval $(cmake-package)) From e3709d6cf2209471885bf4e11c610beada95a8ab Mon Sep 17 00:00:00 2001 From: Charles Hardin Date: Mon, 25 Mar 2024 19:40:29 -0700 Subject: [PATCH 42/42] package/gst1-plugins-good: add qt5tools as a dependency During a configuration with per-package, seeing the following meson build error which is resolved when the qt5tools are declared explicitly as a dependency. build/gst1-plugins-good-1.22.9/ext/qt/meson.build:48:4: \ ERROR: Problem encountered: qt5 qmlglsink plugin is enabled, \ but qt specific tools were not found Signed-off-by: Charles Hardin --- package/gstreamer1/gst1-plugins-good/Config.in | 1 + package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package/gstreamer1/gst1-plugins-good/Config.in b/package/gstreamer1/gst1-plugins-good/Config.in index e1e2674a4a..78e09601bf 100644 --- a/package/gstreamer1/gst1-plugins-good/Config.in +++ b/package/gstreamer1/gst1-plugins-good/Config.in @@ -293,6 +293,7 @@ config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_QMLGL select BR2_PACKAGE_QT5BASE_WIDGETS select BR2_PACKAGE_QT5DECLARATIVE select BR2_PACKAGE_QT5DECLARATIVE_QUICK + select BR2_PACKAGE_QT5TOOLS select BR2_PACKAGE_QT5X11EXTRAS if BR2_PACKAGE_QT5BASE_XCB help QT5 plugin which includes elements qmlglsrc and qmlglsink diff --git a/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk index a1ad63915d..2bb826d807 100644 --- a/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +++ b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk @@ -357,7 +357,7 @@ endif ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_QMLGL),y) GST1_PLUGINS_GOOD_CONF_OPTS += -Dqt5=enabled -GST1_PLUGINS_GOOD_DEPENDENCIES += qt5declarative +GST1_PLUGINS_GOOD_DEPENDENCIES += qt5declarative qt5tools ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y) GST1_PLUGINS_GOOD_DEPENDENCIES += qt5x11extras endif