diff options
Diffstat (limited to 'meta/recipes-bsp')
72 files changed, 907 insertions, 1919 deletions
diff --git a/meta/recipes-bsp/acpid/acpid.inc b/meta/recipes-bsp/acpid/acpid.inc index 1e43e7a9db..3d6f75f90f 100644 --- a/meta/recipes-bsp/acpid/acpid.inc +++ b/meta/recipes-bsp/acpid/acpid.inc @@ -8,12 +8,13 @@ admin." HOMEPAGE = "http://sourceforge.net/projects/acpid2" BUGTRACKER = "http://sourceforge.net/p/acpid2/tickets/?source=navbar" SECTION = "base" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \ file://init \ file://acpid.service \ - " + file://0001-Replace-stat64-with-stat.patch \ + " CVE_PRODUCT = "acpid2" @@ -22,17 +23,17 @@ inherit autotools update-rc.d systemd INITSCRIPT_NAME = "acpid" INITSCRIPT_PARAMS = "defaults" -SYSTEMD_SERVICE_${PN} = "acpid.service" +SYSTEMD_SERVICE:${PN} = "acpid.service" -do_install_append () { +do_install:append () { install -d ${D}${sysconfdir}/init.d - sed -e 's,/usr/sbin,${sbindir},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/acpid + sed -e 's,/usr/sbin,${sbindir},g' ${UNPACKDIR}/init > ${D}${sysconfdir}/init.d/acpid chmod 755 ${D}${sysconfdir}/init.d/acpid install -d ${D}${sysconfdir}/acpi install -d ${D}${sysconfdir}/acpi/events - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/acpid.service ${D}${systemd_unitdir}/system - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/acpid.service + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/acpid.service ${D}${systemd_system_unitdir} + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/acpid.service } diff --git a/meta/recipes-bsp/acpid/acpid/0001-Replace-stat64-with-stat.patch b/meta/recipes-bsp/acpid/acpid/0001-Replace-stat64-with-stat.patch new file mode 100644 index 0000000000..10abfc8388 --- /dev/null +++ b/meta/recipes-bsp/acpid/acpid/0001-Replace-stat64-with-stat.patch @@ -0,0 +1,31 @@ +From 4b729235a9e96f120feee7e3746818aad0f3b924 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 14 Dec 2022 15:04:30 -0800 +Subject: [PATCH] Replace stat64 with stat + +It already checks for largefile support in configure.ac via +AC_SYS_LARGEFILE macro, which will ensure that 64bit elements +are correctly setup for stat APIs on platforms needing large +file support. + +Upstream-Status: Submitted [https://sourceforge.net/p/acpid2/code/merge-requests/5/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + sock.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sock.c b/sock.c +index 9e04501..3121fb7 100644 +--- a/sock.c ++++ b/sock.c +@@ -54,8 +54,8 @@ int non_root_clients; + static int + isfdtype(int fd, int fdtype) + { +- struct stat64 st; +- if (fstat64(fd, &st) != 0) ++ struct stat st; ++ if (fstat(fd, &st) != 0) + return -1; + return ((st.st_mode & S_IFMT) == (mode_t)fdtype); + } diff --git a/meta/recipes-bsp/acpid/acpid_2.0.32.bb b/meta/recipes-bsp/acpid/acpid_2.0.34.bb index 227e4a4675..1e0a6d5f24 100644 --- a/meta/recipes-bsp/acpid/acpid_2.0.32.bb +++ b/meta/recipes-bsp/acpid/acpid_2.0.34.bb @@ -3,5 +3,4 @@ require acpid.inc LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5" -SRC_URI[md5sum] = "248995264b9d1cd8bdb923d5b190fd44" -SRC_URI[sha256sum] = "f2d2d30b3edc3234bd82f6f7186699a6aa3c85c8d20bc4e30e9b3c68a1ed157e" +SRC_URI[sha256sum] = "2d095c8cfcbc847caec746d62cdc8d0bff1ec1bc72ef7c674c721e04da6ab333" diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb index cec2272c80..099fbd3b9d 100644 --- a/meta/recipes-bsp/alsa-state/alsa-state.bb +++ b/meta/recipes-bsp/alsa-state/alsa-state.bb @@ -8,10 +8,12 @@ SUMMARY = "Alsa scenario files to enable alsa state restoration" HOMEPAGE = "http://www.alsa-project.org/" DESCRIPTION = "Alsa Scenario Files - an init script and state files to restore \ sound state at system boot and save it at system shut down." -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LICENSE = "MIT & GPL-2.0-or-later" +LIC_FILES_CHKSUM = " \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \ + file://alsa-state-init;beginline=3;endline=4;md5=3ff7ecbf534d7d503941abe8e268ef50 \ +" PV = "0.2.0" -PR = "r5" SRC_URI = "\ file://asound.conf \ @@ -19,7 +21,8 @@ SRC_URI = "\ file://alsa-state-init \ " -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" # As the recipe doesn't inherit systemd.bbclass, we need to set this variable # manually to avoid unnecessary postinst/preinst generated. @@ -36,28 +39,28 @@ INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ." do_install() { # Only install the init script when 'sysvinit' is in DISTRO_FEATURES. if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then - sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state-init + sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${S}/alsa-state-init install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state + install -m 0755 ${S}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state fi install -d ${D}/${localstatedir}/lib/alsa install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa + install -m 0644 ${S}/asound.conf ${D}${sysconfdir} + install -m 0644 ${S}/*.state ${D}${localstatedir}/lib/alsa } PACKAGES += "alsa-states" -RRECOMMENDS_alsa-state = "alsa-states" +RRECOMMENDS:alsa-state = "alsa-states" -RDEPENDS_${PN} = "alsa-utils-alsactl" -FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf" -CONFFILES_${PN} = "${sysconfdir}/asound.conf" +RDEPENDS:${PN} = "alsa-utils-alsactl" +FILES:${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf" +CONFFILES:${PN} = "${sysconfdir}/asound.conf" -FILES_alsa-states = "${localstatedir}/lib/alsa/*.state" +FILES:alsa-states = "${localstatedir}/lib/alsa/*.state" -pkg_postinst_${PN}() { +pkg_postinst:${PN}() { if test -z "$D" then if test -x ${sbindir}/alsactl diff --git a/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init index eee59cb321..a04cc27004 100755 --- a/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init +++ b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init @@ -1,10 +1,9 @@ #! /bin/sh # # Copyright Matthias Hentges <devel@hentges.net> (c) 2007 -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) +# SPDX-License-Identifier: GPL-2.0-or-later # # Filename: alsa-state -# Date: 20070308 (YMD) # source function library . /etc/init.d/functions diff --git a/meta/recipes-bsp/apmd/apmd/apmd.service b/meta/recipes-bsp/apmd/apmd/apmd.service deleted file mode 100644 index ffab82334f..0000000000 --- a/meta/recipes-bsp/apmd/apmd/apmd.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Advanced Power Management daemon -After=remote-fs.target - -[Service] -EnvironmentFile=-@SYSCONFDIR@/default/apmd -ExecStart=@SBINDIR@/apmd -P @SYSCONFDIR@/apm/apmd_proxy $APMD diff --git a/meta/recipes-bsp/apmd/apmd/apmd_proxy b/meta/recipes-bsp/apmd/apmd/apmd_proxy deleted file mode 100644 index c48ee4e5d5..0000000000 --- a/meta/recipes-bsp/apmd/apmd/apmd_proxy +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh -# -# apmd_proxy - program dispatcher for APM daemon -# -# Written by Craig Markwardt (craigm@lheamail.gsfc.nasa.gov) 21 May 1999 -# Modified for Debian by Avery Pennarun -# -# This shell script is called by the APM daemon (apmd) when a power -# management event occurs. Its first and second arguments describe the -# event. For example, apmd will call "apmd_proxy suspend system" just -# before the system is suspended. -# -# Here are the possible arguments: -# -# start - APM daemon has started -# stop - APM daemon is shutting down -# suspend critical - APM system indicates critical suspend (++) -# suspend system - APM system has requested suspend mode -# suspend user - User has requested suspend mode -# standby system - APM system has requested standby mode -# standby user - User has requested standby mode -# resume suspend - System has resumed from suspend mode -# resume standby - System has resumed from standby mode -# resume critical - System has resumed from critical suspend -# change battery - APM system reported low battery -# change power - APM system reported AC/battery change -# change time - APM system reported time change (*) -# change capability - APM system reported config. change (+) -# -# (*) - APM daemon may be configured to not call these sequences -# (+) - Available if APM kernel supports it. -# (++) - "suspend critical" is never passed to apmd from the kernel, -# so we will never see it here. Scripts that process "resume -# critical" events need to take this into account. -# -# It is the proxy script's responsibility to examine the APM status -# (via /proc/apm) or other status and to take appropriate actions. -# For example, the script might unmount network drives before the -# machine is suspended. -# -# In Debian, the usual way of adding functionality to the proxy is to -# add a script to /etc/apm/event.d. This script will be called by -# apmd_proxy (via run-parts) with the same arguments. -# -# If it is important that a certain set of script be run in a certain -# order on suspend and in a different order on resume, then put all -# the scripts in /etc/apm/scripts.d instead of /etc/apm/event.d and -# symlink to these from /etc/apm/suspend.d, /etc/apm/resume.d and -# /etc/apm/other.d using names whose lexicographical order is the same -# as the desired order of execution. -# -# If the kernel's APM driver supports it, apmd_proxy can return a non-zero -# exit status on suspend and standby events, indicating that the suspend -# or standby event should be rejected. -# -# ******************************************************************* - -set -e - -# The following doesn't yet work, because current kernels (up to at least -# 2.4.20) do not support rejection of APM events. Supporting this would -# require substantial modifications to the APM driver. We will re-enable -# this feature if the driver is ever modified. -- cph@debian.org -# -#SUSPEND_ON_AC=false -#[ -r /etc/apm/apmd_proxy.conf ] && . /etc/apm/apmd_proxy.conf -# -#if [ "${SUSPEND_ON_AC}" = "false" -a "${2}" = "system" ] \ -# && on_ac_power >/dev/null; then -# # Reject system suspends and standbys if we are on AC power -# exit 1 # Reject (NOTE kernel support must be enabled) -#fi - -if [ "${1}" = "suspend" -o "${1}" = "standby" ]; then - run-parts -a "${1}" -a "${2}" /etc/apm/event.d - if [ -d /etc/apm/suspend.d ]; then - run-parts -a "${1}" -a "${2}" /etc/apm/suspend.d - fi -elif [ "${1}" = "resume" ]; then - if [ -d /etc/apm/resume.d ]; then - run-parts -a "${1}" -a "${2}" /etc/apm/resume.d - fi - run-parts -a "${1}" -a "${2}" /etc/apm/event.d -else - run-parts -a "${1}" -a "${2}" /etc/apm/event.d - if [ -d /etc/apm/other.d ]; then - run-parts -a "${1}" -a "${2}" /etc/apm/other.d - fi -fi - -exit 0 diff --git a/meta/recipes-bsp/apmd/apmd/apmd_proxy.conf b/meta/recipes-bsp/apmd/apmd/apmd_proxy.conf deleted file mode 100644 index 751145c522..0000000000 --- a/meta/recipes-bsp/apmd/apmd/apmd_proxy.conf +++ /dev/null @@ -1,16 +0,0 @@ -# /etc/apm/apmd_proxy.conf: configuration file for apmd. -# -# This file is managed by debconf when installing or reconfiguring the -# package. It is generated by merging the answers gathered by debconf -# into the template file "/usr/share/apmd/apmd_proxy.conf". - -# The following doesn't yet work, because current kernels (up to at least -# 2.4.20) do not support rejection of APM events. Supporting this would -# require substantial modifications to the APM driver. We will re-enable -# this feature if the driver is ever modified. -- cph@debian.org -# -# Set the following to "false" if you want to reject system suspend or -# system standby requests when the computer is running on AC power. -# Otherwise set this to "true". Such requests are never rejected when -# the computer is running on battery power. -#SUSPEND_ON_AC=true diff --git a/meta/recipes-bsp/apmd/apmd/default b/meta/recipes-bsp/apmd/apmd/default deleted file mode 100644 index 4b7965abf8..0000000000 --- a/meta/recipes-bsp/apmd/apmd/default +++ /dev/null @@ -1,8 +0,0 @@ -# -# Default for /etc/init.d/apmd -# - -# As apmd can be called with arguments, we use the following variable -# to store them, e.g., APMD="-w 5 -p 2". -# See the manual page apmd(8) for details. -APMD="--proxy-timeout 30" diff --git a/meta/recipes-bsp/apmd/apmd/init b/meta/recipes-bsp/apmd/apmd/init deleted file mode 100755 index c0b41aa9d1..0000000000 --- a/meta/recipes-bsp/apmd/apmd/init +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: apmd -# Required-Start: $remote_fs -# Required-Stop: $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Advanced Power Management daemon -### END INIT INFO - -# Source function library. -. /etc/init.d/functions - -PATH=/bin:/usr/bin:/sbin:/usr/sbin - -[ -f /etc/default/rcS ] && . /etc/default/rcS -[ -f /etc/default/apmd ] && . /etc/default/apmd - -case "$1" in - start) - echo -n "Starting advanced power management daemon: " - start-stop-daemon -S -x /usr/sbin/apmd -- \ - -P /etc/apm/apmd_proxy $APMD - if [ $? = 0 ]; then - echo "apmd." - else - echo "(failed.)" - fi - ;; - stop) - echo -n "Stopping advanced power management daemon: " - start-stop-daemon -K \ - -x /usr/sbin/apmd - echo "apmd." - ;; - status) - status /usr/sbin/apmd; - exit $? - ;; - restart|force-reload) - $0 stop - $0 start - exit - ;; - *) - echo "Usage: /etc/init.d/apmd {start|stop|status|restart|force-reload}" - exit 1 - ;; -esac - -exit 0 diff --git a/meta/recipes-bsp/apmd/apmd/legacy.patch b/meta/recipes-bsp/apmd/apmd/legacy.patch deleted file mode 100644 index 8871311805..0000000000 --- a/meta/recipes-bsp/apmd/apmd/legacy.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 3595933d221f0ba836917debc0776b8723972ec9 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Tue, 11 Aug 2015 17:40:50 +0300 -Subject: [PATCH 1/3] Patch with fixes provided by Debian. - -This patch is taken from -ftp://ftp.debian.org/debian/pool/main/a/apmd/apmd_3.2.2-15.debian.tar.xz - -Upstream-Status: Inappropriate [upstream is dead] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - Makefile | 2 +- - apm.c | 3 ++- - apm.h | 9 +++++++++ - apmd.c | 15 ++++++++------- - 4 files changed, 20 insertions(+), 9 deletions(-) - -diff --git a/Makefile b/Makefile -index bf346d9..92fc0fd 100644 ---- a/Makefile -+++ b/Makefile -@@ -43,7 +43,7 @@ DESTDIR= - - CC=gcc - CFLAGS=-O -g --XTRACFLAGS=-Wall -pipe -I. -I/usr/src/linux/include \ -+XTRACFLAGS=-Wall -pipe -I. -I/usr/src/linux/include -I/usr/X11R6/include \ - -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include \ - -DVERSION=\"$(VERSION)\" \ - -DDEFAULT_PROXY_NAME=\"$(PROXY_DIR)/apmd_proxy\" -diff --git a/apm.c b/apm.c -index b21c057..0359b1c 100644 ---- a/apm.c -+++ b/apm.c -@@ -219,12 +219,13 @@ int main(int argc, char **argv) - } - } - -- -+#if 0 - if (!(i.apm_flags & APM_32_BIT_SUPPORT)) - { - fprintf(stderr, "32-bit APM interface not supported\n"); - exit(1); - } -+#endif - - if (verbose && (i.apm_flags & 0x10)) - printf("APM BIOS Power Management is currently disabled\n"); -diff --git a/apm.h b/apm.h -index fb24dfd..824cc06 100644 ---- a/apm.h -+++ b/apm.h -@@ -20,6 +20,13 @@ - * $Id: apm.h,v 1.7 1999/07/05 22:31:11 apenwarr Exp $ - * - */ -+#ifndef _APM_H -+#define _APM_H 1 -+ -+#ifndef __KERNEL_STRICT_NAMES -+#define __KERNEL_STRICT_NAMES -+#endif -+ - #include <linux/apm_bios.h> - #include <sys/types.h> - -@@ -93,3 +100,5 @@ extern int apm_reject(int fd); - #else - #define apm_reject(fd) (-EINVAL) - #endif -+ -+#endif -diff --git a/apmd.c b/apmd.c -index 49ed3a1..560f536 100644 ---- a/apmd.c -+++ b/apmd.c -@@ -343,7 +343,7 @@ static int call_proxy(apm_event_t event) - /* parent */ - int status, retval; - ssize_t len; -- time_t time_limit; -+ time_t countdown; - - if (pid < 0) { - /* Couldn't fork */ -@@ -356,8 +356,9 @@ static int call_proxy(apm_event_t event) - /* Capture the child's output, if any, but only until it terminates */ - close(fds[1]); - fcntl(fds[0], F_SETFL, O_RDONLY|O_NONBLOCK); -- time_limit = time(0) + proxy_timeout; -+ countdown = proxy_timeout; - do { -+ countdown -= 1; - while ((len = read(fds[0], line, sizeof(line)-1)) > 0) { - line[len] = 0; - APMD_SYSLOG(LOG_INFO, "+ %s", line); -@@ -372,16 +373,16 @@ static int call_proxy(apm_event_t event) - goto proxy_done; - } - -- sleep(1); -+ while (sleep(1) > 0) ; - } while ( -- (time(0) < time_limit) -+ (countdown >= 0) - || (proxy_timeout < 0) - ); - - APMD_SYSLOG(LOG_NOTICE, "Proxy has been running more than %d seconds; killing it", proxy_timeout); - - kill(pid, SIGTERM); -- time_limit = time(0) + 5; -+ countdown = 5; - do { - retval = waitpid(pid, &status, WNOHANG); - if (retval == pid) -@@ -392,9 +393,9 @@ static int call_proxy(apm_event_t event) - goto proxy_done; - } - -- sleep(1); -+ while (sleep(1) > 0) ; - -- } while (time(0) < time_limit); -+ } while (countdown >= 0); - - kill(pid, SIGKILL); - status = __W_EXITCODE(0, SIGKILL); --- -2.1.4 - diff --git a/meta/recipes-bsp/apmd/apmd/libtool.patch b/meta/recipes-bsp/apmd/apmd/libtool.patch deleted file mode 100644 index 834ee080a1..0000000000 --- a/meta/recipes-bsp/apmd/apmd/libtool.patch +++ /dev/null @@ -1,33 +0,0 @@ -Add by RP to address "unable to infer tagged configuration" error: - commit 35de05e61b88c0808a5e885bb0efdf420555d5ad - Author: Richard Purdie <rpurdie@rpsys.net> - Date: Sun Jun 1 16:13:38 2008 +0000 - - apmd: Use libtool --tag options to avoid problems with libtool 2.2.4 (from poky) - -However I didn't see same issue with current libtool-2.2.10. Also per my understanding, -the default tag, if not specified, falls back to CC. So disable it from patching, but -keep it here. If we encounter similar issue in the future, we could then push upstream - -Comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-16 - -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -Index: apmd-3.2.2.orig/Makefile -=================================================================== ---- apmd-3.2.2.orig.orig/Makefile 2004-01-04 08:13:18.000000000 +0000 -+++ apmd-3.2.2.orig/Makefile 2008-04-21 17:10:03.000000000 +0100 -@@ -58,9 +57,8 @@ - #CFLAGS=-O3 -m486 -fomit-frame-pointer - #LDFLAGS=-s - --LIBTOOL=libtool --quiet --LT_COMPILE = $(LIBTOOL) --mode=compile $(CC) --LT_LINK = $(LIBTOOL) --mode=link $(CC) -+LT_COMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) -+LT_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC) - LT_INSTALL = $(LIBTOOL) --mode=install install - LT_CLEAN = $(LIBTOOL) --mode=clean rm - diff --git a/meta/recipes-bsp/apmd/apmd/linkage.patch b/meta/recipes-bsp/apmd/apmd/linkage.patch deleted file mode 100644 index 3d32c49cd2..0000000000 --- a/meta/recipes-bsp/apmd/apmd/linkage.patch +++ /dev/null @@ -1,53 +0,0 @@ -When building use the libtool intermediate .lo files instead of explicitly using -the .o files. Under libtool foo.lo is the libtool intermediate wrapper, foo.o is -a static build, and .libs/foo.o is a shared build. - -If static libraries have been disabled globally then libtool won't generate them -and explicit references to foo.o won't be satisfied. - -Upstream-Status: Pending -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/Makefile b/Makefile -index bb695c6..5f60146 100644 ---- a/Makefile -+++ b/Makefile -@@ -28,7 +28,7 @@ endif - - .SUFFIXES: - --OBJS=apmlib.o -+OBJS=apmlib.lo - EXES=apm apmd xapm apmsleep - HEADERS=apm.h - -@@ -66,22 +66,22 @@ all: $(EXES) - - $(OBJS): $(HEADERS) - --%.o: %.c -+%.lo: %.c - $(LT_COMPILE) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) $< - --%: %.o $(LIBAPM) -+%: %.lo $(LIBAPM) - $(LT_LINK) -o $@ $< $(LDFLAGS) $(LIBAPM) - --xapm.o: xapm.c -+xapm.lo: xapm.c - $(LT_COMPILE) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) -DNARROWPROTO $< - --apmd: apmd.o -+apmd: apmd.lo - --apmsleep: apmsleep.o -+apmsleep: apmsleep.lo - --apmexists: apmexists.o -+apmexists: apmexists.lo - --xapm: xapm.o $(LIBAPM) -+xapm: xapm.lo $(LIBAPM) - $(LT_LINK) -o $@ $< $(LDFLAGS) $(LIBAPM) $(XLDFLAGS) $(XLIBS) - - $(LIBAPM): apmlib.lo diff --git a/meta/recipes-bsp/apmd/apmd/unlinux.patch b/meta/recipes-bsp/apmd/apmd/unlinux.patch deleted file mode 100644 index ec8206cf17..0000000000 --- a/meta/recipes-bsp/apmd/apmd/unlinux.patch +++ /dev/null @@ -1,25 +0,0 @@ -copy OE commit message here: - commit 9456cdc1cf43e3ba9e6d88c63560c1b6fdee4359 - Author: Michael Krelin <hacker@klever.net> - Date: Tue May 29 12:27:45 2007 +0000 - - apmd: prevent build from interferring with host kernel headers. Closes #1257 - -comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-13 - -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- apmd-3.2.2.orig/Makefile -+++ apmd-3.2.2/Makefile -@@ -43,8 +43,7 @@ - - CC=gcc - CFLAGS=-O -g --XTRACFLAGS=-Wall -pipe -I. -I/usr/src/linux/include -I/usr/X11R6/include \ -- -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include \ -+XTRACFLAGS=-Wall -pipe -I. \ - -DVERSION=\"$(VERSION)\" \ - -DDEFAULT_PROXY_NAME=\"$(PROXY_DIR)/apmd_proxy\" - LDFLAGS= diff --git a/meta/recipes-bsp/apmd/apmd/wexitcode.patch b/meta/recipes-bsp/apmd/apmd/wexitcode.patch deleted file mode 100644 index c5faa85fa7..0000000000 --- a/meta/recipes-bsp/apmd/apmd/wexitcode.patch +++ /dev/null @@ -1,26 +0,0 @@ -Define non-posix W* funcitons - -C libraries like musl dont define them - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending - -Index: apmd-3.2.2.orig/apmd.c -=================================================================== ---- apmd-3.2.2.orig.orig/apmd.c -+++ apmd-3.2.2.orig/apmd.c -@@ -55,6 +55,14 @@ - #define MINIMUM_RATE_CALC_TIME 120 - #endif - -+#ifndef _POSIX_SOURCE -+ -+#define __WCOREFLAG 0200 -+#define __WCOREDUMP(x) (_W_INT(x) & __WCOREFLAG) -+#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -+ -+#endif -+ - /* - * For the verbosity level feature to be useful, - * we rely on the fact that syslog.h assigns adjacent diff --git a/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb b/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb deleted file mode 100644 index 82c2649340..0000000000 --- a/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb +++ /dev/null @@ -1,85 +0,0 @@ -SUMMARY = "Utilities for Advanced Power Management" -DESCRIPTION = "The Advanced Power Management (APM) support provides \ -access to battery status information and a set of tools for managing \ -notebook power consumption." -HOMEPAGE = "http://apenwarr.ca/apmd/" -SECTION = "base" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://apm.h;beginline=6;endline=18;md5=7d4acc1250910a89f84ce3cc6557c4c2" -DEPENDS = "libtool-cross" - -SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/a/${BPN}/${BPN}_3.2.2.orig.tar.gz;name=tarball \ - file://legacy.patch \ - file://libtool.patch \ - file://unlinux.patch \ - file://wexitcode.patch \ - file://linkage.patch \ - file://init \ - file://default \ - file://apmd_proxy \ - file://apmd_proxy.conf \ - file://apmd.service" - -SRC_URI[tarball.md5sum] = "b1e6309e8331e0f4e6efd311c2d97fa8" -SRC_URI[tarball.sha256sum] = "7f7d9f60b7766b852881d40b8ff91d8e39fccb0d1d913102a5c75a2dbb52332d" - -# for this package we're mostly interested in tracking debian patches, -# and not in the upstream version where all development has effectively stopped -UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apmd/" -UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)" - -S = "${WORKDIR}/apmd-3.2.2.orig" - -inherit update-rc.d systemd - -INITSCRIPT_NAME = "apmd" -INITSCRIPT_PARAMS = "defaults" - -SYSTEMD_SERVICE_${PN} = "apmd.service" -SYSTEMD_AUTO_ENABLE = "disable" - -EXTRA_OEMAKE = "-e MAKEFLAGS=" - -do_compile() { - # apmd doesn't use whole autotools. Just libtool for installation - oe_runmake "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" apm apmd -} - -do_install() { - install -d ${D}${sysconfdir} - install -d ${D}${sysconfdir}/apm - install -d ${D}${sysconfdir}/apm/event.d - install -d ${D}${sysconfdir}/apm/other.d - install -d ${D}${sysconfdir}/apm/suspend.d - install -d ${D}${sysconfdir}/apm/resume.d - install -d ${D}${sysconfdir}/apm/scripts.d - install -d ${D}${sysconfdir}/default - install -d ${D}${sysconfdir}/init.d - install -d ${D}${sbindir} - install -d ${D}${bindir} - install -d ${D}${libdir} - install -d ${D}${datadir}/apmd - install -d ${D}${includedir} - - install -m 4755 ${S}/.libs/apm ${D}${bindir}/apm - install -m 0755 ${S}/.libs/apmd ${D}${sbindir}/apmd - install -m 0755 ${WORKDIR}/apmd_proxy ${D}${sysconfdir}/apm/ - install -m 0644 ${WORKDIR}/apmd_proxy.conf ${D}${datadir}/apmd/ - install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/apmd - oe_libinstall -so libapm ${D}${libdir} - install -m 0644 apm.h ${D}${includedir} - - sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/apmd - chmod 755 ${D}${sysconfdir}/init.d/apmd - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/apmd.service ${D}${systemd_unitdir}/system/ - sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apmd.service -} - -PACKAGES =+ "libapm apm" - -FILES_libapm = "${libdir}/libapm${SOLIBS}" -FILES_apm = "${bindir}/apm*" diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch b/meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch deleted file mode 100644 index 42f3a8182d..0000000000 --- a/meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 99b578501643377e0b1994b2a068b790d189d5ad Mon Sep 17 00:00:00 2001 -From: Peter Jones <pjones@redhat.com> -Date: Wed, 13 Jun 2018 09:41:01 -0400 -Subject: [PATCH] remove extra decl - -Signed-off-by: Peter Jones <pjones@redhat.com> - -Upstream-Status: Backport [git://github.com/rhinstaller/efibootmgr.git] -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - ---- - src/efibootmgr.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/efibootmgr.c b/src/efibootmgr.c -index de38f01..4e1a680 100644 ---- a/src/efibootmgr.c -+++ b/src/efibootmgr.c -@@ -1536,9 +1536,6 @@ parse_opts(int argc, char **argv) - "invalid numeric value %s\n", - optarg); - } -- /* XXX efivar-36 accidentally doesn't have a public -- * header for this */ -- extern int efi_set_verbose(int verbosity, FILE *errlog); - efi_set_verbose(opts.verbose - 2, stderr); - break; - case 'V': --- -2.7.4 - diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch b/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch deleted file mode 100644 index 9525ed8c54..0000000000 --- a/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 97668ae0bce776a36ea2001dea63d376be8274ac Mon Sep 17 00:00:00 2001 -From: Peter Jones <pjones@redhat.com> -Date: Wed, 6 Mar 2019 13:08:33 -0500 -Subject: [PATCH] Make sure PKGS= is propogated into the submake for "make - deps" - -When we're doing make deps with "$(CC) -MF", gcc and clang have different -behavior, both broken in different ways, which we're hitting because of a -missing -I argument for libefivar's includes. On clang, when a header can't -be found, it emits a rule with the header as a prerequisite without a path, -such as efivar.h here: - -efibootmgr.o: efibootmgr.c fix_coverity.h efivar.h efiboot.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \ - error.h - -Then the build that utilizes that rule will fail to find the -prerequisite and tell you something like: - -make[1]: *** No rule to make target 'efivar.h', needed by 'efibootmgr.o'. Stop. -make[1]: Leaving directory '/home/pjones/devel/github.com/efibootmgr/master/src' - -With gcc, when a header can't be found, it emits a rule without that header -as a prerequisite, as such (again with efivar.h): - -efibootmgr.o: efibootmgr.c fix_coverity.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \ - error.h - -And then your build will fail if you haven't adjusted CFLAGS to tell it -where to find the header. - -Both of these would be better just erroring, but at least gcc's doesn't -insert a *wrong* dependency. - -This patch adds "PKGS=efivar efibootmgr popt" for all deps under src/. -Technically that's overkill, as efibootmgr itself doesn't need popt, but it -doesn't hurt anything to have the extra part there. The resulting -.efibootmgr.d file has the prerequisites expressed correctly: - -efibootmgr.o: efibootmgr.c fix_coverity.h /usr/include/efivar/efivar.h \ - /usr/include/efivar/efiboot.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ - /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \ - error.h - -This fixes the issue described in github PR #96 - -Signed-off-by: Peter Jones <pjones@redhat.com> -Upstream-Status: Backport [https://github.com/rhboot/efibootmgr/commit/97668ae0bce776a36ea2001dea63d376be8274ac] ---- - src/Makefile | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index 258bac1..32fa188 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -31,8 +31,13 @@ efibootdump : PKGS=efivar efiboot popt - efibootnext : $(call objects-of,$(EFIBOOTNEXT_SOURCES)) - efibootnext : PKGS=efivar efiboot popt - -+deps : PKGS=efivar efiboot popt - deps : $(ALL_SOURCES) -- $(MAKE) -f $(TOPDIR)/Make.deps deps SOURCES="$(ALL_SOURCES)" SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)" -+ $(MAKE) -f $(TOPDIR)/Make.deps \ -+ SOURCES="$(ALL_SOURCES)" \ -+ SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)" \ -+ PKGS="$(PKGS)" \ -+ deps - - clean : - @rm -rfv *.o *.a *.so $(TARGETS) diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb b/meta/recipes-bsp/efibootmgr/efibootmgr_18.bb index 5d6f200a73..fbd2f5dbc8 100644 --- a/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb +++ b/meta/recipes-bsp/efibootmgr/efibootmgr_18.bb @@ -3,18 +3,15 @@ SUMMARY = "EFI Boot Manager" HOMEPAGE = "https://github.com/rhboot/efibootmgr" SECTION = "base" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" DEPENDS = "efivar popt" COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" -SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https \ - file://0001-remove-extra-decl.patch \ - file://97668ae0bce776a36ea2001dea63d376be8274ac.patch \ - " -SRCREV = "e067160ecef8208e1944002e5d50b275733211fb" +SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https;branch=main" +SRCREV = "c3f9f0534e32158f62c43564036878b93b9e0fd6" S = "${WORKDIR}/git" diff --git a/meta/recipes-bsp/efivar/efivar/0001-docs-do-not-build-efisecdb-manpage.patch b/meta/recipes-bsp/efivar/efivar/0001-docs-do-not-build-efisecdb-manpage.patch new file mode 100644 index 0000000000..cb30d3c430 --- /dev/null +++ b/meta/recipes-bsp/efivar/efivar/0001-docs-do-not-build-efisecdb-manpage.patch @@ -0,0 +1,26 @@ +From f39a1481a9e465387901d52b07ae56dedcc3838b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Sun, 16 Jan 2022 18:25:33 +0100 +Subject: [PATCH] docs: do not build efisecdb manpage + +It requires mandoc, which oe-core does not have. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + docs/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/Makefile b/docs/Makefile +index c9bf585..91a6078 100644 +--- a/docs/Makefile ++++ b/docs/Makefile +@@ -5,7 +5,7 @@ include $(TOPDIR)/src/include/version.mk + include $(TOPDIR)/src/include/rules.mk + include $(TOPDIR)/src/include/defaults.mk + +-MAN1TARGETS = efisecdb.1 \ ++MAN1TARGETS = \ + efivar.1 + + MAN3TARGETS = efi_append_variable.3 \ diff --git a/meta/recipes-bsp/efivar/efivar/no-werror.patch b/meta/recipes-bsp/efivar/efivar/no-werror.patch deleted file mode 100644 index 50a0b1023a..0000000000 --- a/meta/recipes-bsp/efivar/efivar/no-werror.patch +++ /dev/null @@ -1,18 +0,0 @@ -Don't use -Werror because newer compilers introduce newer warnings. - -Upstream-Status: Inappropriate [https://github.com/rhboot/efivar/issues/131] -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/gcc.specs b/gcc.specs -index 45d43d1..1baf11a 100644 ---- a/gcc.specs -+++ b/gcc.specs -@@ -2,7 +2,7 @@ - + -D_GNU_SOURCE - - *efivar_cpp_options: -- -Werror -Wall -std=gnu11 -Wextra -+ -Wall -std=gnu11 -Wextra - - *cpp_options: - + %(efivar_cpp_options) diff --git a/meta/recipes-bsp/efivar/efivar_37.bb b/meta/recipes-bsp/efivar/efivar_37.bb deleted file mode 100644 index 9b95721a4e..0000000000 --- a/meta/recipes-bsp/efivar/efivar_37.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "Tools to manipulate UEFI variables" -DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility" -HOMEPAGE = "https://github.com/rhboot/efivar" - -LICENSE = "LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393" - -COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" - -SRC_URI = "git://github.com/rhinstaller/efivar.git \ - file://no-werror.patch" -SRCREV = "c1d6b10e1ed4ba2be07f385eae5bceb694478a10" - -S = "${WORKDIR}/git" - -inherit pkgconfig - -export CCLD_FOR_BUILD = "${BUILD_CCLD}" - -# Upstream uses --add-needed in gcc.specs which gold doesn't support, so -# enforce BFD. -LDFLAGS += "-fuse-ld=bfd" - -do_compile_prepend() { - # Remove when https://github.com/rhboot/efivar/issues/130 is fixed - oe_runmake \ - CFLAGS="${BUILD_CFLAGS}" \ - LDFLAGS="${BUILD_LDFLAGS}" \ - -C src makeguids -} - -do_install() { - oe_runmake install DESTDIR=${D} -} - -BBCLASSEXTEND = "native" - -RRECOMMENDS_${PN}_class-target = "kernel-module-efivarfs" - -CLEANBROKEN = "1" diff --git a/meta/recipes-bsp/efivar/efivar_39.bb b/meta/recipes-bsp/efivar/efivar_39.bb new file mode 100644 index 0000000000..aab319be91 --- /dev/null +++ b/meta/recipes-bsp/efivar/efivar_39.bb @@ -0,0 +1,34 @@ +SUMMARY = "Tools to manipulate UEFI variables" +DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility" +HOMEPAGE = "https://github.com/rhboot/efivar" + +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393" + +COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" + +SRC_URI = "git://github.com/rhinstaller/efivar.git;branch=main;protocol=https \ + file://0001-docs-do-not-build-efisecdb-manpage.patch \ + " +SRCREV = "c47820c37ac26286559ec004de07d48d05f3308c" +PV .= "+39+git" + +S = "${WORKDIR}/git" + +inherit pkgconfig + +export CCLD_FOR_BUILD = "${BUILD_CCLD}" + +do_compile() { + oe_runmake ERRORS= HOST_CFLAGS="${BUILD_CFLAGS}" HOST_LDFLAGS="${BUILD_LDFLAGS}" +} + +do_install() { + oe_runmake install DESTDIR=${D} +} + +BBCLASSEXTEND = "native" + +RRECOMMENDS:${PN}:class-target = "kernel-module-efivarfs" + +CLEANBROKEN = "1" diff --git a/meta/recipes-bsp/formfactor/files/qemuppc64/machconfig b/meta/recipes-bsp/formfactor/files/qemuppc64/machconfig new file mode 100755 index 0000000000..e4717730ea --- /dev/null +++ b/meta/recipes-bsp/formfactor/files/qemuppc64/machconfig @@ -0,0 +1,10 @@ +HAVE_TOUCHSCREEN=0 +HAVE_KEYBOARD=0 + +DISPLAY_CAN_ROTATE=0 +DISPLAY_ORIENTATION=0 +#DISPLAY_WIDTH_PIXELS=640 +#DISPLAY_HEIGHT_PIXELS=480 +#DISPLAY_BPP=16 +DISPLAY_DPI=150 +DISPLAY_SUBPIXEL_ORDER=vrgb diff --git a/meta/recipes-bsp/formfactor/formfactor_0.0.bb b/meta/recipes-bsp/formfactor/formfactor_0.0.bb index ea1fa4c754..4714bb2e5e 100644 --- a/meta/recipes-bsp/formfactor/formfactor_0.0.bb +++ b/meta/recipes-bsp/formfactor/formfactor_0.0.bb @@ -5,10 +5,11 @@ build system cannot obtain from other sources such as the kernel." SECTION = "base" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -PR = "r45" SRC_URI = "file://config file://machconfig" -S = "${WORKDIR}" + +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" PACKAGE_ARCH = "${MACHINE_ARCH}" INHIBIT_DEFAULT_DEPS = "1" diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/0001-riscv64-adjust-type-definitions.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/0001-riscv64-adjust-type-definitions.patch new file mode 100644 index 0000000000..3475606264 --- /dev/null +++ b/meta/recipes-bsp/gnu-efi/gnu-efi/0001-riscv64-adjust-type-definitions.patch @@ -0,0 +1,34 @@ +From 1de509497826faa0ad84b82f5e2c3d21ee613459 Mon Sep 17 00:00:00 2001 +From: Moody Liu <mooodyhunter@outlook.com> +Date: Sat, 13 May 2023 17:39:16 +0100 +Subject: [PATCH] riscv64: adjust type definitions + +CHAR8 needs to be defined while BOOLEAN should be removed +here to prevent typedef conflicts + +Upstream-Status: Backport [https://sourceforge.net/p/gnu-efi/code/ci/1de509497826faa0ad84b82f5e2c3d21ee613459/] +Signed-off-by: Moody Liu <mooodyhunter@outlook.com> +--- + inc/riscv64/efibind.h | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/inc/riscv64/efibind.h b/inc/riscv64/efibind.h +index 4fdf81d..d8b4f39 100644 +--- a/inc/riscv64/efibind.h ++++ b/inc/riscv64/efibind.h +@@ -32,11 +32,9 @@ typedef uint16_t UINT16; + typedef int16_t INT16; + typedef uint8_t UINT8; + typedef int8_t INT8; ++typedef char CHAR8; + typedef wchar_t CHAR16; + #define WCHAR CHAR16 +-#ifndef BOOLEAN +-typedef uint8_t BOOLEAN; +-#endif + #undef VOID + typedef void VOID; + typedef int64_t INTN; +-- +2.41.0 + diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/0001-riscv64-ignore-unknown-relocs.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/0001-riscv64-ignore-unknown-relocs.patch new file mode 100644 index 0000000000..5b3c152c5e --- /dev/null +++ b/meta/recipes-bsp/gnu-efi/gnu-efi/0001-riscv64-ignore-unknown-relocs.patch @@ -0,0 +1,32 @@ +From 708f66acfec9a86f237726d45095cbd380fd83ca Mon Sep 17 00:00:00 2001 +From: Callum Farmer <gmbr3@opensuse.org> +Date: Wed, 21 Jun 2023 11:32:28 +0100 +Subject: [PATCH] riscv64: ignore unknown relocs + +Sometimes ld emits relocs such as R_RISCV_64 for unwind symbols +these don't need to be handled yet so just can be skipped otherwise +the binary will never load + +Upstream-Status: Backport [https://sourceforge.net/p/gnu-efi/code/ci/708f66acfec9a86f237726d45095cbd380fd83ca/] +Signed-off-by: Callum Farmer <gmbr3@opensuse.org> +--- + gnuefi/reloc_riscv64.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/gnuefi/reloc_riscv64.c b/gnuefi/reloc_riscv64.c +index 0b02d83..e429602 100644 +--- a/gnuefi/reloc_riscv64.c ++++ b/gnuefi/reloc_riscv64.c +@@ -81,8 +81,7 @@ EFI_STATUS EFIAPI _relocate(long ldbase, Elf_Dyn *dyn) + *addr = ldbase + rel->r_addend; + break; + default: +- /* Panic */ +- while (1) ; ++ break; + } + rel = (Elf_Rela *)((char *)rel + relent); + relsz -= relent; +-- +2.41.0 + diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch deleted file mode 100644 index dc00b8fa4d..0000000000 --- a/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 3ec8c2a70304eabd5760937a4ec3fbc4068a77ed Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Thu, 23 Apr 2015 01:49:31 -0700 -Subject: [PATCH 2/3] lib/Makefile: fix parallel issue - -Fixed: -Assembler messages: -Fatal error: can't create runtime/rtlock.o: No such file or directory -Assembler messages: -Fatal error: can't create runtime/rtdata.o: No such file or directory -Assembler messages: -Fatal error: can't create runtime/vm.o: No such file or directory -Assembler messages: -Fatal error: can't create runtime/efirtlib.o: No such file or directory - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> ---- - lib/Makefile | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/lib/Makefile b/lib/Makefile -index 048751a..ed39bbb 100644 ---- a/lib/Makefile -+++ b/lib/Makefile -@@ -74,6 +74,8 @@ all: libsubdirs libefi.a - libsubdirs: - for sdir in $(SUBDIRS); do mkdir -p $$sdir; done - -+$(OBJS): libsubdirs -+ - libefi.a: $(OBJS) - $(AR) $(ARFLAGS) $@ $(OBJS) - --- -2.7.4 - diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch new file mode 100644 index 0000000000..db2bcf70b7 --- /dev/null +++ b/meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch @@ -0,0 +1,19 @@ +Do not treat warnings as errors + +There are additional warnings found with musl which are +treated as errors and fails the build, we have more combinations +then upstream supports to handle + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Inappropriate [OE specific] +--- a/Make.defaults ++++ b/Make.defaults +@@ -187,7 +187,7 @@ CFLAGS += $(ARCH3264) -g -O2 -Wall -Wex + -funsigned-char -fshort-wchar -fno-strict-aliasing \ + -ffreestanding -fno-stack-protector + else +-CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign -Werror \ ++CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign \ + -funsigned-char -fshort-wchar -fno-strict-aliasing \ + -ffreestanding -fno-stack-protector -fno-stack-check \ + -fno-stack-check \ diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch index 8a0138bbe5..63d9b6fc31 100644 --- a/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch +++ b/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch @@ -1,7 +1,7 @@ -From 48b2cdbcd761105e8ebad412fcbf23db1ac4ef7c Mon Sep 17 00:00:00 2001 +From f56ddb00a656af2e84f839738fad19909ac65047 Mon Sep 17 00:00:00 2001 From: Saul Wold <sgw@linux.intel.com> Date: Sun, 9 Mar 2014 15:22:15 +0200 -Subject: [PATCH 1/3] Fix parallel make failure for archives +Subject: [PATCH] Fix parallel make failure for archives Upstream-Status: Pending @@ -20,12 +20,16 @@ Signed-off-by: California Sullivan <california.l.sullivan@intel.com> [Rebased for 3.0.8] Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + lib/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/lib/Makefile b/lib/Makefile -index 0e6410d..048751a 100644 +index 1fc6a47..54b0ca7 100644 --- a/lib/Makefile +++ b/lib/Makefile -@@ -75,7 +75,7 @@ libsubdirs: - for sdir in $(SUBDIRS); do mkdir -p $$sdir; done +@@ -77,7 +77,7 @@ libsubdirs: + $(OBJS): libsubdirs libefi.a: $(OBJS) - $(AR) $(ARFLAGS) $@ $^ @@ -33,6 +37,3 @@ index 0e6410d..048751a 100644 clean: rm -f libefi.a *~ $(OBJS) */*.o --- -2.7.4 - diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.12.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb index 7888aba0fb..43b7cc7529 100644 --- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.12.bb +++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb @@ -1,11 +1,11 @@ SUMMARY = "Libraries for producing EFI binaries" HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/" +DESCRIPTION = "GNU-EFI aims to Develop EFI applications for ARM-64, ARM-32, x86_64, IA-64 (IPF), IA-32 (x86), and MIPS platforms using the GNU toolchain and the EFI development environment." SECTION = "devel" -LICENSE = "GPLv2+ | BSD-2-Clause" +LICENSE = "GPL-2.0-or-later | BSD-2-Clause" LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \ file://gnuefi/crt0-efi-aarch64.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \ file://inc/efishellintf.h;beginline=13;endline=20;md5=202766b79d708eff3cc70fce15fb80c7 \ - file://inc/efishellparm.h;beginline=4;endline=11;md5=468b1231b05bbc84bae3a0d5774e3bb5 \ file://lib/arm/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ file://lib/arm/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ file://lib/aarch64/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ @@ -14,17 +14,17 @@ LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=16;md5=e582 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/files/${BP}.tar.bz2 \ file://parallel-make-archives.patch \ - file://lib-Makefile-fix-parallel-issue.patch \ file://gnu-efi-3.0.9-fix-clang-build.patch \ + file://0001-riscv64-adjust-type-definitions.patch \ + file://0001-riscv64-ignore-unknown-relocs.patch \ + file://no-werror.patch \ " +SRC_URI[sha256sum] = "7807e903349343a7a142ebb934703a2872235e89688cf586c032b0a1087bcaf4" -SRC_URI[md5sum] = "926763ff37bc9db3a9035cec41eb2f45" -SRC_URI[sha256sum] = "0196f2e1fd3c334b66e610a608a0e59233474c7a01bec7bc53989639aa327669" +COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*|riscv64.*)-linux" +COMPATIBLE_HOST:armv4 = 'null' -COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" -COMPATIBLE_HOST_armv4 = 'null' - -do_configure_linux-gnux32_prepend() { +do_configure:linux-gnux32:prepend() { cp ${STAGING_INCDIR}/gnu/stubs-x32.h ${STAGING_INCDIR}/gnu/stubs-64.h cp ${STAGING_INCDIR}/bits/long-double-32.h ${STAGING_INCDIR}/bits/long-double-64.h } @@ -36,6 +36,10 @@ def gnu_efi_arch(d): return "ia32" return tarch +do_compile:prepend() { + unset LDFLAGS +} + EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \ 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \ " @@ -48,18 +52,18 @@ do_install() { oe_runmake install INSTALLROOT="${D}" } -FILES_${PN} += "${libdir}/*.lds" +FILES:${PN} += "${libdir}/*.lds ${libdir}/gnuefi/apps" # 64-bit binaries are expected for EFI when targeting X32 -INSANE_SKIP_${PN}-dev_append_linux-gnux32 = " arch" -INSANE_SKIP_${PN}-dev_append_linux-muslx32 = " arch" +INSANE_SKIP:${PN}-dev:append:linux-gnux32 = " arch" +INSANE_SKIP:${PN}-dev:append:linux-muslx32 = " arch" BBCLASSEXTEND = "native" # It doesn't support sse, its make.defaults sets: # CFLAGS += -mno-mmx -mno-sse # So also remove -mfpmath=sse from TUNE_CCARGS -TUNE_CCARGS_remove = "-mfpmath=sse" +TUNE_CCARGS:remove = "-mfpmath=sse" python () { ccargs = d.getVar('TUNE_CCARGS').split() diff --git a/meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch b/meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch index 6b73878cc0..05a4697a73 100644 --- a/meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch +++ b/meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch @@ -1,4 +1,4 @@ -From 96d9aa55d29b24e2490d5647a9efc66940fc400f Mon Sep 17 00:00:00 2001 +From 006799e9c4babe8a8340a24501b253e759614a2d Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 13 Jan 2016 19:17:31 +0000 Subject: [PATCH] Disable -mfpmath=sse as well when SSE is disabled @@ -24,15 +24,16 @@ Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Pending + --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 7656f24..0868ea9 100644 +index cd667a2..8263876 100644 --- a/configure.ac +++ b/configure.ac -@@ -824,7 +824,7 @@ fi +@@ -846,7 +846,7 @@ fi if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then # Some toolchains enable these features by default, but they need # registers that aren't set up properly in GRUB. @@ -40,4 +41,4 @@ index 7656f24..0868ea9 100644 + TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mfpmath=387" fi - # GRUB doesn't use float or doubles at all. Yet some toolchains may decide + if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then diff --git a/meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch b/meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch new file mode 100644 index 0000000000..cafa711731 --- /dev/null +++ b/meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch @@ -0,0 +1,37 @@ +From b47029e8e582d17c6874d2622fe1a5b834377dbb Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 26 Mar 2021 11:59:43 -0700 +Subject: [PATCH] RISC-V: Restore the typcast to 64bit type + +this makes the type promotions clear and explicit +It was already typecasted to long but was accidentally dropped in [1] +which stated to cause failures on riscv32 as reported in [2] + +[1] https://git.savannah.gnu.org/cgit/grub.git/commit/?id=2bf40e9e5be9808b17852e688eead87acff14420 +[2] https://savannah.gnu.org/bugs/index.php?60283 + +Upstream-Status: Submitted +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Cc: Andreas Schwab <schwab@suse.de> +Cc: Daniel Kiper <daniel.kiper@oracle.com> +Cc: Chester Lin <clin@suse.com> +Cc: Nikita Ermakov <arei@altlinux.org> +Cc: Alistair Francis <alistair.francis@wdc.com> + +--- + util/grub-mkimagexx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c +index e50b295..2f09255 100644 +--- a/util/grub-mkimagexx.c ++++ b/util/grub-mkimagexx.c +@@ -1310,7 +1310,7 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct section_metadata *smd, + */ + + sym_addr += addend; +- off = sym_addr - target_section_addr - offset - image_target->vaddr_offset; ++ off = (grub_int64_t)sym_addr - target_section_addr - offset - image_target->vaddr_offset; + + switch (ELF_R_TYPE (info)) + { diff --git a/meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch b/meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch index 69b04aa56f..69dec7695a 100644 --- a/meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch +++ b/meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch @@ -1,4 +1,4 @@ -From 8f47ed4aaefba087b6ca76e59c9f832b6a0702bc Mon Sep 17 00:00:00 2001 +From a80592e20f6c4b928a22862f52f268ab9d9908b2 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 13 Jan 2016 19:28:00 +0000 Subject: [PATCH] grub.d/10_linux.in: add oe's kernel name @@ -20,10 +20,10 @@ Upstream-Status: Inappropriate [OE specific] 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 4532266..cba2617 100644 +index cc393be..8545cb6 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in -@@ -164,12 +164,12 @@ machine=`uname -m` +@@ -166,12 +166,12 @@ machine=`uname -m` case "x$machine" in xi?86 | xx86_64) list= @@ -40,10 +40,10 @@ index 4532266..cba2617 100644 done ;; esac diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in -index 96179ea..98d16ae 100644 +index 94dd8be..36cd554 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in -@@ -154,7 +154,7 @@ EOF +@@ -181,7 +181,7 @@ EOF } linux_list= diff --git a/meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch b/meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch index faa7fde232..f8dfda90ab 100644 --- a/meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch +++ b/meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch @@ -1,6 +1,6 @@ -From 72c30928d3d461e0e2d20c5ff33bd96b6991d585 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Sat, 25 Jan 2014 23:49:44 -0500 +From 14c1d0459fb3561e627d3a5f6e91a0d2f7b4aa45 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <naveen.kumar.saini@intel.com> +Date: Mon, 15 Mar 2021 14:44:15 +0800 Subject: [PATCH] autogen.sh: exclude .pc from po/POTFILES.in Exclude the .pc from po/POTFILES.in since quilt uses "patch --backup", @@ -13,23 +13,22 @@ Upstream-Status: Inappropriate [OE specific] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> +Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> + --- autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh -index ef43270..a7067a7 100755 +index 195daa5..773b7b4 100755 --- a/autogen.sh +++ b/autogen.sh -@@ -13,7 +13,7 @@ fi +@@ -26,7 +26,7 @@ fi export LC_COLLATE=C unset LC_ALL --find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -ipath './gnulib/*' ! -iname './grub-core/lib/gnulib/*' |sort > po/POTFILES.in -+find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -ipath './gnulib/*' ! -iname './grub-core/lib/gnulib/*' ! -path './.pc/*' |sort > po/POTFILES.in +-find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -ipath './gnulib/*' ! -ipath './grub-core/lib/gnulib/*' |sort > po/POTFILES.in ++find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -ipath './gnulib/*' ! -ipath './grub-core/lib/gnulib/*' ! -path './.pc/*' |sort > po/POTFILES.in find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in echo "Importing unicode..." --- -2.7.4 - diff --git a/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch b/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch index 26890261b7..d9012d1dd6 100644 --- a/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch +++ b/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch @@ -1,4 +1,4 @@ -From 917133acc701dbc4636165d3b08d15dc5829a06f Mon Sep 17 00:00:00 2001 +From b316ed326bd492106006d78f5bfcd767b49a4f2e Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Wed, 17 Aug 2016 04:06:34 -0400 Subject: [PATCH] grub module explicitly keeps symbole .module_license @@ -8,7 +8,7 @@ it stripped symbol table: --------------- root@localhost:~# objdump -t all_video.mod - + all_video.mod: file format elf64-x86-64 SYMBOL TABLE: @@ -40,12 +40,13 @@ SYMBOL TABLE: Upstream-Status: Pending Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + --- grub-core/genmod.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in -index 1250589..dd14308 100644 +index e57c4d9..42bb1ba 100644 --- a/grub-core/genmod.sh.in +++ b/grub-core/genmod.sh.in @@ -56,7 +56,7 @@ if test x@TARGET_APPLE_LINKER@ != x1; then diff --git a/meta/recipes-bsp/grub/grub-bootconf_1.00.bb b/meta/recipes-bsp/grub/grub-bootconf_1.00.bb index 572580313b..fed3c7e9a3 100644 --- a/meta/recipes-bsp/grub/grub-bootconf_1.00.bb +++ b/meta/recipes-bsp/grub/grub-bootconf_1.00.bb @@ -5,13 +5,14 @@ DESCRIPTION = "Grub might require different configuration file for \ different machines." HOMEPAGE = "https://www.gnu.org/software/grub/manual/grub/grub.html#Configuration" -RPROVIDES_${PN} += "virtual/grub-bootconf" +RPROVIDES:${PN} += "virtual-grub-bootconf" inherit grub-efi-cfg require conf/image-uefi.conf -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" GRUB_CFG = "${S}/grub-bootconf" LABELS = "boot" @@ -29,4 +30,4 @@ do_install() { install grub-bootconf ${D}${EFI_FILES_PATH}/grub.cfg } -FILES_${PN} = "${EFI_FILES_PATH}/grub.cfg" +FILES:${PN} = "${EFI_FILES_PATH}/grub.cfg" diff --git a/meta/recipes-bsp/grub/grub-efi_2.04.bb b/meta/recipes-bsp/grub/grub-efi_2.12.bb index 30d95f95e0..7df77deca3 100644 --- a/meta/recipes-bsp/grub/grub-efi_2.04.bb +++ b/meta/recipes-bsp/grub/grub-efi_2.12.bb @@ -4,8 +4,8 @@ require conf/image-uefi.conf GRUBPLATFORM = "efi" -DEPENDS_append = " grub-native" -RDEPENDS_${PN} = "grub-common virtual/grub-bootconf" +DEPENDS:append = " grub-native" +RDEPENDS:${PN} = "grub-common virtual-grub-bootconf" SRC_URI += " \ file://cfg \ @@ -26,6 +26,10 @@ python __anonymous () { grubtarget = 'arm64' elif re.match('arm', target): grubtarget = 'arm' + elif re.match('riscv64', target): + grubtarget = 'riscv64' + elif re.match('riscv32', target): + grubtarget = 'riscv32' else: raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target) grubimage = prefix + d.getVar("EFI_BOOT_IMAGE") @@ -42,11 +46,21 @@ EXTRA_OECONF += "--enable-efiemu=no" do_mkimage() { cd ${B} + + GRUB_MKIMAGE_MODULES="${GRUB_BUILDIN}" + + # If 'all' is included in GRUB_BUILDIN we will include all available grub2 modules + if [ "${@ bb.utils.contains('GRUB_BUILDIN', 'all', 'True', 'False', d)}" = "True" ]; then + bbdebug 1 "Including all available modules" + # Get the list of all .mod files in grub-core build directory + GRUB_MKIMAGE_MODULES=$(find ${B}/grub-core/ -type f -name "*.mod" -exec basename {} .mod \;) + fi + # Search for the grub.cfg on the local boot media by using the # built in cfg file provided via this recipe - grub-mkimage -c ../cfg -p ${EFIDIR} -d ./grub-core/ \ + grub-mkimage -v -c ${UNPACKDIR}/cfg -p ${EFIDIR} -d ./grub-core/ \ -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \ - ${GRUB_BUILDIN} + ${GRUB_MKIMAGE_MODULES} } addtask mkimage before do_install after do_compile @@ -66,28 +80,26 @@ do_install() { install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}${EFI_FILES_PATH}/${GRUB_IMAGE} } -do_install_append_aarch64() { - rm -rf ${D}/${prefix}/ -} - +# To include all available modules, add 'all' to GRUB_BUILDIN GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \ efi_gop iso9660 configfile search loadenv test" +# 'xen_boot' is a module valid only for aarch64 +GRUB_BUILDIN:append:aarch64 = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' xen_boot', '', d)}" + do_deploy() { install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR} } addtask deploy after do_install before do_build -FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \ +FILES:${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \ ${datadir}/grub \ ${EFI_FILES_PATH}/${GRUB_IMAGE} \ " -FILES_${PN}_remove_aarch64 = "${libdir}/grub/${GRUB_TARGET}-efi" - # 64-bit binaries are expected for the bootloader with an x32 userland -INSANE_SKIP_${PN}_append_linux-gnux32 = " arch" -INSANE_SKIP_${PN}-dbg_append_linux-gnux32 = " arch" -INSANE_SKIP_${PN}_append_linux-muslx32 = " arch" -INSANE_SKIP_${PN}-dbg_append_linux-muslx32 = " arch" +INSANE_SKIP:${PN}:append:linux-gnux32 = " arch" +INSANE_SKIP:${PN}-dbg:append:linux-gnux32 = " arch" +INSANE_SKIP:${PN}:append:linux-muslx32 = " arch" +INSANE_SKIP:${PN}-dbg:append:linux-muslx32 = " arch" diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc index 2024e13782..bb9aacb478 100644 --- a/meta/recipes-bsp/grub/grub2.inc +++ b/meta/recipes-bsp/grub/grub2.inc @@ -8,33 +8,51 @@ standard, which allows for flexible loading of multiple boot images." HOMEPAGE = "http://www.gnu.org/software/grub/" SECTION = "bootloaders" -LICENSE = "GPLv3" +LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +CVE_PRODUCT = "grub2" + SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \ file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \ file://autogen.sh-exclude-pc.patch \ file://grub-module-explicitly-keeps-symbole-.module_license.patch \ file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \ + file://0001-RISC-V-Restore-the-typcast-to-long.patch \ " -SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934" -SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea" + +SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91" + +CVE_STATUS[CVE-2019-14865] = "not-applicable-platform: applies only to RHEL" +CVE_STATUS[CVE-2021-46705] = "not-applicable-platform: Applies only to SUSE" +CVE_STATUS[CVE-2023-4001] = "not-applicable-platform: Applies only to RHEL/Fedora" +CVE_STATUS[CVE-2024-1048] = "not-applicable-platform: Applies only to RHEL/Fedora" +CVE_STATUS[CVE-2023-4692] = "cpe-incorrect: Fixed in version 2.12 already" +CVE_STATUS[CVE-2023-4693] = "cpe-incorrect: Fixed in version 2.12 already" DEPENDS = "flex-native bison-native gettext-native" -COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)' -COMPATIBLE_HOST_armv7a = 'null' -COMPATIBLE_HOST_armv7ve = 'null' +GRUB_COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)' +COMPATIBLE_HOST = "${GRUB_COMPATIBLE_HOST}" +# Grub doesn't support hard float toolchain and won't be able to forcefully +# disable it on some of the target CPUs. See 'configure.ac' for +# supported/unsupported CPUs in hardfp. +COMPATIBLE_HOST:armv7a = "${@'null' if bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', True, False, d) else d.getVar('GRUB_COMPATIBLE_HOST')}" +COMPATIBLE_HOST:armv7ve = "${@'null' if bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', True, False, d) else d.getVar('GRUB_COMPATIBLE_HOST')}" # configure.ac has code to set this automagically from the target tuple # but the OE freeform one (core2-foo-bar-linux) don't work with that. -GRUBPLATFORM_arm = "efi" -GRUBPLATFORM_aarch64 = "efi" +GRUBPLATFORM:arm = "efi" +GRUBPLATFORM:aarch64 = "efi" +GRUBPLATFORM:riscv32 = "efi" +GRUBPLATFORM:riscv64 = "efi" GRUBPLATFORM ??= "pc" inherit autotools gettext texinfo pkgconfig +CFLAGS:remove = "-O2" + EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \ --disable-grub-mkfont \ --program-prefix="" \ @@ -59,8 +77,13 @@ BUILD_LDFLAGS = "" export PYTHON = "python3" -do_configure_prepend() { +do_configure:prepend() { cd ${S} + + # Remove in next version. + # See: https://git.savannah.gnu.org/cgit/grub.git/commit/?id=b835601c7639ed1890f2d3db91900a8506011a8e + echo "depends bli part_gpt" > ${S}/grub-core/extra_deps.lst + FROM_BOOTSTRAP=1 ${S}/autogen.sh cd ${B} } diff --git a/meta/recipes-bsp/grub/grub_2.04.bb b/meta/recipes-bsp/grub/grub_2.04.bb deleted file mode 100644 index df607cae14..0000000000 --- a/meta/recipes-bsp/grub/grub_2.04.bb +++ /dev/null @@ -1,38 +0,0 @@ -require grub2.inc - -RDEPENDS_${PN}-common += "${PN}-editenv" -RDEPENDS_${PN} += "${PN}-common" -RDEPENDS_${PN}_class-native = "" - -RPROVIDES_${PN}-editenv += "${PN}-efi-editenv" - -PROVIDES_append_class-native = " grub-efi-native" - -PACKAGES =+ "${PN}-editenv ${PN}-common" -FILES_${PN}-editenv = "${bindir}/grub-editenv" -FILES_${PN}-common = " \ - ${bindir} \ - ${sysconfdir} \ - ${sbindir} \ - ${datadir}/grub \ -" - -FILES_${PN}-common_append_aarch64 = " \ - ${libdir}/${BPN} \ -" - -do_install_append () { - install -d ${D}${sysconfdir}/grub.d - # Remove build host references... - find "${D}" -name modinfo.sh -type f -exec \ - sed -i \ - -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ - {} + -} - -INSANE_SKIP_${PN} = "arch" -INSANE_SKIP_${PN}-dbg = "arch" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-bsp/grub/grub_2.12.bb b/meta/recipes-bsp/grub/grub_2.12.bb new file mode 100644 index 0000000000..05d462785c --- /dev/null +++ b/meta/recipes-bsp/grub/grub_2.12.bb @@ -0,0 +1,41 @@ +require grub2.inc + +RDEPENDS:${PN}-common += "${PN}-editenv" +RDEPENDS:${PN} += "${PN}-common" +RDEPENDS:${PN}:class-native = "" + +RPROVIDES:${PN}-editenv += "${PN}-efi-editenv" + +PROVIDES:append:class-native = " grub-efi-native" + +PACKAGES =+ "${PN}-editenv ${PN}-common" +FILES:${PN}-editenv = "${bindir}/grub-editenv" +FILES:${PN}-common = " \ + ${bindir} \ + ${sysconfdir} \ + ${sbindir} \ + ${datadir}/grub \ +" +ALLOW_EMPTY:${PN} = "1" + +do_install:append () { + # Avoid conflicts with the EFI package for systems such as arm64 where we + # need to build grub and grub-efi but only EFI is supported by removing EFI + # from this package. + rm -rf ${D}${libdir}/grub/*-efi/ + rmdir --ignore-fail-on-non-empty ${D}${libdir}/grub ${D}${libdir} + + install -d ${D}${sysconfdir}/grub.d + # Remove build host references... + find "${D}" -name modinfo.sh -type f -exec \ + sed -i \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + {} + +} + +INSANE_SKIP:${PN} = "arch" +INSANE_SKIP:${PN}-dbg = "arch" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-bsp/keymaps/files/GPLv2.patch b/meta/recipes-bsp/keymaps/files/GPLv2.patch deleted file mode 100644 index 1ee8181f12..0000000000 --- a/meta/recipes-bsp/keymaps/files/GPLv2.patch +++ /dev/null @@ -1,347 +0,0 @@ -Upstream-Status: Inappropriate [licensing] - -diff --git a/COPYING b/COPYING -new file mode 100644 -index 0000000..d511905 ---- /dev/null -+++ b/COPYING -@@ -0,0 +1,339 @@ -+ GNU GENERAL PUBLIC LICENSE -+ Version 2, June 1991 -+ -+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., -+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ Everyone is permitted to copy and distribute verbatim copies -+ of this license document, but changing it is not allowed. -+ -+ Preamble -+ -+ The licenses for most software are designed to take away your -+freedom to share and change it. By contrast, the GNU General Public -+License is intended to guarantee your freedom to share and change free -+software--to make sure the software is free for all its users. This -+General Public License applies to most of the Free Software -+Foundation's software and to any other program whose authors commit to -+using it. (Some other Free Software Foundation software is covered by -+the GNU Lesser General Public License instead.) You can apply it to -+your programs, too. -+ -+ When we speak of free software, we are referring to freedom, not -+price. Our General Public Licenses are designed to make sure that you -+have the freedom to distribute copies of free software (and charge for -+this service if you wish), that you receive source code or can get it -+if you want it, that you can change the software or use pieces of it -+in new free programs; and that you know you can do these things. -+ -+ To protect your rights, we need to make restrictions that forbid -+anyone to deny you these rights or to ask you to surrender the rights. -+These restrictions translate to certain responsibilities for you if you -+distribute copies of the software, or if you modify it. -+ -+ For example, if you distribute copies of such a program, whether -+gratis or for a fee, you must give the recipients all the rights that -+you have. You must make sure that they, too, receive or can get the -+source code. And you must show them these terms so they know their -+rights. -+ -+ We protect your rights with two steps: (1) copyright the software, and -+(2) offer you this license which gives you legal permission to copy, -+distribute and/or modify the software. -+ -+ Also, for each author's protection and ours, we want to make certain -+that everyone understands that there is no warranty for this free -+software. If the software is modified by someone else and passed on, we -+want its recipients to know that what they have is not the original, so -+that any problems introduced by others will not reflect on the original -+authors' reputations. -+ -+ Finally, any free program is threatened constantly by software -+patents. We wish to avoid the danger that redistributors of a free -+program will individually obtain patent licenses, in effect making the -+program proprietary. To prevent this, we have made it clear that any -+patent must be licensed for everyone's free use or not licensed at all. -+ -+ The precise terms and conditions for copying, distribution and -+modification follow. -+ -+ GNU GENERAL PUBLIC LICENSE -+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -+ -+ 0. This License applies to any program or other work which contains -+a notice placed by the copyright holder saying it may be distributed -+under the terms of this General Public License. The "Program", below, -+refers to any such program or work, and a "work based on the Program" -+means either the Program or any derivative work under copyright law: -+that is to say, a work containing the Program or a portion of it, -+either verbatim or with modifications and/or translated into another -+language. (Hereinafter, translation is included without limitation in -+the term "modification".) Each licensee is addressed as "you". -+ -+Activities other than copying, distribution and modification are not -+covered by this License; they are outside its scope. The act of -+running the Program is not restricted, and the output from the Program -+is covered only if its contents constitute a work based on the -+Program (independent of having been made by running the Program). -+Whether that is true depends on what the Program does. -+ -+ 1. You may copy and distribute verbatim copies of the Program's -+source code as you receive it, in any medium, provided that you -+conspicuously and appropriately publish on each copy an appropriate -+copyright notice and disclaimer of warranty; keep intact all the -+notices that refer to this License and to the absence of any warranty; -+and give any other recipients of the Program a copy of this License -+along with the Program. -+ -+You may charge a fee for the physical act of transferring a copy, and -+you may at your option offer warranty protection in exchange for a fee. -+ -+ 2. You may modify your copy or copies of the Program or any portion -+of it, thus forming a work based on the Program, and copy and -+distribute such modifications or work under the terms of Section 1 -+above, provided that you also meet all of these conditions: -+ -+ a) You must cause the modified files to carry prominent notices -+ stating that you changed the files and the date of any change. -+ -+ b) You must cause any work that you distribute or publish, that in -+ whole or in part contains or is derived from the Program or any -+ part thereof, to be licensed as a whole at no charge to all third -+ parties under the terms of this License. -+ -+ c) If the modified program normally reads commands interactively -+ when run, you must cause it, when started running for such -+ interactive use in the most ordinary way, to print or display an -+ announcement including an appropriate copyright notice and a -+ notice that there is no warranty (or else, saying that you provide -+ a warranty) and that users may redistribute the program under -+ these conditions, and telling the user how to view a copy of this -+ License. (Exception: if the Program itself is interactive but -+ does not normally print such an announcement, your work based on -+ the Program is not required to print an announcement.) -+ -+These requirements apply to the modified work as a whole. If -+identifiable sections of that work are not derived from the Program, -+and can be reasonably considered independent and separate works in -+themselves, then this License, and its terms, do not apply to those -+sections when you distribute them as separate works. But when you -+distribute the same sections as part of a whole which is a work based -+on the Program, the distribution of the whole must be on the terms of -+this License, whose permissions for other licensees extend to the -+entire whole, and thus to each and every part regardless of who wrote it. -+ -+Thus, it is not the intent of this section to claim rights or contest -+your rights to work written entirely by you; rather, the intent is to -+exercise the right to control the distribution of derivative or -+collective works based on the Program. -+ -+In addition, mere aggregation of another work not based on the Program -+with the Program (or with a work based on the Program) on a volume of -+a storage or distribution medium does not bring the other work under -+the scope of this License. -+ -+ 3. You may copy and distribute the Program (or a work based on it, -+under Section 2) in object code or executable form under the terms of -+Sections 1 and 2 above provided that you also do one of the following: -+ -+ a) Accompany it with the complete corresponding machine-readable -+ source code, which must be distributed under the terms of Sections -+ 1 and 2 above on a medium customarily used for software interchange; or, -+ -+ b) Accompany it with a written offer, valid for at least three -+ years, to give any third party, for a charge no more than your -+ cost of physically performing source distribution, a complete -+ machine-readable copy of the corresponding source code, to be -+ distributed under the terms of Sections 1 and 2 above on a medium -+ customarily used for software interchange; or, -+ -+ c) Accompany it with the information you received as to the offer -+ to distribute corresponding source code. (This alternative is -+ allowed only for noncommercial distribution and only if you -+ received the program in object code or executable form with such -+ an offer, in accord with Subsection b above.) -+ -+The source code for a work means the preferred form of the work for -+making modifications to it. For an executable work, complete source -+code means all the source code for all modules it contains, plus any -+associated interface definition files, plus the scripts used to -+control compilation and installation of the executable. However, as a -+special exception, the source code distributed need not include -+anything that is normally distributed (in either source or binary -+form) with the major components (compiler, kernel, and so on) of the -+operating system on which the executable runs, unless that component -+itself accompanies the executable. -+ -+If distribution of executable or object code is made by offering -+access to copy from a designated place, then offering equivalent -+access to copy the source code from the same place counts as -+distribution of the source code, even though third parties are not -+compelled to copy the source along with the object code. -+ -+ 4. You may not copy, modify, sublicense, or distribute the Program -+except as expressly provided under this License. Any attempt -+otherwise to copy, modify, sublicense or distribute the Program is -+void, and will automatically terminate your rights under this License. -+However, parties who have received copies, or rights, from you under -+this License will not have their licenses terminated so long as such -+parties remain in full compliance. -+ -+ 5. You are not required to accept this License, since you have not -+signed it. However, nothing else grants you permission to modify or -+distribute the Program or its derivative works. These actions are -+prohibited by law if you do not accept this License. Therefore, by -+modifying or distributing the Program (or any work based on the -+Program), you indicate your acceptance of this License to do so, and -+all its terms and conditions for copying, distributing or modifying -+the Program or works based on it. -+ -+ 6. Each time you redistribute the Program (or any work based on the -+Program), the recipient automatically receives a license from the -+original licensor to copy, distribute or modify the Program subject to -+these terms and conditions. You may not impose any further -+restrictions on the recipients' exercise of the rights granted herein. -+You are not responsible for enforcing compliance by third parties to -+this License. -+ -+ 7. If, as a consequence of a court judgment or allegation of patent -+infringement or for any other reason (not limited to patent issues), -+conditions are imposed on you (whether by court order, agreement or -+otherwise) that contradict the conditions of this License, they do not -+excuse you from the conditions of this License. If you cannot -+distribute so as to satisfy simultaneously your obligations under this -+License and any other pertinent obligations, then as a consequence you -+may not distribute the Program at all. For example, if a patent -+license would not permit royalty-free redistribution of the Program by -+all those who receive copies directly or indirectly through you, then -+the only way you could satisfy both it and this License would be to -+refrain entirely from distribution of the Program. -+ -+If any portion of this section is held invalid or unenforceable under -+any particular circumstance, the balance of the section is intended to -+apply and the section as a whole is intended to apply in other -+circumstances. -+ -+It is not the purpose of this section to induce you to infringe any -+patents or other property right claims or to contest validity of any -+such claims; this section has the sole purpose of protecting the -+integrity of the free software distribution system, which is -+implemented by public license practices. Many people have made -+generous contributions to the wide range of software distributed -+through that system in reliance on consistent application of that -+system; it is up to the author/donor to decide if he or she is willing -+to distribute software through any other system and a licensee cannot -+impose that choice. -+ -+This section is intended to make thoroughly clear what is believed to -+be a consequence of the rest of this License. -+ -+ 8. If the distribution and/or use of the Program is restricted in -+certain countries either by patents or by copyrighted interfaces, the -+original copyright holder who places the Program under this License -+may add an explicit geographical distribution limitation excluding -+those countries, so that distribution is permitted only in or among -+countries not thus excluded. In such case, this License incorporates -+the limitation as if written in the body of this License. -+ -+ 9. The Free Software Foundation may publish revised and/or new versions -+of the General Public License from time to time. Such new versions will -+be similar in spirit to the present version, but may differ in detail to -+address new problems or concerns. -+ -+Each version is given a distinguishing version number. If the Program -+specifies a version number of this License which applies to it and "any -+later version", you have the option of following the terms and conditions -+either of that version or of any later version published by the Free -+Software Foundation. If the Program does not specify a version number of -+this License, you may choose any version ever published by the Free Software -+Foundation. -+ -+ 10. If you wish to incorporate parts of the Program into other free -+programs whose distribution conditions are different, write to the author -+to ask for permission. For software which is copyrighted by the Free -+Software Foundation, write to the Free Software Foundation; we sometimes -+make exceptions for this. Our decision will be guided by the two goals -+of preserving the free status of all derivatives of our free software and -+of promoting the sharing and reuse of software generally. -+ -+ NO WARRANTY -+ -+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -+REPAIR OR CORRECTION. -+ -+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -+POSSIBILITY OF SUCH DAMAGES. -+ -+ END OF TERMS AND CONDITIONS -+ -+ How to Apply These Terms to Your New Programs -+ -+ If you develop a new program, and you want it to be of the greatest -+possible use to the public, the best way to achieve this is to make it -+free software which everyone can redistribute and change under these terms. -+ -+ To do so, attach the following notices to the program. It is safest -+to attach them to the start of each source file to most effectively -+convey the exclusion of warranty; and each file should have at least -+the "copyright" line and a pointer to where the full notice is found. -+ -+ <one line to give the program's name and a brief idea of what it does.> -+ Copyright (C) <year> <name of author> -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with this program; if not, write to the Free Software Foundation, Inc., -+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ -+Also add information on how to contact you by electronic and paper mail. -+ -+If the program is interactive, make it output a short notice like this -+when it starts in an interactive mode: -+ -+ Gnomovision version 69, Copyright (C) year name of author -+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -+ This is free software, and you are welcome to redistribute it -+ under certain conditions; type `show c' for details. -+ -+The hypothetical commands `show w' and `show c' should show the appropriate -+parts of the General Public License. Of course, the commands you use may -+be called something other than `show w' and `show c'; they could even be -+mouse-clicks or menu items--whatever suits your program. -+ -+You should also get your employer (if you work as a programmer) or your -+school, if any, to sign a "copyright disclaimer" for the program, if -+necessary. Here is a sample; alter the names: -+ -+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program -+ `Gnomovision' (which makes passes at compilers) written by James Hacker. -+ -+ <signature of Ty Coon>, 1 April 1989 -+ Ty Coon, President of Vice -+ -+This General Public License does not permit incorporating your program into -+proprietary programs. If your program is a subroutine library, you may -+consider it more useful to permit linking proprietary applications with the -+library. If this is what you want to do, use the GNU Lesser General -+Public License instead of this License. diff --git a/meta/recipes-bsp/keymaps/files/keymap.sh b/meta/recipes-bsp/keymaps/files/keymap.sh index 6ebc634266..26bda60408 100755 --- a/meta/recipes-bsp/keymaps/files/keymap.sh +++ b/meta/recipes-bsp/keymaps/files/keymap.sh @@ -1,6 +1,9 @@ #!/bin/sh # # load keymap, if existing +# +# SPDX-License-Identifier: GPL-2.0-only +# KERNEL_MAJMIN=`uname -r | cut -d '.' -f 1,2` if [ -e /etc/keymap-$KERNEL_MAJMIN.map ]; then diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb index 24b13f920f..0425197c98 100644 --- a/meta/recipes-bsp/keymaps/keymaps_1.0.bb +++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb @@ -2,12 +2,11 @@ SUMMARY = "Keyboard maps" DESCRIPTION = "Keymaps and initscript to set the keymap on bootup." SECTION = "base" -RDEPENDS_${PN} = "kbd" +RDEPENDS:${PN} = "kbd" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://keymap.sh;beginline=5;endline=5;md5=829e563511c9a1d6d41f17a7a4989d6a" PACKAGE_ARCH = "${MACHINE_ARCH}" -PR = "r31" INHIBIT_DEFAULT_DEPS = "1" @@ -20,25 +19,25 @@ python __anonymous() { inherit update-rc.d -SRC_URI = "file://keymap.sh \ - file://GPLv2.patch" +SRC_URI = "file://keymap.sh" INITSCRIPT_NAME = "keymap.sh" INITSCRIPT_PARAMS = "start 01 S ." -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install () { # Only install the script if 'sysvinit' is in DISTRO_FEATURES # THe ulitity this script provides could be achieved by systemd-vconsole-setup.service if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/ + install -m 0755 ${S}/keymap.sh ${D}${sysconfdir}/init.d/ fi } -PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" -pkg_postinst_${PN} () { +PACKAGE_WRITE_DEPS:append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" +pkg_postinst:${PN} () { if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then if [ -n "$D" ]; then OPTS="--root=$D" @@ -47,4 +46,4 @@ pkg_postinst_${PN} () { fi } -ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY:${PN} = "1" diff --git a/meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch b/meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch new file mode 100644 index 0000000000..32808fb92a --- /dev/null +++ b/meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch @@ -0,0 +1,68 @@ +From 9839c169f513e65fc711646257b3e8588cce623c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 5 Aug 2020 12:06:01 -0700 +Subject: [PATCH] libacpi: Fix build witth -fno-commom + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libacpi.c | 16 ++++++++++++++++ + libacpi.h | 6 +++--- + 2 files changed, 19 insertions(+), 3 deletions(-) + +diff --git a/libacpi.c b/libacpi.c +index 4e34725..9344ea4 100644 +--- a/libacpi.c ++++ b/libacpi.c +@@ -14,6 +14,22 @@ + #include "libacpi.h" + #include "list.h" + ++/** ++ * Array for existing batteries, loop until ++ * globals->battery_count ++ */ ++battery_t batteries[MAX_ITEMS]; ++/** ++ * Array for existing thermal zones, loop until ++ * globals->thermal_count ++ */ ++thermal_t thermals[MAX_ITEMS]; ++/** ++ * Array for existing fans, loop until ++ * globals->fan_count ++ */ ++fan_t fans[MAX_ITEMS]; ++ + static int read_acpi_battinfo(const int num); + static int read_acpi_battalarm(const int num); + static int read_acpi_battstate(const int num); +diff --git a/libacpi.h b/libacpi.h +index 9334b79..5242d3d 100644 +--- a/libacpi.h ++++ b/libacpi.h +@@ -183,17 +183,17 @@ typedef struct { + * Array for existing batteries, loop until + * globals->battery_count + */ +-battery_t batteries[MAX_ITEMS]; ++extern battery_t batteries[MAX_ITEMS]; + /** + * Array for existing thermal zones, loop until + * globals->thermal_count + */ +-thermal_t thermals[MAX_ITEMS]; ++extern thermal_t thermals[MAX_ITEMS]; + /** + * Array for existing fans, loop until + * globals->fan_count + */ +-fan_t fans[MAX_ITEMS]; ++extern fan_t fans[MAX_ITEMS]; + /** + * Finds existing batteries and fills the + * corresponding batteries structures with the paths +-- +2.28.0 + diff --git a/meta/recipes-bsp/libacpi/libacpi_0.2.bb b/meta/recipes-bsp/libacpi/libacpi_0.2.bb index 5e7f7fa8e0..6aae34b310 100644 --- a/meta/recipes-bsp/libacpi/libacpi_0.2.bb +++ b/meta/recipes-bsp/libacpi/libacpi_0.2.bb @@ -5,13 +5,14 @@ SECTION = "base" HOMEPAGE = "http://www.ngolde.de/libacpi.html" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=fec17f82f16630adf2dfb7d2a46f21c5" -PR = "r6" SRC_URI = "http://www.ngolde.de/download/libacpi-${PV}.tar.gz \ file://makefile-fix.patch \ file://libacpi_fix_for_x32.patch \ file://use_correct_strip_in_cross_environment.patch \ - file://ldflags.patch " + file://ldflags.patch \ + file://0001-libacpi-Fix-build-witth-fno-commom.patch \ + " SRC_URI[md5sum] = "05b53dd7bead66dda35fec502b91066c" SRC_URI[sha256sum] = "13086e31d428b9c125954d48ac497b754bbbce2ef34ea29ecd903e82e25bad29" @@ -20,7 +21,7 @@ UPSTREAM_CHECK_URI = "http://www.ngolde.de/libacpi.html" inherit lib_package -COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)' +COMPATIBLE_HOST = '(x86_64|i.86|aarch64).*-(linux|freebsd.*)' CFLAGS += "-fPIC" EXTRA_OEMAKE = '-e MAKEFLAGS= STRIP="echo"' diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0001-Fix-cross-compilation-using-autoconf-detected-AR.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0001-Fix-cross-compilation-using-autoconf-detected-AR.patch new file mode 100644 index 0000000000..c8f0e2c4fe --- /dev/null +++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0001-Fix-cross-compilation-using-autoconf-detected-AR.patch @@ -0,0 +1,36 @@ +From ecdcf0df6c28c65ca6d1e5638726e13e373c76c5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 11 Nov 2020 22:58:55 -0800 +Subject: [PATCH] Fix cross compilation using autoconf detected AR + +currently its using 'ar' program from build host, which is not expected, +we need to respect AR passed in environment + +Upstream-Status: Inappropriate [upstream hasn't been active since 1998] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.in | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/configure.in b/configure.in +index 4ddbe8b..b7c3c31 100644 +--- a/configure.in ++++ b/configure.in +@@ -84,6 +84,13 @@ AC_ARG_ENABLE(syslog, + ]) + + dnl Checks for programs. ++m4_ifndef([AC_PROG_AR],[dnl ++ AN_MAKEVAR([AR], [AC_PROG_AR]) ++ AN_PROGRAM([ar], [AC_PROG_AR]) ++ AC_DEFUN([AC_PROG_AR], ++ [AC_CHECK_TOOL(AR, ar, :)]) ++]) ++AC_PROG_AR + AC_PROG_CC + AC_PROG_GCC_TRADITIONAL + dnl AC_PROG_INSTALL included in AM_INIT_AUTOMAKE +-- +2.29.2 + diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools-update.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools-update.patch index 33af38b4a8..ebd4a88081 100644 --- a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools-update.patch +++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools-update.patch @@ -1,6 +1,6 @@ Update autotools infrastructure (including gettext) to modern versions. -Upstream-Status: Pending +Upstream-Status: Inappropriate [upstream hasn't been active since 1998] Signed-off-by: Phil Blundell <pb@pbcl.net> diff -uprN clean/lrzsz-0.12.20/configure.in lrzsz-0.12.20/configure.in diff --git a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb index 4129237c59..3024ddcaf0 100644 --- a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb +++ b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb @@ -5,12 +5,11 @@ These programs use error correcting protocols ({z,x,y}modem) to send (sz, sx, sb receive (rz, rx, rb) files over a dial-in serial port from a variety of programs \ running under various operating systems. " HOMEPAGE = "http://www.ohse.de/uwe/software/lrzsz.html" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ file://src/lrz.c;beginline=1;endline=10;md5=5276956373ff7d8758837f6399a1045f" SECTION = "console/network" DEPENDS = "" -PR = "r6" SRC_URI = "http://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \ file://autotools-update.patch \ @@ -19,6 +18,7 @@ SRC_URI = "http://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \ file://lrzsz-check-locale.h.patch \ file://cve-2018-10195.patch \ file://include.patch \ + file://0001-Fix-cross-compilation-using-autoconf-detected-AR.patch \ " SRC_URI[md5sum] = "b5ce6a74abc9b9eb2af94dffdfd372a4" @@ -37,7 +37,7 @@ inherit update-alternatives ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "rz rx rb sz sx sb" +ALTERNATIVE:${PN} = "rz rx rb sz sx sb" ALTERNATIVE_TARGET[rz] = "${bindir}/lrz" ALTERNATIVE_TARGET[rx] = "${bindir}/lrz" @@ -46,3 +46,9 @@ ALTERNATIVE_TARGET[rb] = "${bindir}/lrz" ALTERNATIVE_TARGET[sz] = "${bindir}/lsz" ALTERNATIVE_TARGET[sx] = "${bindir}/lsz" ALTERNATIVE_TARGET[sb] = "${bindir}/lsz" + +# http://errors.yoctoproject.org/Errors/Details/766929/ +# lrzsz-0.12.20/src/tcp.c:75:56: error: passing argument 3 of 'getsockname' from incompatible pointer type [-Wincompatible-pointer-types] +# lrzsz-0.12.20/src/tcp.c:83:52: error: passing argument 3 of 'getsockname' from incompatible pointer type [-Wincompatible-pointer-types] +# lrzsz-0.12.20/src/tcp.c:103:51: error: passing argument 3 of 'accept' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch b/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch deleted file mode 100644 index d2a8048e87..0000000000 --- a/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch +++ /dev/null @@ -1,36 +0,0 @@ -From fe9860fd85e49a75bef545e5d9914070491e8002 Mon Sep 17 00:00:00 2001 -From: Alistair Francis <alistair.francis@wdc.com> -Date: Fri, 15 Feb 2019 14:57:41 -0800 -Subject: [PATCH] Makefile: Don't specify mabi or march - -To avoid - can't link double-float modules with soft-float modules -errors when building 32-bit openSBI don't specify mabi or march. - -Upstream-Status: Inappropriate [Fixes a 32-bit OE flow bug] -Signed-off-by: Alistair Francis <alistair.francis@wdc.com> - ---- - Makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/Makefile b/Makefile -index ccf8ea3..69e5b38 100644 ---- a/Makefile -+++ b/Makefile -@@ -169,7 +169,6 @@ GENFLAGS += $(firmware-genflags-y) - CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-strict-aliasing -O2 - CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls - CFLAGS += -mno-save-restore -mstrict-align --CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA) - CFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL) - CFLAGS += $(GENFLAGS) - CFLAGS += $(platform-cflags-y) -@@ -183,7 +182,6 @@ CPPFLAGS += $(firmware-cppflags-y) - ASFLAGS = -g -Wall -nostdlib -D__ASSEMBLY__ - ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls - ASFLAGS += -mno-save-restore -mstrict-align --ASFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA) - ASFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL) - ASFLAGS += $(GENFLAGS) - ASFLAGS += $(platform-asflags-y) diff --git a/meta/recipes-bsp/opensbi/opensbi-payloads.inc b/meta/recipes-bsp/opensbi/opensbi-payloads.inc index 2e32943245..a55679632e 100644 --- a/meta/recipes-bsp/opensbi/opensbi-payloads.inc +++ b/meta/recipes-bsp/opensbi/opensbi-payloads.inc @@ -1,21 +1,38 @@ def riscv_get_extra_oemake_image(d): sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') - deploy_dir = d.getVar('DEPLOY_DIR_IMAGE') - if sbi_payload is None: return "" + deploy_dir = d.getVar('DEPLOY_DIR_IMAGE') + return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload -def riscv_get_do_compile_depends(d): - sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') +def riscv_get_extra_oemake_fdt(d): + if d.getVar('RISCV_SBI_PAYLOAD') is None: + return "" + sbi_fdt = d.getVar('RISCV_SBI_FDT') + deploy_dir = d.getVar('DEPLOY_DIR_IMAGE') - if sbi_payload is None: + if sbi_fdt is None: + return "" + + return "FW_FDT_PATH=" + deploy_dir + "/" + sbi_fdt + +def riscv_get_do_compile_depends(d): + sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') or "" + if sbi_payload == "": return "" + sbi_fdt = d.getVar('RISCV_SBI_FDT') or "" + + if sbi_fdt != "" and 'u-boot.bin' in sbi_payload: + return "virtual/kernel:do_deploy virtual/bootloader:do_deploy" + if 'linux' in sbi_payload or 'Image' in sbi_payload: return "virtual/kernel:do_deploy" if 'u-boot.bin' in sbi_payload: return "virtual/bootloader:do_deploy" + if sbi_fdt != "": + return "virtual/kernel:do_deploy" return "" diff --git a/meta/recipes-bsp/opensbi/opensbi_0.8.bb b/meta/recipes-bsp/opensbi/opensbi_1.4.bb index 818efac733..cf37a41176 100644 --- a/meta/recipes-bsp/opensbi/opensbi_0.8.bb +++ b/meta/recipes-bsp/opensbi/opensbi_1.4.bb @@ -1,5 +1,6 @@ SUMMARY = "RISC-V Open Source Supervisor Binary Interface (OpenSBI)" DESCRIPTION = "OpenSBI aims to provide an open-source and extensible implementation of the RISC-V SBI specification for a platform specific firmware (M-mode) and a general purpose OS, hypervisor or bootloader (S-mode or HS-mode). OpenSBI implementation can be easily extended by RISC-V platform or System-on-Chip vendors to fit a particular hadware configuration." +HOMEPAGE = "https://github.com/riscv/opensbi" LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=42dd9555eb177f35150cf9aa240b61e5" @@ -7,21 +8,22 @@ require opensbi-payloads.inc inherit autotools-brokensep deploy -SRCREV = "a98258d0b537a295f517bbc8d813007336731fa9" -SRC_URI = "git://github.com/riscv/opensbi.git;branch=master \ - file://0001-Makefile-Don-t-specify-mabi-or-march.patch \ - " +SRCREV = "a2b255b88918715173942f2c5e1f97ac9e90c877" +SRC_URI = "git://github.com/riscv/opensbi.git;branch=master;protocol=https" S = "${WORKDIR}/git" -EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D}" +TARGET_CC_ARCH += "${LDFLAGS}" + +EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=y CLANG_TARGET= " # If RISCV_SBI_PAYLOAD is set then include it as a payload -EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_image(d)}" +EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}" +EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}" # Required if specifying a custom payload do_compile[depends] += "${@riscv_get_do_compile_depends(d)}" -do_install_append() { +do_install:append() { # In the future these might be required as a dependency for other packages. # At the moment just delete them to avoid warnings rm -r ${D}/include @@ -37,11 +39,9 @@ do_deploy () { addtask deploy before do_build after do_install -FILES_${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*" -FILES_${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*" -FILES_${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*" +FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*" +FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*" +FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*" COMPATIBLE_HOST = "(riscv64|riscv32).*" INHIBIT_PACKAGE_STRIP = "1" - -SECURITY_CFLAGS = "" diff --git a/meta/recipes-bsp/pciutils/pciutils/configure.patch b/meta/recipes-bsp/pciutils/pciutils/configure.patch index e444c13975..0ff151b8cf 100644 --- a/meta/recipes-bsp/pciutils/pciutils/configure.patch +++ b/meta/recipes-bsp/pciutils/pciutils/configure.patch @@ -1,9 +1,14 @@ +From 6af07e1f812b2444d33ce199308c87e04b2f5dc7 Mon Sep 17 00:00:00 2001 +From: Richard Purdie <rpurdie@linux.intel.com> +Date: Wed, 31 Dec 2008 17:20:38 +0000 +Subject: [PATCH] pciutils: Upgarde 2.2.4 -> 3.0.3 + This patch: * ensures we link correctly * allows us to optionally pass target information to configure rather than using uname * select linux as the platform in most cases we care about -This is a merge of various tweaks to allow us to build pciutils including +This is a merge of various tweaks to allow us to build pciutils including work from: 7/30/2010 - Qing He <qing.he@intel.com> @@ -12,24 +17,28 @@ Ionut Radu <ionutx.radu@intel.com> 2017/6/15 - RP - Cleanups and merging patches Upstream-Status: Inappropriate [embedded specific] +--- + Makefile | 2 +- + lib/configure | 14 ++++++++++---- + 2 files changed, 11 insertions(+), 5 deletions(-) -Index: pciutils-3.5.6/Makefile -=================================================================== ---- pciutils-3.5.6.orig/Makefile -+++ pciutils-3.5.6/Makefile -@@ -96,7 +96,7 @@ example: example.o lib/$(PCILIB) - example.o: example.c $(PCIINC) +diff --git a/Makefile b/Makefile +index be23593..aa13be5 100644 +--- a/Makefile ++++ b/Makefile +@@ -123,7 +123,7 @@ pcilmr$(EXEEXT): pcilmr.o $(LMROBJS) $(COMMON) lib/$(PCIIMPLIB) + pcilmr.o: pcilmr.c $(LMRINC) - %: %.o -- $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ -+ $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) $(LDLIBS) -o $@ + %$(EXEEXT): %.o +- $(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ ++ $(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) $(LDLIBS) -o $@ - %.8 %.7 %.5: %.man - M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#" -Index: pciutils-3.5.6/lib/configure -=================================================================== ---- pciutils-3.5.6.orig/lib/configure -+++ pciutils-3.5.6/lib/configure + ifdef PCI_OS_WINDOWS + comma := , +diff --git a/lib/configure b/lib/configure +index d02160b..52c1eee 100755 +--- a/lib/configure ++++ b/lib/configure @@ -9,6 +9,10 @@ echo_n() { printf '%s' "$*" } @@ -38,7 +47,7 @@ Index: pciutils-3.5.6/lib/configure +IDSDIR=$2 +DNS=yes + - if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then + if [ -z "$VERSION" ] ; then echo >&2 "Please run the configure script from the top-level Makefile" exit 1 @@ -16,8 +20,8 @@ fi @@ -56,12 +65,12 @@ Index: pciutils-3.5.6/lib/configure proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1` cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'` else -- cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'` -+ cpu=${4:-`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`} +- cpu=`uname -m | sed 's/^i.86-AT386/i386/;s/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'` ++ cpu=${4:-`uname -m | sed 's/^i.86-AT386/i386/;s/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`} fi - if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ] + if [ "$sys" = "DragonFly" ] then -@@ -35,7 +39,7 @@ if [ -z "$HOST" ] ; then +@@ -43,7 +47,7 @@ if [ -z "$HOST" ] ; then then sys=cygwin fi @@ -70,7 +79,7 @@ Index: pciutils-3.5.6/lib/configure fi [ -n "$RELEASE" ] && rel="${RELEASE}" # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless. -@@ -44,6 +48,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +@@ -52,6 +56,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo " $host $rel $cpu $sys" @@ -79,3 +88,6 @@ Index: pciutils-3.5.6/lib/configure c=config.h m=config.mk echo >$c '#define PCI_CONFIG_H' +-- +2.42.0 + diff --git a/meta/recipes-bsp/pciutils/pciutils_3.7.0.bb b/meta/recipes-bsp/pciutils/pciutils_3.12.0.bb index 4f0edc01ed..480a338696 100644 --- a/meta/recipes-bsp/pciutils/pciutils_3.7.0.bb +++ b/meta/recipes-bsp/pciutils/pciutils_3.12.0.bb @@ -4,16 +4,19 @@ to PCI bus configuration space and several utilities based on this library.' HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" SECTION = "console/utils" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -DEPENDS = "zlib kmod" +# Can drop make-native when all systems have make 4.3 +# https://git.savannah.gnu.org/cgit/make.git/commit/?id=b90fabc8d6f34fb37d428dc0fb1b8b1951a9fbed +# causes space issues in lib/libpci.pc +DEPENDS = "zlib kmod make-native" SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \ file://configure.patch" -SRC_URI[sha256sum] = "9d40b97be8b6a2cdf96aead5a61881d1f7e4e0da9544a9bac4fba1ae9dcd40eb" +SRC_URI[sha256sum] = "f185d116d5ff99b797497efce8f19f1ee8ccc5a668b97a159e3d13472f674154" -inherit multilib_header pkgconfig +inherit multilib_header pkgconfig update-alternatives PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}" PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev" @@ -46,14 +49,16 @@ do_install () { oe_runmake DESTDIR=${D} install install-lib install -d ${D}${bindir} - ln -s ../sbin/lspci ${D}${bindir}/lspci oe_multilib_header pci/config.h } PACKAGES =+ "${PN}-ids libpci" -FILES_${PN}-ids = "${datadir}/pci.ids*" -FILES_libpci = "${libdir}/libpci.so.*" -SUMMARY_${PN}-ids = "PCI utilities - device ID database" -DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils." -RDEPENDS_${PN} += "${PN}-ids" +FILES:${PN}-ids = "${datadir}/pci.ids*" +FILES:libpci = "${libdir}/libpci.so.*" +SUMMARY:${PN}-ids = "PCI utilities - device ID database" +DESCRIPTION:${PN}-ids = "Package providing the PCI device ID database for pciutils." +RDEPENDS:${PN} += "${PN}-ids" + +ALTERNATIVE:${PN} = "lspci" +ALTERNATIVE_PRIORITY = "100" diff --git a/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb b/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb index cac09101c4..c7b95e57b0 100644 --- a/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb +++ b/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb @@ -2,11 +2,10 @@ SECTION = "base" SUMMARY = "Utilities and scripts for power management" DESCRIPTION = "Simple shell command line tools to suspend and hibernate." HOMEPAGE = "http://pm-utils.freedesktop.org/wiki/" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://src/pm-pmu.c;beginline=1;endline=22;md5=3c1ddbc54e735fb4a0386e14c78a3147" -PR = "r1" SRC_URI = "http://pm-utils.freedesktop.org/releases/pm-utils-${PV}.tar.gz" @@ -17,11 +16,14 @@ inherit pkgconfig autotools manpages PACKAGECONFIG[manpages] = "--enable-doc, --disable-doc, libxslt-native xmlto-native" -RDEPENDS_${PN} = "grep bash" +RDEPENDS:${PN} = "bash" -do_configure_prepend () { +EXTRA_OECONF = "--libdir=${nonarch_libdir}" + +do_configure:prepend () { ( cd ${S}; autoreconf -f -i -s ) } -FILES_${PN} += "${libdir}/${BPN}/*" -FILES_${PN}-dbg += "${datadir}/doc/pm-utils/README.debugging" +FILES:${PN} += "${nonarch_libdir}/${BPN}/*" +FILES:${PN}-dbg += "${datadir}/doc/pm-utils/README.debugging" +FILES:${PN}-dev += "${nonarch_libdir}/pkgconfig/pm-utils.pc" diff --git a/meta/recipes-bsp/setserial/setserial/0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch b/meta/recipes-bsp/setserial/setserial/0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch new file mode 100644 index 0000000000..10c6ae881b --- /dev/null +++ b/meta/recipes-bsp/setserial/setserial/0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch @@ -0,0 +1,41 @@ +From 9bbb342f5d9ad5dc75486fd35ada8e287ba19299 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 15 Aug 2022 13:03:17 -0700 +Subject: [PATCH] setserial.c: Add needed system headers for ioctl() and + close() calls + +Add int return type for main() function + +Fixes +error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] +error: call to undeclared function 'close'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declarat +ion] + +Upstream-Status: Submitted [https://sourceforge.net/p/setserial/discussion/7060/thread/95d874c12c/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + setserial.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/setserial.c b/setserial.c +index bfda8fd..6a95513 100644 +--- a/setserial.c ++++ b/setserial.c +@@ -16,6 +16,8 @@ + #include <termios.h> + #include <string.h> + #include <errno.h> ++#include <unistd.h> ++#include <sys/ioctl.h> + + #ifdef HAVE_ASM_IOCTLS_H + #include <asm/ioctls.h> +@@ -715,7 +717,7 @@ fprintf(stderr, "\t* port\t\tset the I/O port\n"); + exit(1); + } + +-main(int argc, char **argv) ++int main(int argc, char **argv) + { + int get_flag = 0, wild_intr_flag = 0; + int c; diff --git a/meta/recipes-bsp/setserial/setserial_2.17.bb b/meta/recipes-bsp/setserial/setserial_2.17.bb index 8dbddd7dc5..98ab45145f 100644 --- a/meta/recipes-bsp/setserial/setserial_2.17.bb +++ b/meta/recipes-bsp/setserial/setserial_2.17.bb @@ -1,12 +1,10 @@ SUMMARY = "Controls the configuration of serial ports" DESCRIPTION = "setserial is a program designed to set and/or report the configuration information associated with a serial port" HOMEPAGE = "http://setserial.sourceforge.net" -AUTHOR = "Theodore Ts'o <tytso@mit.edu>" SECTION = "console/utils" -LICENSE = "GPLv2.0" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://version.h;beginline=1;endline=6;md5=2e7c59cb9e57e356ae81f50f4e4dfd99" -PR = "r3" DEPENDS += "groff-native" @@ -15,7 +13,8 @@ inherit autotools-brokensep SRC_URI = "${SOURCEFORGE_MIRROR}/setserial/${BPN}-${PV}.tar.gz \ file://add_stdlib.patch \ file://ldflags.patch \ - " + file://0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch \ + " SRC_URI[md5sum] = "c4867d72c41564318e0107745eb7a0f2" SRC_URI[sha256sum] = "7e4487d320ac31558563424189435d396ddf77953bb23111a17a3d1487b5794a" diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb b/meta/recipes-bsp/u-boot/libubootenv_0.3.5.bb index 3820ba262e..b68bbb430a 100644 --- a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb +++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.5.bb @@ -6,13 +6,12 @@ It provides a hardware-independent replacement for fw_printenv/setenv utilities provided by U-Boot" HOMEPAGE = "https://github.com/sbabic/libubootenv" -LICENSE = "LGPL-2.1" -LIC_FILES_CHKSUM = "file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://LICENSES/LGPL-2.1-or-later.txt;md5=4fbd65380cdd255951079008b364516c" SECTION = "libs" -PV = "0.2+git${SRCPV}" -SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https" -SRCREV = "86bd30a14e153a18f670b25708795253d8736f0f" +SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https;branch=master" +SRCREV = "3f4d15e36ceb58085b08dd13f3f2788e9299877b" S = "${WORKDIR}/git" @@ -20,8 +19,8 @@ inherit cmake lib_package EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release" -DEPENDS = "zlib" +DEPENDS = "zlib libyaml" PROVIDES += "u-boot-fw-utils" -RPROVIDES_${PN}-bin += "u-boot-fw-utils" +RPROVIDES:${PN}-bin += "u-boot-fw-utils" BBCLASSEXTEND = "native" diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc index f4790532b4..ca5357392a 100644 --- a/meta/recipes-bsp/u-boot/u-boot-common.inc +++ b/meta/recipes-bsp/u-boot/u-boot-common.inc @@ -4,19 +4,21 @@ ARM, MIPS and several other processors, which can be installed in a boot \ ROM and used to initialize and test the hardware or to download and run \ application code." SECTION = "bootloaders" -DEPENDS += "flex-native bison-native" +DEPENDS += "flex-native bison-native python3-setuptools-native" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1" PE = "1" # We use the revision in order to avoid having to fetch it from the # repo during parse -SRCREV = "1079ec0a77c3fda510f07860b2549c47f3a46c21" +SRCREV = "25049ad560826f7dc1c4740883b0016014a59789" -SRC_URI = "git://git.denx.de/u-boot.git \ - " +SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master" S = "${WORKDIR}/git" B = "${WORKDIR}/build" + +inherit pkgconfig + do_configure[cleandirs] = "${B}" diff --git a/meta/recipes-bsp/u-boot/u-boot-configure.inc b/meta/recipes-bsp/u-boot/u-boot-configure.inc new file mode 100644 index 0000000000..378d675364 --- /dev/null +++ b/meta/recipes-bsp/u-boot/u-boot-configure.inc @@ -0,0 +1,40 @@ +# This provides the logic for creating the desired u-boot config, +# accounting for any *.cfg files added to SRC_URI. It's separated +# from u-boot.inc for use by recipes that need u-boot properly +# configured but aren't doing a full build of u-boot itself (such as +# its companion tools). + +inherit uboot-config cml1 + +DEPENDS += "kern-tools-native" + +CONFIGURE_FILES = "${@d.getVar('UBOOT_MACHINE') or '.config'}" + +do_configure () { + if [ -n "${UBOOT_CONFIG}" ]; then + unset i j + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ]; then + oe_runmake -C ${S} O=${B}/${config} ${config} + if [ -n "${@' '.join(find_cfgs(d))}" ]; then + merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))} + oe_runmake -C ${S} O=${B}/${config} oldconfig + fi + fi + done + unset j + done + unset i + else + if [ -n "${UBOOT_MACHINE}" ]; then + oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} + else + oe_runmake -C ${S} O=${B} oldconfig + fi + merge_config.sh -m .config ${@" ".join(find_cfgs(d))} + cml1_do_configure + fi +} diff --git a/meta/recipes-bsp/u-boot/u-boot-tools.inc b/meta/recipes-bsp/u-boot/u-boot-tools.inc index 8ae290acc6..f3010763c0 100644 --- a/meta/recipes-bsp/u-boot/u-boot-tools.inc +++ b/meta/recipes-bsp/u-boot/u-boot-tools.inc @@ -1,29 +1,48 @@ SUMMARY = "U-Boot bootloader tools" -DEPENDS += "openssl" +DEPENDS += "gnutls openssl util-linux swig-native" -PROVIDES = "${MLPREFIX}u-boot-mkimage ${MLPREFIX}u-boot-mkenvimage" -PROVIDES_class-native = "u-boot-mkimage-native u-boot-mkenvimage-native" +inherit python3native +export STAGING_INCDIR="${STAGING_INCDIR_NATIVE}" -PACKAGES += "${PN}-mkimage ${PN}-mkenvimage" +PROVIDES = "${MLPREFIX}u-boot-mkimage ${MLPREFIX}u-boot-mkenvimage ${MLPREFIX}u-boot-mkeficapsule" +PROVIDES:class-native = "u-boot-mkimage-native u-boot-mkenvimage-native u-boot-mkeficapsule-native" + +PACKAGES += "${PN}-mkimage ${PN}-mkenvimage ${PN}-mkeficapsule" # Required for backward compatibility with "u-boot-mkimage-xxx.bb" -RPROVIDES_${PN}-mkimage = "u-boot-mkimage" -RREPLACES_${PN}-mkimage = "u-boot-mkimage" -RCONFLICTS_${PN}-mkimage = "u-boot-mkimage" +RPROVIDES:${PN}-mkimage = "u-boot-mkimage" +RREPLACES:${PN}-mkimage = "u-boot-mkimage" +RCONFLICTS:${PN}-mkimage = "u-boot-mkimage" -EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' -EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' -EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' +EXTRA_OEMAKE:class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' +EXTRA_OEMAKE:class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' +EXTRA_OEMAKE:class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' SED_CONFIG_EFI = '-e "s/CONFIG_EFI_LOADER=.*/# CONFIG_EFI_LOADER is not set/"' -SED_CONFIG_EFI_x86 = '' -SED_CONFIG_EFI_x86-64 = '' -SED_CONFIG_EFI_arm = '' -SED_CONFIG_EFI_armeb = '' -SED_CONFIG_EFI_aarch64 = '' +SED_CONFIG_EFI:x86 = '' +SED_CONFIG_EFI:x86-64 = '' +SED_CONFIG_EFI:arm = '' +SED_CONFIG_EFI:armeb = '' +SED_CONFIG_EFI:aarch64 = '' +SED_CONFIG_EFI:loongarch64 = '' do_compile () { - oe_runmake -C ${S} sandbox_defconfig O=${B} + # Yes, this is crazy. If you build on a system with git < 2.14 from scratch, the tree will + # be marked as "dirty" and the version will include "-dirty", leading to a reproducibility problem. + # The issue is the inode count for Licnses/README changing due to do_populate_lic hardlinking a + # copy of the file. We avoid this by ensuring the index is updated with a "git diff" before the + # u-boot machinery tries to determine the version. + # + # build$ ../git/scripts/setlocalversion ../git + # "" + # build$ ln ../git/ + # build$ ln ../git/README ../foo + # build$ ../git/scripts/setlocalversion ../git + # ""-dirty + # (i.e. creating a hardlink dirties the index) + cd ${S}; git diff; cd ${B} + + oe_runmake -C ${S} tools-only_defconfig O=${B} # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and # generating it requires bin2header tool, which for target build @@ -51,16 +70,21 @@ do_install () { # fit_check_sign install -m 0755 tools/fit_check_sign ${D}${bindir}/uboot-fit_check_sign ln -sf uboot-fit_check_sign ${D}${bindir}/fit_check_sign + + # mkeficapsule + install -m 0755 tools/mkeficapsule ${D}${bindir}/uboot-mkeficapsule + ln -sf uboot-mkeficapsule ${D}${bindir}/mkeficapsule } -ALLOW_EMPTY_${PN} = "1" -FILES_${PN} = "" -FILES_${PN}-mkimage = "${bindir}/uboot-mkimage ${bindir}/mkimage ${bindir}/uboot-dumpimage ${bindir}/dumpimage ${bindir}/uboot-fit_check_sign ${bindir}/fit_check_sign" -FILES_${PN}-mkenvimage = "${bindir}/uboot-mkenvimage ${bindir}/mkenvimage" +ALLOW_EMPTY:${PN} = "1" +FILES:${PN} = "" +FILES:${PN}-mkimage = "${bindir}/uboot-mkimage ${bindir}/mkimage ${bindir}/uboot-dumpimage ${bindir}/dumpimage ${bindir}/uboot-fit_check_sign ${bindir}/fit_check_sign" +FILES:${PN}-mkenvimage = "${bindir}/uboot-mkenvimage ${bindir}/mkenvimage" +FILES:${PN}-mkeficapsule = "${bindir}/uboot-mkeficapsule ${bindir}/mkeficapsule" -RDEPENDS_${PN}-mkimage += "dtc" -RDEPENDS_${PN} += "${PN}-mkimage ${PN}-mkenvimage" -RDEPENDS_${PN}_class-native = "" +RDEPENDS:${PN}-mkimage += "dtc" +RDEPENDS:${PN} += "${PN}-mkimage ${PN}-mkenvimage ${PN}-mkeficapsule" +RDEPENDS:${PN}:class-native = "" BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2020.04.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2024.04.bb index 7eaf721ca8..7eaf721ca8 100644 --- a/meta/recipes-bsp/u-boot/u-boot-tools_2020.04.bb +++ b/meta/recipes-bsp/u-boot/u-boot-tools_2024.04.bb diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc index c91da02959..45d700fbdd 100644 --- a/meta/recipes-bsp/u-boot/u-boot.inc +++ b/meta/recipes-bsp/u-boot/u-boot.inc @@ -3,13 +3,13 @@ PROVIDES = "virtual/bootloader" PACKAGE_ARCH = "${MACHINE_ARCH}" -DEPENDS += "kern-tools-native" +DEPENDS += "${@bb.utils.contains('UBOOT_ENV_SUFFIX', 'scr', 'u-boot-mkimage-native', '', d)}" -inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native +inherit uboot-config uboot-extlinux-config uboot-sign deploy python3native kernel-arch DEPENDS += "swig-native" -EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1' +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP}" V=1' EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}' @@ -24,92 +24,19 @@ PACKAGECONFIG[openssl] = ",,openssl-native" # file already exists it will not be overwritten. UBOOT_LOCALVERSION ?= "" -# Some versions of u-boot use .bin and others use .img. By default use .bin -# but enable individual recipes to change this value. -UBOOT_SUFFIX ??= "bin" -UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" -UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}" -UBOOT_MAKE_TARGET ?= "all" - -# Output the ELF generated. Some platforms can use the ELF file and directly -# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging -# purposes. -UBOOT_ELF ?= "" -UBOOT_ELF_SUFFIX ?= "elf" -UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}" -UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}" -UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}" - -# Some versions of u-boot build an SPL (Second Program Loader) image that -# should be packaged along with the u-boot binary as well as placed in the -# deploy directory. For those versions they can set the following variables -# to allow packaging the SPL. -SPL_BINARY ?= "" -SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" -SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" -SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" - -# Additional environment variables or a script can be installed alongside -# u-boot to be used automatically on boot. This file, typically 'uEnv.txt' -# or 'boot.scr', should be packaged along with u-boot as well as placed in the -# deploy directory. Machine configurations needing one of these files should -# include it in the SRC_URI and set the UBOOT_ENV parameter. -UBOOT_ENV_SUFFIX ?= "txt" -UBOOT_ENV ?= "" -UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" -UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" -UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" - # Default name of u-boot initial env, but enable individual recipes to change # this value. UBOOT_INITIAL_ENV ?= "${PN}-initial-env" -# U-Boot EXTLINUX variables. U-Boot searches for /boot/extlinux/extlinux.conf -# to find EXTLINUX conf file. -UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux" -UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf" -UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}" - -# returns all the elements from the src uri that are .cfg files -def find_cfgs(d): - sources=src_patches(d, True) - sources_list=[] - for s in sources: - if s.endswith('.cfg'): - sources_list.append(s) - - return sources_list - -do_configure () { - if [ -n "${UBOOT_CONFIG}" ]; then - unset i j - for config in ${UBOOT_MACHINE}; do - i=$(expr $i + 1); - for type in ${UBOOT_CONFIG}; do - j=$(expr $j + 1); - if [ $j -eq $i ]; then - oe_runmake -C ${S} O=${B}/${config} ${config} - if [ test -n "${@' '.join(find_cfgs(d))}" ]; then - merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))} - oe_runmake -C ${S} O=${B}/${config} oldconfig - fi - fi - done - unset j - done - unset i - DEVTOOL_DISABLE_MENUCONFIG=true - else - if [ -n "${UBOOT_MACHINE}" ]; then - oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} - else - oe_runmake -C ${S} O=${B} oldconfig - fi - merge_config.sh -m .config ${@" ".join(find_cfgs(d))} - cml1_do_configure - fi -} +require u-boot-configure.inc +do_savedefconfig() { + bbplain "Saving defconfig to:\n${B}/defconfig" + oe_runmake -C ${B} savedefconfig +} +do_savedefconfig[nostamp] = "1" +addtask savedefconfig after do_configure +UBOOT_ARCH_DIR = "${@'arm' if d.getVar('UBOOT_ARCH').startswith('arm') else d.getVar('UBOOT_ARCH')}" do_compile () { if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk @@ -138,7 +65,7 @@ do_compile () { for binary in ${UBOOT_BINARIES}; do k=$(expr $k + 1); if [ $k -eq $i ]; then - cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} + cp ${B}/${config}/${binary} ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} fi done @@ -162,6 +89,11 @@ do_compile () { oe_runmake -C ${S} O=${B} u-boot-initial-env fi fi + + if [ -n "${UBOOT_ENV}" ] && [ "${UBOOT_ENV_SUFFIX}" = "scr" ] + then + ${UBOOT_MKIMAGE} -C none -A ${UBOOT_ARCH} -T script -d ${WORKDIR}/${UBOOT_ENV_SRC} ${WORKDIR}/${UBOOT_ENV_BINARY} + fi } do_install () { @@ -173,9 +105,9 @@ do_install () { j=$(expr $j + 1); if [ $j -eq $i ] then - install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} + install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} # Install the uboot-initial-env if [ -n "${UBOOT_INITIAL_ENV}" ]; then @@ -225,9 +157,9 @@ do_install () { fi fi - if [ -e ${WORKDIR}/fw_env.config ] ; then + if [ -e ${UNPACKDIR}/fw_env.config ] ; then install -d ${D}${sysconfdir} - install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config + install -m 644 ${UNPACKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config fi if [ -n "${SPL_BINARY}" ] @@ -240,9 +172,9 @@ do_install () { j=$(expr $j + 1); if [ $j -eq $i ] then - install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME} + install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE} fi done unset j @@ -250,7 +182,7 @@ do_install () { unset i else install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} - ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME} + ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYFILE} fi fi @@ -266,17 +198,21 @@ do_install () { fi } -PACKAGE_BEFORE_PN += "${PN}-env" +PACKAGE_BEFORE_PN += "${PN}-env ${PN}-extlinux" -RPROVIDES_${PN}-env += "u-boot-default-env" -ALLOW_EMPTY_${PN}-env = "1" -FILES_${PN}-env = " \ +RPROVIDES:${PN}-env += "u-boot-default-env" +ALLOW_EMPTY:${PN}-env = "1" +FILES:${PN}-env = " \ ${@ '${sysconfdir}/${UBOOT_INITIAL_ENV}*' if d.getVar('UBOOT_INITIAL_ENV') else ''} \ ${sysconfdir}/fw_env.config \ " -FILES_${PN} = "/boot ${datadir}" -RDEPENDS_${PN} += "${PN}-env" +FILES:${PN}-extlinux = "${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME}" +RDEPENDS:${PN} += "${@bb.utils.contains('UBOOT_EXTLINUX', '1', '${PN}-extlinux', '', d)}" + +SYSROOT_DIRS += "/boot" +FILES:${PN} = "/boot ${datadir}" +RDEPENDS:${PN} += "${PN}-env" do_deploy () { if [ -n "${UBOOT_CONFIG}" ] @@ -287,12 +223,12 @@ do_deploy () { j=$(expr $j + 1); if [ $j -eq $i ] then - install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} cd ${DEPLOYDIR} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} # Deploy the uboot-initial-env if [ -n "${UBOOT_INITIAL_ENV}" ]; then @@ -323,8 +259,8 @@ do_deploy () { fi fi - if [ -e ${WORKDIR}/fw_env.config ] ; then - install -D -m 644 ${WORKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config-${MACHINE}-${PV}-${PR} + if [ -e ${UNPACKDIR}/fw_env.config ] ; then + install -D -m 644 ${UNPACKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config-${MACHINE}-${PV}-${PR} cd ${DEPLOYDIR} ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config-${MACHINE} ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config @@ -368,12 +304,12 @@ do_deploy () { j=$(expr $j + 1); if [ $j -eq $i ] then - install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} - rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK} + install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} + rm -f ${DEPLOYDIR}/${SPL_BINARYFILE} ${DEPLOYDIR}/${SPL_SYMLINK} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK} fi done unset j @@ -381,17 +317,14 @@ do_deploy () { unset i else install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} - rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK} ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} fi fi - if [ -n "${UBOOT_ENV}" ] then install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} - rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} fi @@ -402,6 +335,11 @@ do_deploy () { ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE} ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME} fi + + if [ -n "${UBOOT_DTB}" ] + then + install -m 644 ${B}/arch/${UBOOT_ARCH_DIR}/dts/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/ + fi } addtask deploy before do_build after do_compile diff --git a/meta/recipes-bsp/u-boot/u-boot_2020.04.bb b/meta/recipes-bsp/u-boot/u-boot_2020.04.bb deleted file mode 100644 index 02d67c0db2..0000000000 --- a/meta/recipes-bsp/u-boot/u-boot_2020.04.bb +++ /dev/null @@ -1,4 +0,0 @@ -require u-boot-common.inc -require u-boot.inc - -DEPENDS += "bc-native dtc-native" diff --git a/meta/recipes-bsp/u-boot/u-boot_2024.04.bb b/meta/recipes-bsp/u-boot/u-boot_2024.04.bb new file mode 100644 index 0000000000..b15bcaa818 --- /dev/null +++ b/meta/recipes-bsp/u-boot/u-boot_2024.04.bb @@ -0,0 +1,5 @@ +require u-boot-common.inc +require u-boot.inc + +DEPENDS += "bc-native dtc-native python3-pyelftools-native" + diff --git a/meta/recipes-bsp/usbinit/usbinit.bb b/meta/recipes-bsp/usbinit/usbinit.bb deleted file mode 100644 index ef98f0bf62..0000000000 --- a/meta/recipes-bsp/usbinit/usbinit.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Initscript for enabling USB gadget Ethernet" -DESCRIPTION = "This module allows ethernet emulation over USB, allowing for \ -all sorts of nifty things like SSH and NFS in one go plus charging over the \ -same wire, at higher speeds than most Wifi connections." -HOMEPAGE = "http://linux-sunxi.org/USB_Gadget/Ethernet" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" - -PR = "r3" - -SRC_URI = "file://usb-gether \ - file://COPYING.GPL" -S = "${WORKDIR}" - -do_install() { - install -d ${D}${sysconfdir} - install -d ${D}${sysconfdir}/init.d - install usb-gether ${D}${sysconfdir}/init.d -} - -inherit update-rc.d allarch - -INITSCRIPT_NAME = "usb-gether" -INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." diff --git a/meta/recipes-bsp/usbinit/usbinit/COPYING.GPL b/meta/recipes-bsp/usbinit/usbinit/COPYING.GPL deleted file mode 100644 index d511905c16..0000000000 --- a/meta/recipes-bsp/usbinit/usbinit/COPYING.GPL +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/meta/recipes-bsp/usbinit/usbinit/usb-gether b/meta/recipes-bsp/usbinit/usbinit/usb-gether deleted file mode 100755 index e80a0bb30e..0000000000 --- a/meta/recipes-bsp/usbinit/usbinit/usb-gether +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh -# -# usb-ether Start up the gadget usb ethernet interface. -# - -case "$1" in - start|"") - test "$VERBOSE" != no && echo "Initializing g_ether gadget..." - modprobe g_ether - ifup usb0 - ;; - stop) - test "$VERBOSE" != no && echo "Disabling g_ether..." - ifdown usb0 - rmmod g_ether - ;; - *) - echo "Usage: usb-ether {start|stop}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/meta/recipes-bsp/usbutils/usbutils/0001-usbutils.pc.in-Fix-Cflags-entry.patch b/meta/recipes-bsp/usbutils/usbutils/0001-usbutils.pc.in-Fix-Cflags-entry.patch new file mode 100644 index 0000000000..039dd5cd72 --- /dev/null +++ b/meta/recipes-bsp/usbutils/usbutils/0001-usbutils.pc.in-Fix-Cflags-entry.patch @@ -0,0 +1,34 @@ +From f558919e858453a31313a3df35906de2e036940c Mon Sep 17 00:00:00 2001 +From: Fabio Estevam <festevam@denx.de> +Date: Thu, 4 Jan 2024 03:32:11 +0100 +Subject: [PATCH] usbutils.pc.in: Fix Cflags entry + +When updating the usbutils version in OpenEmbedded from 015 to 017, +the following QA error is seen: + +QA Issue: File /usr/lib/pkgconfig/usbutils.pc in package usbutils-dev contains reference to TMPDIR [buildpaths] + +As this causes reproducibility problem due to the host PC path being +leaked, it is treated as error. + +Fix it by using the standard Cflags entry. + +Upstream-Status: Submitted [https://github.com/gregkh/usbutils/pull/184/commits/3b3e5e1ebea7060bfa118d25a91b816dfa176b31] +Signed-off-by: Fabio Estevam <festevam@denx.de> +--- + usbutils.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usbutils.pc.in b/usbutils.pc.in +index e69778c3195c..0aa0005de951 100644 +--- a/usbutils.pc.in ++++ b/usbutils.pc.in +@@ -15,4 +15,4 @@ Requires: libusb-1.0 >= 1.0.14 libudev >= 196 + Conflicts: + Libs: -L${libdir} + Libs.private: @LIBUSB_LIBS@ @UDEV_LIBS@ +-Cflags: @CFLAGS@ @LIBUSB_CFLAGS@ @UDEV_CFLAGS@ ++Cflags: -I${includedir} +-- +2.34.1 + diff --git a/meta/recipes-bsp/usbutils/usbutils_012.bb b/meta/recipes-bsp/usbutils/usbutils_012.bb deleted file mode 100644 index 28031e72a7..0000000000 --- a/meta/recipes-bsp/usbutils/usbutils_012.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Host side USB console utilities" -DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus." -HOMEPAGE = "http://www.linux-usb.org" -SECTION = "base" - -LICENSE = "GPLv2+ & (GPLv2 | GPLv3)" -# License files went missing in 010, when 011 is released add LICENSES/* back -LIC_FILES_CHKSUM = "file://lsusb.c;endline=1;md5=7d4861d978ff5ba7cb2b319ed1d4afe3 \ - file://lsusb.py.in;beginline=2;endline=2;md5=194d6a0226bf90f4f683e8968878b6cd" - -DEPENDS = "libusb1 virtual/libiconv udev" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \ - " -SRC_URI[md5sum] = "7484445cbcf04b3eacac892fe58f8d9f" -SRC_URI[sha256sum] = "ae2e10aad530d95839b6f4d46cd41715eae6f0f1789310d793e9be21b3e7ae20" - -inherit autotools pkgconfig update-alternatives - -ALTERNATIVE_${PN} = "lsusb" -ALTERNATIVE_PRIORITY = "100" - -# The binaries are mostly GPLv2+ apart from lsusb.py which is GPLv2 or v3. -LICENSE_${PN} = "GPLv2+" -LICENSE_${PN}-python = "GPLv2 | GPLv3" - -RRECOMMENDS_${PN} = "udev-hwdb" - -PACKAGE_BEFORE_PN =+ "${PN}-python" -FILES_${PN}-python += "${bindir}/lsusb.py" -RDEPENDS_${PN}-python = "python3-core" diff --git a/meta/recipes-bsp/usbutils/usbutils_017.bb b/meta/recipes-bsp/usbutils/usbutils_017.bb new file mode 100644 index 0000000000..a2e340ea4f --- /dev/null +++ b/meta/recipes-bsp/usbutils/usbutils_017.bb @@ -0,0 +1,33 @@ +SUMMARY = "Host side USB console utilities" +DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus." +HOMEPAGE = "http://www.linux-usb.org" +SECTION = "base" + +LICENSE = "GPL-2.0-or-later & (GPL-2.0-only | GPL-3.0-only)" +# License files went missing in 010, when 011 is released add LICENSES/* back +LIC_FILES_CHKSUM = "file://lsusb.c;endline=1;md5=7226e442a172bcf25807246d7ef1eba1 \ + file://lsusb.py.in;beginline=2;endline=2;md5=c443ada211d701156e42ea36d41625b3 \ + " + +DEPENDS = "libusb1 virtual/libiconv udev" + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \ + file://0001-usbutils.pc.in-Fix-Cflags-entry.patch \ + " +SRC_URI[sha256sum] = "f704c4cb78a060db88b43aac6ebfd3d93c2c5cf1d6dd0e42936faaf00814ab00" + +inherit autotools pkgconfig update-alternatives + +ALTERNATIVE:${PN} = "lsusb" +ALTERNATIVE_PRIORITY = "100" + +# The binaries are mostly GPL-2.0-or-later apart from lsusb.py which is +# GPL-2.0-only or GPL-3.0-only. +LICENSE:${PN} = "GPL-2.0-or-later" +LICENSE:${PN}-python = "GPL-2.0-only | GPL-3.0-only" + +RRECOMMENDS:${PN} = "udev-hwdb" + +PACKAGE_BEFORE_PN =+ "${PN}-python" +FILES:${PN}-python += "${bindir}/lsusb.py" +RDEPENDS:${PN}-python = "python3-core" diff --git a/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/meta/recipes-bsp/v86d/v86d_0.1.10.bb index 84e27d2007..6151f0a7e2 100644 --- a/meta/recipes-bsp/v86d/v86d_0.1.10.bb +++ b/meta/recipes-bsp/v86d/v86d_0.1.10.bb @@ -1,13 +1,12 @@ SUMMARY = "User support binary for the uvesafb kernel module" -HOMEPAGE = "http://dev.gentoo.org/~spock/projects/uvesafb/" +HOMEPAGE = "https://tracker.debian.org/pkg/v86d" +DESCRIPTION = "v86d provides a backend for kernel drivers that need to execute x86 BIOS code. The code is executed in a controlled environment and the results are passed back to the kernel via the netlink interface." # the copyright info is at the bottom of README, expect break -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://README;md5=94ac1971e4f2309dc322d598e7b1f7dd" -DEPENDS = "virtual/kernel" -RRECOMMENDS_${PN} = "kernel-module-uvesafb" -PR = "r2" +RRECOMMENDS:${PN} = "kernel-module-uvesafb" SRC_URI = "http://snapshot.debian.org/archive/debian/20110427T035506Z/pool/main/v/${BPN}/${BPN}_${PV}.orig.tar.gz \ file://Update-x86emu-from-X.org.patch \ |