From 1a4b7ee28bf7413af6513fb45ad0d0736048f866 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Sun, 16 Dec 2018 17:11:34 -0800 Subject: reset upstream subtrees to yocto 2.6 Reset the following subtrees on thud HEAD: poky: 87e3a9739d meta-openembedded: 6094ae18c8 meta-security: 31dc4e7532 meta-raspberrypi: a48743dc36 meta-xilinx: c42016e2e6 Also re-apply backports that didn't make it into thud: poky: 17726d0 systemd-systemctl-native: handle Install wildcards meta-openembedded: 4321a5d libtinyxml2: update to 7.0.1 042f0a3 libcereal: Add native and nativesdk classes e23284f libcereal: Allow empty package 030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG 179a1b9 gtest: update to 1.8.1 Squashed OpenBMC subtree compatibility updates: meta-aspeed: Brad Bishop (1): aspeed: add yocto 2.6 compatibility meta-ibm: Brad Bishop (1): ibm: prepare for yocto 2.6 meta-ingrasys: Brad Bishop (1): ingrasys: set layer compatibility to yocto 2.6 meta-openpower: Brad Bishop (1): openpower: set layer compatibility to yocto 2.6 meta-phosphor: Brad Bishop (3): phosphor: set layer compatibility to thud phosphor: libgpg-error: drop patches phosphor: react to fitimage artifact rename Ed Tanous (4): Dropbear: upgrade options for latest upgrade yocto2.6: update openssl options busybox: remove upstream watchdog patch systemd: Rebase CONFIG_CGROUP_BPF patch Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7 Signed-off-by: Brad Bishop --- poky/meta/recipes-bsp/acpid/acpid_2.0.28.bb | 7 - poky/meta/recipes-bsp/acpid/acpid_2.0.30.bb | 7 + poky/meta/recipes-bsp/apmd/apmd/legacy.patch | 2 +- .../eee-acpi-scripts/eee-acpi-scripts_git.bb | 39 ------ .../eee-acpi-scripts/files/policy-funcs | 8 -- .../eee-acpi-scripts/files/powerbtn.patch | 22 ---- .../eee-acpi-scripts/files/remove-doc-check.patch | 60 --------- .../gnu-efi/lib-Makefile-fix-parallel-issue.patch | 14 +- .../gnu-efi/gnu-efi/parallel-make-archives.patch | 16 ++- poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.6.bb | 71 ---------- poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.8.bb | 71 ++++++++++ ...-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch | 76 +++++++++++ poky/meta/recipes-bsp/grub/grub-efi_2.02.bb | 3 + poky/meta/recipes-bsp/grub/grub2.inc | 5 +- poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb | 58 --------- poky/meta/recipes-bsp/pciutils/pciutils_3.6.2.bb | 60 +++++++++ .../pcmciautils-018/lex_sys_types.patch | 21 --- .../pcmciautils/pcmciautils-018/makefile_fix.patch | 101 --------------- .../pcmciautils-018/makefile_race.patch | 29 ----- poky/meta/recipes-bsp/pcmciautils/pcmciautils.inc | 34 ----- .../recipes-bsp/pcmciautils/pcmciautils_018.bb | 11 -- ...0001-efi_loader-avoid-make-race-condition.patch | 51 -------- .../u-boot/files/CVE-2018-1000205-1.patch | 59 +++++++++ .../u-boot/files/CVE-2018-1000205-2.patch | 143 +++++++++++++++++++++ .../u-boot/files/MPC8315ERDB-enable-DHCP.patch | 19 --- .../recipes-bsp/u-boot/u-boot-common_2018.01.inc | 17 --- .../recipes-bsp/u-boot/u-boot-common_2018.07.inc | 18 +++ .../recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb | 34 ----- .../recipes-bsp/u-boot/u-boot-fw-utils_2018.07.bb | 34 +++++ .../recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb | 29 ----- .../recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb | 29 +++++ poky/meta/recipes-bsp/u-boot/u-boot.inc | 54 ++++---- poky/meta/recipes-bsp/u-boot/u-boot_2018.01.bb | 4 - poky/meta/recipes-bsp/u-boot/u-boot_2018.07.bb | 4 + .../usb-devices-avoid-dependency-on-bash.patch | 32 ++--- poky/meta/recipes-bsp/usbutils/usbutils_009.bb | 34 ----- poky/meta/recipes-bsp/usbutils/usbutils_010.bb | 32 +++++ .../v86d/v86d/Support-for-cross-compilation.patch | 34 +++++ poky/meta/recipes-bsp/v86d/v86d/aarch64-host.patch | 18 --- poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb | 4 +- 40 files changed, 635 insertions(+), 729 deletions(-) delete mode 100644 poky/meta/recipes-bsp/acpid/acpid_2.0.28.bb create mode 100644 poky/meta/recipes-bsp/acpid/acpid_2.0.30.bb delete mode 100644 poky/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb delete mode 100644 poky/meta/recipes-bsp/eee-acpi-scripts/files/policy-funcs delete mode 100644 poky/meta/recipes-bsp/eee-acpi-scripts/files/powerbtn.patch delete mode 100644 poky/meta/recipes-bsp/eee-acpi-scripts/files/remove-doc-check.patch delete mode 100644 poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.6.bb create mode 100644 poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.8.bb create mode 100644 poky/meta/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch delete mode 100644 poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb create mode 100644 poky/meta/recipes-bsp/pciutils/pciutils_3.6.2.bb delete mode 100644 poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch delete mode 100644 poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_fix.patch delete mode 100644 poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch delete mode 100644 poky/meta/recipes-bsp/pcmciautils/pcmciautils.inc delete mode 100644 poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb delete mode 100644 poky/meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch create mode 100644 poky/meta/recipes-bsp/u-boot/files/CVE-2018-1000205-1.patch create mode 100644 poky/meta/recipes-bsp/u-boot/files/CVE-2018-1000205-2.patch delete mode 100644 poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch delete mode 100644 poky/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc create mode 100644 poky/meta/recipes-bsp/u-boot/u-boot-common_2018.07.inc delete mode 100644 poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb create mode 100644 poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.07.bb delete mode 100644 poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb create mode 100644 poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb delete mode 100644 poky/meta/recipes-bsp/u-boot/u-boot_2018.01.bb create mode 100644 poky/meta/recipes-bsp/u-boot/u-boot_2018.07.bb delete mode 100644 poky/meta/recipes-bsp/usbutils/usbutils_009.bb create mode 100644 poky/meta/recipes-bsp/usbutils/usbutils_010.bb create mode 100644 poky/meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch delete mode 100644 poky/meta/recipes-bsp/v86d/v86d/aarch64-host.patch (limited to 'poky/meta/recipes-bsp') diff --git a/poky/meta/recipes-bsp/acpid/acpid_2.0.28.bb b/poky/meta/recipes-bsp/acpid/acpid_2.0.28.bb deleted file mode 100644 index 686526fda..000000000 --- a/poky/meta/recipes-bsp/acpid/acpid_2.0.28.bb +++ /dev/null @@ -1,7 +0,0 @@ -require acpid.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ - file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5" - -SRC_URI[md5sum] = "0432407b5ff75ae8e08afb43052fde2b" -SRC_URI[sha256sum] = "980c3a54b0d3f2fd49fd845a0584c5c2abeaab9e9ac09fcbb68686bbb57a7110" diff --git a/poky/meta/recipes-bsp/acpid/acpid_2.0.30.bb b/poky/meta/recipes-bsp/acpid/acpid_2.0.30.bb new file mode 100644 index 000000000..aa19d28ed --- /dev/null +++ b/poky/meta/recipes-bsp/acpid/acpid_2.0.30.bb @@ -0,0 +1,7 @@ +require acpid.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ + file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5" + +SRC_URI[md5sum] = "1528040b5d34f8c24ebabd97befbf913" +SRC_URI[sha256sum] = "28b77b62d3f64ebd1c2a3d16bccc6d4333b4e24a86aeacebec255fad223cf4cb" diff --git a/poky/meta/recipes-bsp/apmd/apmd/legacy.patch b/poky/meta/recipes-bsp/apmd/apmd/legacy.patch index 5db895e8f..887131180 100644 --- a/poky/meta/recipes-bsp/apmd/apmd/legacy.patch +++ b/poky/meta/recipes-bsp/apmd/apmd/legacy.patch @@ -7,7 +7,7 @@ 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 +Signed-off-by: Alexander Kanavin --- Makefile | 2 +- diff --git a/poky/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb b/poky/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb deleted file mode 100644 index c2a02aadb..000000000 --- a/poky/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "eeePC specific ACPI scripts" -HOMEPAGE = "http://alioth.debian.org/projects/debian-eeepc/" -SECTION = "base" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://debian/copyright;md5=77ef83ab5f4af938a93edb61f7b74f2c" - -SRCREV = "9d4cdedca25b396405f8587f9c4fbf8229e041c2" -PV = "1.1.12+git${SRCPV}" - -SRC_URI = "git://git.debian.org/git/debian-eeepc/eeepc-acpi-scripts.git \ - file://remove-doc-check.patch \ - file://powerbtn.patch \ - file://policy-funcs " - -S = "${WORKDIR}/git" - -FILES_${PN} = "${datadir}/acpi-support/ \ - ${datadir}/eeepc-acpi-scripts \ - ${sysconfdir}/default/ \ - ${sysconfdir}/acpi/" - -do_install () { - install -d ${D}${sysconfdir}/default/ - install -d ${D}${sysconfdir}/acpi/actions/ - install -d ${D}${sysconfdir}/acpi/events/ - install -d ${D}${sysconfdir}/acpi/lib/udev/rules.d - install -d ${D}${datadir}/eeepc-acpi-scripts/ - install -d ${D}${datadir}/acpi-support/ - install -m 644 ${S}/events/* ${D}${sysconfdir}/acpi/events/ - install -m 644 ${S}/lib/udev/rules.d/* ${D}${sysconfdir}/acpi/lib/udev/rules.d/ - install ${S}/actions/* ${D}${sysconfdir}/acpi/actions/ - install -m 0644 ${S}/acpilib/functions.sh ${D}${datadir}/eeepc-acpi-scripts/ - install -m 0644 ${WORKDIR}/policy-funcs ${D}${datadir}/acpi-support/ - install -m 0644 ${S}/debian/eeepc-acpi-scripts.default* ${D}${sysconfdir}/default/ -} - -RDEPENDS_${PN} = "pm-utils" - diff --git a/poky/meta/recipes-bsp/eee-acpi-scripts/files/policy-funcs b/poky/meta/recipes-bsp/eee-acpi-scripts/files/policy-funcs deleted file mode 100644 index fd099df0d..000000000 --- a/poky/meta/recipes-bsp/eee-acpi-scripts/files/policy-funcs +++ /dev/null @@ -1,8 +0,0 @@ -CheckPolicy() { - if pidof gnome-power-manager kpowersave > /dev/null || - (pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop kded kded loadedModules | grep -q klaptopdaemon) ; then - echo 0; - else - echo 1; - fi -} diff --git a/poky/meta/recipes-bsp/eee-acpi-scripts/files/powerbtn.patch b/poky/meta/recipes-bsp/eee-acpi-scripts/files/powerbtn.patch deleted file mode 100644 index 403e5569b..000000000 --- a/poky/meta/recipes-bsp/eee-acpi-scripts/files/powerbtn.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- - actions/power.sh | 3 +++ - events/powerbtn | 2 ++ - 2 files changed, 5 insertions(+) - -Upstream-Status: Inappropriate [enable feature] - -Index: git/events/powerbtn -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/events/powerbtn 2008-10-08 17:43:35.000000000 +0200 -@@ -0,0 +1,2 @@ -+event=button/power PWRF -+action=/etc/acpi/actions/power.sh -Index: git/actions/power.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/actions/power.sh 2008-10-08 17:45:26.000000000 +0200 -@@ -0,0 +1,3 @@ -+#!/bin/sh -+ -+/sbin/shutdown -h now "Power button pressed" diff --git a/poky/meta/recipes-bsp/eee-acpi-scripts/files/remove-doc-check.patch b/poky/meta/recipes-bsp/eee-acpi-scripts/files/remove-doc-check.patch deleted file mode 100644 index efb3dca7a..000000000 --- a/poky/meta/recipes-bsp/eee-acpi-scripts/files/remove-doc-check.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- - actions/hotkey.sh | 3 --- - actions/suspend.sh | 3 --- - actions/vga-toggle.sh | 3 --- - actions/volume.sh | 3 --- - 4 files changed, 12 deletions(-) - -Upstream-Status: Inappropriate [configuration] - -Index: git/eeepc-acpi-scripts/volume.sh -=================================================================== ---- git.orig/eeepc-acpi-scripts/volume.sh 2011-11-29 19:21:55.000000000 +0800 -+++ git/eeepc-acpi-scripts/volume.sh 2011-11-29 19:41:36.000000000 +0800 -@@ -3,12 +3,10 @@ - [ -d /sys/devices/platform/eeepc ] || [ -d /sys/devices/platform/eeepc-wmi ] || exit 0 - # Volume controls - --# do nothing if package is removed - PKG=eeepc-acpi-scripts - PKG_DIR=/usr/share/acpi-support/$PKG - FUNC_LIB=$PKG_DIR/lib/functions.sh - DEFAULT=/etc/default/$PKG --[ -e "$FUNC_LIB" ] || exit 0 - - . $FUNC_LIB - . $PKG_DIR/lib/sound.sh -Index: git/eeepc-acpi-scripts/hotkey.sh -=================================================================== ---- git.orig/eeepc-acpi-scripts/hotkey.sh 2011-11-29 19:21:55.000000000 +0800 -+++ git/eeepc-acpi-scripts/hotkey.sh 2011-11-29 19:39:51.000000000 +0800 -@@ -1,12 +1,10 @@ - #!/bin/sh - - [ -d /sys/devices/platform/eeepc ] || [ -d /sys/devices/platform/eeepc-wmi ] || exit 0 --# do nothing if package is removed - PKG=eeepc-acpi-scripts - PKG_DIR=/usr/share/acpi-support/$PKG - FUNC_LIB=$PKG_DIR/lib/functions.sh - DEFAULT=/etc/default/$PKG --[ -e "$FUNC_LIB" ] || exit 0 - - case $(runlevel) in - *0|*6) -Index: git/eeepc-acpi-scripts/vga-toggle.sh -=================================================================== ---- git.orig/eeepc-acpi-scripts/vga-toggle.sh 2011-11-29 19:21:55.000000000 +0800 -+++ git/eeepc-acpi-scripts/vga-toggle.sh 2011-11-29 19:40:24.000000000 +0800 -@@ -1,12 +1,10 @@ - #!/bin/sh - - [ -d /sys/devices/platform/eeepc ] || [ -d /sys/devices/platform/eeepc-wmi ] || exit 0 --# do nothing if package is removed - PKG=eeepc-acpi-scripts - PKG_DIR=/usr/share/acpi-support/$PKG - FUNC_LIB=$PKG_DIR/lib/functions.sh - DEFAULT=/etc/default/$PKG --[ -e "$FUNC_LIB" ] || exit 0 - - if [ -e "$DEFAULT" ]; then . "$DEFAULT"; fi - . $FUNC_LIB diff --git a/poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch index 1b2ae1ef0..dc00b8fa4 100644 --- a/poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch +++ b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch @@ -1,7 +1,7 @@ -From 0daa354a16aa3cade56ed423d0f8a04cf1c22f9d Mon Sep 17 00:00:00 2001 +From 3ec8c2a70304eabd5760937a4ec3fbc4068a77ed Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Thu, 23 Apr 2015 01:49:31 -0700 -Subject: [PATCH] lib/Makefile: fix parallel issue +Subject: [PATCH 2/3] lib/Makefile: fix parallel issue Fixed: Assembler messages: @@ -17,22 +17,22 @@ Upstream-Status: Pending Signed-off-by: Robert Yang --- - lib/Makefile | 2 ++ + lib/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Makefile b/lib/Makefile -index dc4b94a..f64d1ed 100644 +index 048751a..ed39bbb 100644 --- a/lib/Makefile +++ b/lib/Makefile -@@ -73,6 +73,8 @@ all: libsubdirs libefi.a +@@ -74,6 +74,8 @@ all: libsubdirs libefi.a libsubdirs: for sdir in $(SUBDIRS); do mkdir -p $$sdir; done +$(OBJS): libsubdirs + libefi.a: $(OBJS) - $(AR) rv $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) -- -1.7.9.5 +2.7.4 diff --git a/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch index 0110260bd..a9806cfdf 100644 --- a/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch +++ b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch @@ -1,4 +1,4 @@ -From 16865de66db33ca70872199e70d93efccecc8575 Mon Sep 17 00:00:00 2001 +From 48b2cdbcd761105e8ebad412fcbf23db1ac4ef7c Mon Sep 17 00:00:00 2001 From: Saul Wold Date: Sun, 9 Mar 2014 15:22:15 +0200 Subject: [PATCH 1/3] Fix parallel make failure for archives @@ -17,13 +17,15 @@ Signed-off-by: Saul Wold Signed-off-by: Darren Hart [Rebased for 3.0.6] Signed-off-by: California Sullivan +[Rebased for 3.0.8] +Signed-off-by: Yi Zhao --- gnuefi/Makefile | 3 ++- lib/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gnuefi/Makefile b/gnuefi/Makefile -index 2a61699..148106e 100644 +index 2a61699..89b560a 100644 --- a/gnuefi/Makefile +++ b/gnuefi/Makefile @@ -54,7 +54,8 @@ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a @@ -32,23 +34,23 @@ index 2a61699..148106e 100644 -libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS)) +libgnuefi.a: $(OBJS) -+ $(AR) rv $@ $(OBJS) ++ $(AR) $(ARFLAGS) $@ $(OBJS) clean: rm -f $(TARGETS) *~ *.o $(OBJS) diff --git a/lib/Makefile b/lib/Makefile -index b8d1ce7..6ef8107 100644 +index 0e6410d..048751a 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -75,7 +75,7 @@ libsubdirs: for sdir in $(SUBDIRS); do mkdir -p $$sdir; done libefi.a: $(OBJS) -- $(AR) rv -U $@ $^ -+ $(AR) rv $@ $(OBJS) +- $(AR) $(ARFLAGS) $@ $^ ++ $(AR) $(ARFLAGS) $@ $(OBJS) clean: rm -f libefi.a *~ $(OBJS) */*.o -- -2.9.4 +2.7.4 diff --git a/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.6.bb b/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.6.bb deleted file mode 100644 index 2a6071748..000000000 --- a/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.6.bb +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY = "Libraries for producing EFI binaries" -HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/" -SECTION = "devel" -LICENSE = "GPLv2+ | 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 \ - file://lib/aarch64/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ - " - -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \ - file://parallel-make-archives.patch \ - file://lib-Makefile-fix-parallel-issue.patch \ - file://gcc46-compatibility.patch \ - " - -SRC_URI[md5sum] = "46f633758a8a37db9fd6909fe270c26b" -SRC_URI[sha256sum] = "21515902d80fbea23328a61d70d3d51a47204abd1507ebfa27550a7b9bf22c91" - -COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" -COMPATIBLE_HOST_armv4 = 'null' - -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 -} - -def gnu_efi_arch(d): - import re - tarch = d.getVar("TARGET_ARCH") - if re.match("i[3456789]86", tarch): - return "ia32" - return tarch - -EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \ - 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \ - " - -# gnu-efi's Makefile treats prefix as toolchain prefix, so don't -# export it. -prefix[unexport] = "1" - -do_install() { - oe_runmake install INSTALLROOT="${D}" -} - -FILES_${PN} += "${libdir}/*.lds" - -# 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" - -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" - -python () { - ccargs = d.getVar('TUNE_CCARGS').split() - if '-mx32' in ccargs: - # use x86_64 EFI ABI - ccargs.remove('-mx32') - ccargs.append('-m64') - d.setVar('TUNE_CCARGS', ' '.join(ccargs)) -} diff --git a/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.8.bb b/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.8.bb new file mode 100644 index 000000000..dba473344 --- /dev/null +++ b/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.8.bb @@ -0,0 +1,71 @@ +SUMMARY = "Libraries for producing EFI binaries" +HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/" +SECTION = "devel" +LICENSE = "GPLv2+ | 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 \ + file://lib/aarch64/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ + " + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \ + file://parallel-make-archives.patch \ + file://lib-Makefile-fix-parallel-issue.patch \ + file://gcc46-compatibility.patch \ + " + +SRC_URI[md5sum] = "ae32011cfe6b1c40c0f244b9a49ba181" +SRC_URI[sha256sum] = "76006d8ea8d67bcf72f35d09d43e9ef6a69400d6d5d4bf64baf1ab7434e2b722" + +COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" +COMPATIBLE_HOST_armv4 = 'null' + +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 +} + +def gnu_efi_arch(d): + import re + tarch = d.getVar("TARGET_ARCH") + if re.match("i[3456789]86", tarch): + return "ia32" + return tarch + +EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \ + 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \ + " + +# gnu-efi's Makefile treats prefix as toolchain prefix, so don't +# export it. +prefix[unexport] = "1" + +do_install() { + oe_runmake install INSTALLROOT="${D}" +} + +FILES_${PN} += "${libdir}/*.lds" + +# 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" + +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" + +python () { + ccargs = d.getVar('TUNE_CCARGS').split() + if '-mx32' in ccargs: + # use x86_64 EFI ABI + ccargs.remove('-mx32') + ccargs.append('-m64') + d.setVar('TUNE_CCARGS', ' '.join(ccargs)) +} diff --git a/poky/meta/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch b/poky/meta/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch new file mode 100644 index 000000000..61d58c404 --- /dev/null +++ b/poky/meta/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch @@ -0,0 +1,76 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From 842c390469e2c2e10b5aa36700324cd3bde25875 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Sat, 17 Feb 2018 06:47:28 -0800 +Subject: [PATCH] x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32 + +Starting from binutils commit bd7ab16b4537788ad53521c45469a1bdae84ad4a: + +https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bd7ab16b4537788ad53521c45469a1bdae84ad4a + +x86-64 assembler generates R_X86_64_PLT32, instead of R_X86_64_PC32, for +32-bit PC-relative branches. Grub2 should treat R_X86_64_PLT32 as +R_X86_64_PC32. + +Signed-off-by: H.J. Lu +Reviewed-by: Daniel Kiper +--- + grub-core/efiemu/i386/loadcore64.c | 1 + + grub-core/kern/x86_64/dl.c | 1 + + util/grub-mkimagexx.c | 1 + + util/grub-module-verifier.c | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/grub-core/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c +index e49d0b6ff..18facf47f 100644 +--- a/grub-core/efiemu/i386/loadcore64.c ++++ b/grub-core/efiemu/i386/loadcore64.c +@@ -98,6 +98,7 @@ grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs, + break; + + case R_X86_64_PC32: ++ case R_X86_64_PLT32: + err = grub_efiemu_write_value (addr, + *addr32 + rel->r_addend + + sym.off +diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c +index 440690673..3a73e6e6c 100644 +--- a/grub-core/kern/x86_64/dl.c ++++ b/grub-core/kern/x86_64/dl.c +@@ -70,6 +70,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr, + break; + + case R_X86_64_PC32: ++ case R_X86_64_PLT32: + { + grub_int64_t value; + value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value - +diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c +index a2bb05439..39d7efb91 100644 +--- a/util/grub-mkimagexx.c ++++ b/util/grub-mkimagexx.c +@@ -841,6 +841,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections, + break; + + case R_X86_64_PC32: ++ case R_X86_64_PLT32: + { + grub_uint32_t *t32 = (grub_uint32_t *) target; + *t32 = grub_host_to_target64 (grub_target_to_host32 (*t32) +diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c +index 9179285a5..a79271f66 100644 +--- a/util/grub-module-verifier.c ++++ b/util/grub-module-verifier.c +@@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = { + -1 + }, (int[]){ + R_X86_64_PC32, ++ R_X86_64_PLT32, + -1 + } + }, +-- +2.11.0 + diff --git a/poky/meta/recipes-bsp/grub/grub-efi_2.02.bb b/poky/meta/recipes-bsp/grub/grub-efi_2.02.bb index 7bfc8eece..14fce97ff 100644 --- a/poky/meta/recipes-bsp/grub/grub-efi_2.02.bb +++ b/poky/meta/recipes-bsp/grub/grub-efi_2.02.bb @@ -25,6 +25,9 @@ python __anonymous () { elif re.match('aarch64', target): grubtarget = 'arm64' grubimage = prefix + "bootaa64.efi" + elif re.match('arm', target): + grubtarget = 'arm' + grubimage = prefix + "bootarm.efi" else: raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target) d.setVar("GRUB_TARGET", grubtarget) diff --git a/poky/meta/recipes-bsp/grub/grub2.inc b/poky/meta/recipes-bsp/grub/grub2.inc index a8f335e1f..325eca25b 100644 --- a/poky/meta/recipes-bsp/grub/grub2.inc +++ b/poky/meta/recipes-bsp/grub/grub2.inc @@ -17,8 +17,9 @@ SRC_URI = "https://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ 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://fix.build.with.gcc-7.patch \ + file://fix.build.with.gcc-7.patch \ file://gcc8.patch \ + file://0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch \ " SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d" SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d" @@ -32,7 +33,7 @@ COMPATIBLE_HOST_armv7ve = 'null' # 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 = "uboot" +GRUBPLATFORM_arm = "efi" GRUBPLATFORM_aarch64 = "efi" GRUBPLATFORM ??= "pc" diff --git a/poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb b/poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb deleted file mode 100644 index b18b7da3e..000000000 --- a/poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "PCI utilities" -DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ -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+" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -DEPENDS = "zlib kmod" - -SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \ - file://configure.patch" - -SRC_URI[md5sum] = "8e52278399b7b35fcfc031bc05da80a8" -SRC_URI[sha256sum] = "f346eeb90cce0910c05b877fe49eadc760fa084c0455fd313e39d4b2c2d4bb21" - -inherit multilib_header pkgconfig - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}" -PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev" - -PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}" - -# see configure.patch -do_configure () { - ( - cd lib && \ - # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no', - # so we put it before ./configure - ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH} - ) -} - -export PREFIX = "${prefix}" -export SBINDIR = "${sbindir}" -export SHAREDIR = "${datadir}" -export MANDIR = "${mandir}" - -EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}" - -# The configure script breaks if the HOST variable is set -HOST[unexport] = "1" - -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" diff --git a/poky/meta/recipes-bsp/pciutils/pciutils_3.6.2.bb b/poky/meta/recipes-bsp/pciutils/pciutils_3.6.2.bb new file mode 100644 index 000000000..413421cd8 --- /dev/null +++ b/poky/meta/recipes-bsp/pciutils/pciutils_3.6.2.bb @@ -0,0 +1,60 @@ +SUMMARY = "PCI utilities" +DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ +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+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +DEPENDS = "zlib kmod" + +SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \ + file://configure.patch" + +SRC_URI[md5sum] = "77963796d1be4f451b83e6da28ba4f82" +SRC_URI[sha256sum] = "db452ec986edefd88af0d222d22f6102f8030a8633fdfe846c3ae4bde9bb93f3" + +inherit multilib_header pkgconfig + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}" +PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev" + +PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}" + +# see configure.patch +do_configure () { + ( + cd lib && \ + # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no', + # so we put it before ./configure + ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH} + ) +} + +export PREFIX = "${prefix}" +export SBINDIR = "${sbindir}" +export SHAREDIR = "${datadir}" +export MANDIR = "${mandir}" + +EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}" + +ASNEEDED = "" + +# The configure script breaks if the HOST variable is set +HOST[unexport] = "1" + +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" diff --git a/poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch b/poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch deleted file mode 100644 index d4c2bed15..000000000 --- a/poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch +++ /dev/null @@ -1,21 +0,0 @@ -Include sys/types.h for u_long definition - -Fix errors like -In file included from src/lex_config.l:34:0: -src/yacc_config.y:45:5: error: unknown type name 'u_long' - u_long num; - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: pcmciautils-018/src/lex_config.l -=================================================================== ---- pcmciautils-018.orig/src/lex_config.l -+++ pcmciautils-018/src/lex_config.l -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - #ifdef HAS_WORDEXP - #include diff --git a/poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_fix.patch b/poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_fix.patch deleted file mode 100644 index 7b0ce2119..000000000 --- a/poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_fix.patch +++ /dev/null @@ -1,101 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -Hardcoded paths are bad... -This lets us use the install from OE's native sysroot -rebase the patch to 018, removing hardcoded path for true -as well. Removing of -D in install invocation is a little -questionable, is it some GNU extention? - --Khem Raj - -Index: pcmciautils-018/Makefile -=================================================================== ---- pcmciautils-018.orig/Makefile -+++ pcmciautils-018/Makefile -@@ -76,7 +76,7 @@ sbindir = ${exec_prefix}/sbin - mandir = ${prefix}/usr/share/man - udevdir = ${prefix}/lib/udev - --INSTALL = /usr/bin/install -c -+INSTALL = install -c - INSTALL_PROGRAM = ${INSTALL} - INSTALL_DATA = ${INSTALL} -m 644 - INSTALL_SCRIPT = ${INSTALL_PROGRAM} -@@ -180,7 +180,7 @@ endif - # if DEBUG is enabled, then we do not strip or optimize - ifeq ($(strip $(DEBUG)),true) - CFLAGS += -O1 -g -DDEBUG -D_GNU_SOURCE -- STRIPCMD = /bin/true -Since_we_are_debugging -+ STRIPCMD = true -Since_we_are_debugging - else - CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE - STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment -@@ -273,30 +273,32 @@ clean: - - install-hotplug: - $(INSTALL) -d $(DESTDIR)$(hotplugdir) -- $(INSTALL_PROGRAM) -D hotplug/pcmcia.agent $(DESTDIR)$(hotplugdir)/pcmcia.agent -- $(INSTALL_PROGRAM) -D hotplug/pcmcia.rc $(DESTDIR)$(hotplugdir)/pcmcia.rc -+ $(INSTALL_PROGRAM) hotplug/pcmcia.agent $(DESTDIR)$(hotplugdir)/pcmcia.agent -+ $(INSTALL_PROGRAM) hotplug/pcmcia.rc $(DESTDIR)$(hotplugdir)/pcmcia.rc - - uninstall-hotplug: - - rm -f $(DESTDIR)$(hotplugdir)/pcmcia.agent $(DESTDIR)$(hotplugdir)/pcmcia.rc - - install-socket-hotplug: -- $(INSTALL_PROGRAM) -D hotplug/pcmcia_socket.agent $(DESTDIR)$(hotplugdir)/pcmcia_socket.agent -- $(INSTALL_PROGRAM) -D hotplug/pcmcia_socket.rc $(DESTDIR)$(hotplugdir)/pcmcia_socket.rc -+ $(INSTALL_PROGRAM) hotplug/pcmcia_socket.agent $(DESTDIR)$(hotplugdir)/pcmcia_socket.agent -+ $(INSTALL_PROGRAM) hotplug/pcmcia_socket.rc $(DESTDIR)$(hotplugdir)/pcmcia_socket.rc - - uninstall-socket-hotplug: - - rm -f $(DESTDIR)$(hotplugdir)/pcmcia_socket.agent $(DESTDIR)$(hotplugdir)/pcmcia_socket.rc - - install-socket-tools: -- $(INSTALL_PROGRAM) -D $(PCMCIA_SOCKET_STARTUP) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_SOCKET_STARTUP) -+ $(INSTALL) -d $(DESTDIR)$(udevhelperdir) -+ $(INSTALL_PROGRAM) $(PCMCIA_SOCKET_STARTUP) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_SOCKET_STARTUP) - - uninstall-socket-tools: - - rm -f $(DESTDIR)$(udevhelperdir)/$(PCMCIA_SOCKET_STARTUP) - - install-tools: - $(INSTALL) -d $(DESTDIR)$(sbindir) -- $(INSTALL_PROGRAM) -D $(PCCARDCTL) $(DESTDIR)$(sbindir)/$(PCCARDCTL) -+ $(INSTALL) -d $(DESTDIR)$(udevhelperdir) -+ $(INSTALL_PROGRAM) $(PCCARDCTL) $(DESTDIR)$(sbindir)/$(PCCARDCTL) - $(SYMLINK) $(PCCARDCTL) $(DESTDIR)$(sbindir)/$(LSPCMCIA) -- $(INSTALL_PROGRAM) -D $(PCMCIA_CHECK_BROKEN_CIS) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_CHECK_BROKEN_CIS) -+ $(INSTALL_PROGRAM) $(PCMCIA_CHECK_BROKEN_CIS) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_CHECK_BROKEN_CIS) - - uninstall-tools: - - rm -f $(DESTDIR)$(sbindir)/$(PCCARDCTL) -@@ -305,22 +307,24 @@ uninstall-tools: - - install-config: - $(INSTALL) -d $(DESTDIR)$(pcmciaconfdir) -- $(INSTALL_DATA) -D config/config.opts $(DESTDIR)$(pcmciaconfdir)/config.opts -+ $(INSTALL_DATA) config/config.opts $(DESTDIR)$(pcmciaconfdir)/config.opts - if [ -f config/config.opts.$(ARCH) ]; then \ -- $(INSTALL_DATA) -D config/config.opts.$(ARCH) $(DESTDIR)$(pcmciaconfdir)/config.opts; \ -+ $(INSTALL_DATA) config/config.opts.$(ARCH) $(DESTDIR)$(pcmciaconfdir)/config.opts; \ - fi - - uninstall-config: - # - rm -f $(DESTDIR)$(pcmciaconfdir)/config.opts - - install-udev: -- $(INSTALL_DATA) -D $(UDEV_RULES_FILE) $(DESTDIR)$(udevrulesdir)/60-pcmcia.rules -+ $(INSTALL) -d $(DESTDIR)$(udevrulesdir) -+ $(INSTALL_DATA) $(UDEV_RULES_FILE) $(DESTDIR)$(udevrulesdir)/60-pcmcia.rules - - uninstall-udev: - - rm -f $(DESTDIR)$(udevrulesdir)/60-pcmcia.rules - - install-man: -- $(INSTALL_DATA) -D man/man8/pccardctl.8 $(DESTDIR)$(mandir)/man8/pccardctl.8 -+ $(INSTALL) -d $(DESTDIR)$(mandir)/man8 -+ $(INSTALL_DATA) man/man8/pccardctl.8 $(DESTDIR)$(mandir)/man8/pccardctl.8 - $(SYMLINK) pccardctl.8 $(DESTDIR)$(mandir)/man8/lspcmcia.8 - - uninstall-man: diff --git a/poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch b/poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch deleted file mode 100644 index 4c5eba795..000000000 --- a/poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch +++ /dev/null @@ -1,29 +0,0 @@ -"make src/lex_config.o" - -results in: - -src/lex_config.l:35:25: fatal error: yacc_config.h: No such file or directory - -so add missing dependency through a missing rule. Also remove a rule which -doesn't appear to do anything. - -RP -2016/1/31 - -Upstream-Status: Pending - -Index: pcmciautils-018/Makefile -=================================================================== ---- pcmciautils-018.orig/Makefile -+++ pcmciautils-018/Makefile -@@ -246,8 +246,8 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st - $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) src/startup.o src/yacc_config.o src/lex_config.o $(LIB_OBJS) $(ARCH_LIB_OBJS) - $(QUIET) $(STRIPCMD) $@ - --yacc_config.o lex_config.o: %.o: %.c -- $(CC) -c -MD -O -pipe $(CPPFLAGS) $< -+src/lex_config.o : src/lex_config.c src/yacc_config.h ccdv -+ $(QUIET) $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< - - debugtools: ccdv $(CBDUMP) $(CISDUMP) - diff --git a/poky/meta/recipes-bsp/pcmciautils/pcmciautils.inc b/poky/meta/recipes-bsp/pcmciautils/pcmciautils.inc deleted file mode 100644 index 26c6d75d4..000000000 --- a/poky/meta/recipes-bsp/pcmciautils/pcmciautils.inc +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Linux kernel userland utilities for the PCMCIA subsystem" -HOMEPAGE = "https://www.kernel.org/pub/linux/utils/kernel/pcmcia/" -SECTION = "kernel/userland" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" - -DEPENDS = "udev sysfsutils flex-native bison-native" -RDEPENDS_${PN} = "udev module-init-tools" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/pcmcia/${BP}.tar.xz" - -S = "${WORKDIR}/pcmciautils-${PV}" - -inherit pkgconfig - -export HOSTCC = "${BUILD_CC}" -export etcdir = "${sysconfdir}" -export sbindir = "${base_sbindir}" -export pcmciaconfdir = "${sysconfdir}/pcmcia" -export udevdir = "`pkg-config --variable=udevdir udev`" -export udevrulesdir = "`pkg-config --variable=udevdir udev`/rules.d" -export UDEV = "1" -LD = "${CC}" -CFLAGS =+ "-I${S}/src" -CFLAGS =+ "-DPCMCIAUTILS_VERSION=\\"${PV}\\"" - -EXTRA_OEMAKE = "-e 'STRIP=echo' 'LIB_OBJS=-lc -lsysfs' 'LEX=flex'" - -do_install () { - oe_runmake 'DESTDIR=${D}' install -} - -CONFFILES_${PN} += "${sysconfdir}/pcmcia/config.opts" diff --git a/poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb b/poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb deleted file mode 100644 index bf0f58a7c..000000000 --- a/poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb +++ /dev/null @@ -1,11 +0,0 @@ -require pcmciautils.inc - -SRC_URI += "file://makefile_fix.patch \ - file://makefile_race.patch \ - file://lex_sys_types.patch \ -" - -SRC_URI[md5sum] = "885431c3cefb76ffdad8cb985134e996" -SRC_URI[sha256sum] = "57c27be8f04ef4d535bcfa988567316cc57659fe69068327486dab53791e6558" - -PR = "r1" diff --git a/poky/meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch b/poky/meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch deleted file mode 100644 index da7e27c64..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 5c2e24a9ed54dfee77d1844a080e998b4affe916 Mon Sep 17 00:00:00 2001 -From: Heinrich Schuchardt -Date: Sat, 2 Jun 2018 19:00:41 +0200 -Subject: [PATCH] efi_loader: avoid make race condition - -When U-Boot is built with 'make -j' there is not guarantee that targets in -directory arch/ are built before targets in directory lib/. The current -build instruction for EFI binaries in lib/ rely on dependencies in arch/. -If $(EFI_CRT0) or $(EFI_RELOC) is not yet built before trying to build -%.efi an error - *** No rule to make target '%.efi' -occurs. - -With the patch separate copies of $(EFI_CRT0) and $(EFI_RELOC) named -efi_crt0.o and efi_reloc.o are built in lib/efi_loader and -lib/efi_selftest. - -Signed-off-by: Heinrich Schuchardt -Signed-off-by: Alexander Graf - -Upstream-Status: Backport from 2018.07 - -Signed-off-by: Joshua Watt ---- - scripts/Makefile.lib | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib -index 8f19b2db56..f2f398c935 100644 ---- a/scripts/Makefile.lib -+++ b/scripts/Makefile.lib -@@ -404,8 +404,14 @@ cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \ - - EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS) - --$(obj)/%_efi.so: $(obj)/%.o arch/$(ARCH)/lib/$(EFI_CRT0) \ -- arch/$(ARCH)/lib/$(EFI_RELOC) -+$(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S) -+ $(call if_changed_dep,as_o_S) -+ -+$(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcount_source) FORCE -+ $(call cmd,force_checksrc) -+ $(call if_changed_rule,cc_o_c) -+ -+$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o - $(call cmd,efi_ld) - - # ACPI --- -2.17.1 - diff --git a/poky/meta/recipes-bsp/u-boot/files/CVE-2018-1000205-1.patch b/poky/meta/recipes-bsp/u-boot/files/CVE-2018-1000205-1.patch new file mode 100644 index 000000000..fed3c3dcb --- /dev/null +++ b/poky/meta/recipes-bsp/u-boot/files/CVE-2018-1000205-1.patch @@ -0,0 +1,59 @@ +From 7346c1e192d63cd35f99c7e845e53c5d4d0bdc24 Mon Sep 17 00:00:00 2001 +From: Teddy Reed +Date: Sat, 9 Jun 2018 11:45:20 -0400 +Subject: [PATCH] vboot: Do not use hashed-strings offset + +The hashed-strings signature property includes two uint32_t values. +The first is unneeded as there should never be a start offset into the +strings region. The second, the size, is needed because the added +signature node appends to this region. + +See tools/image-host.c, where a static 0 value is used for the offset. + +Signed-off-by: Teddy Reed +Reviewed-by: Simon Glass + +Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; + h=7346c1e192d63cd35f99c7e845e53c5d4d0bdc24] + +CVE: CVE-2018-1000205 + +Signed-off-by: Changqing Li +--- + common/image-sig.c | 7 +++++-- + tools/image-host.c | 1 + + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/common/image-sig.c b/common/image-sig.c +index 8d2fd10..5a269d3 100644 +--- a/common/image-sig.c ++++ b/common/image-sig.c +@@ -377,8 +377,11 @@ int fit_config_check_sig(const void *fit, int noffset, int required_keynode, + /* Add the strings */ + strings = fdt_getprop(fit, noffset, "hashed-strings", NULL); + if (strings) { +- fdt_regions[count].offset = fdt_off_dt_strings(fit) + +- fdt32_to_cpu(strings[0]); ++ /* ++ * The strings region offset must be a static 0x0. ++ * This is set in tool/image-host.c ++ */ ++ fdt_regions[count].offset = fdt_off_dt_strings(fit); + fdt_regions[count].size = fdt32_to_cpu(strings[1]); + count++; + } +diff --git a/tools/image-host.c b/tools/image-host.c +index 8e43671..be2d59b 100644 +--- a/tools/image-host.c ++++ b/tools/image-host.c +@@ -135,6 +135,7 @@ static int fit_image_write_sig(void *fit, int noffset, uint8_t *value, + + ret = fdt_setprop(fit, noffset, "hashed-nodes", + region_prop, region_proplen); ++ /* This is a legacy offset, it is unused, and must remain 0. */ + strdata[0] = 0; + strdata[1] = cpu_to_fdt32(string_size); + if (!ret) { +-- +2.7.4 + diff --git a/poky/meta/recipes-bsp/u-boot/files/CVE-2018-1000205-2.patch b/poky/meta/recipes-bsp/u-boot/files/CVE-2018-1000205-2.patch new file mode 100644 index 000000000..bb79af1c7 --- /dev/null +++ b/poky/meta/recipes-bsp/u-boot/files/CVE-2018-1000205-2.patch @@ -0,0 +1,143 @@ +From 72239fc85f3eda078547956608c063ab965e90e9 Mon Sep 17 00:00:00 2001 +From: Teddy Reed +Date: Sat, 9 Jun 2018 11:38:05 -0400 +Subject: [PATCH] vboot: Add FIT_SIGNATURE_MAX_SIZE protection + +This adds a new config value FIT_SIGNATURE_MAX_SIZE, which controls the +max size of a FIT header's totalsize field. The field is checked before +signature checks are applied to protect from reading past the intended +FIT regions. + +This field is not part of the vboot signature so it should be sanity +checked. If the field is corrupted then the structure or string region +reads may have unintended behavior, such as reading from device memory. +A default value of 256MB is set and intended to support most max storage +sizes. + +Suggested-by: Simon Glass +Signed-off-by: Teddy Reed +Reviewed-by: Simon Glass + +Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; + h=72239fc85f3eda078547956608c063ab965e90e9] + +CVE: CVE-2018-1000205 + +Signed-off-by: Changqing Li +--- + Kconfig | 10 ++++++++++ + common/image-sig.c | 5 +++++ + test/py/tests/test_vboot.py | 33 +++++++++++++++++++++++++++++++++ + tools/Makefile | 1 + + 4 files changed, 49 insertions(+) + +diff --git a/Kconfig b/Kconfig +index 5a82c95..c8b86cd 100644 +--- a/Kconfig ++++ b/Kconfig +@@ -267,6 +267,16 @@ config FIT_SIGNATURE + format support in this case, enable it using + CONFIG_IMAGE_FORMAT_LEGACY. + ++config FIT_SIGNATURE_MAX_SIZE ++ hex "Max size of signed FIT structures" ++ depends on FIT_SIGNATURE ++ default 0x10000000 ++ help ++ This option sets a max size in bytes for verified FIT uImages. ++ A sane value of 256MB protects corrupted DTB structures from overlapping ++ device memory. Assure this size does not extend past expected storage ++ space. ++ + config FIT_VERBOSE + bool "Show verbose messages when FIT images fail" + help +diff --git a/common/image-sig.c b/common/image-sig.c +index f65d883..8d2fd10 100644 +--- a/common/image-sig.c ++++ b/common/image-sig.c +@@ -156,6 +156,11 @@ static int fit_image_setup_verify(struct image_sign_info *info, + { + char *algo_name; + ++ if (fdt_totalsize(fit) > CONFIG_FIT_SIGNATURE_MAX_SIZE) { ++ *err_msgp = "Total size too large"; ++ return 1; ++ } ++ + if (fit_image_hash_get_algo(fit, noffset, &algo_name)) { + *err_msgp = "Can't get hash algo property"; + return -1; +diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py +index ee939f2..3d25ec3 100644 +--- a/test/py/tests/test_vboot.py ++++ b/test/py/tests/test_vboot.py +@@ -26,6 +26,7 @@ Tests run with both SHA1 and SHA256 hashing. + + import pytest + import sys ++import struct + import u_boot_utils as util + + @pytest.mark.boardspec('sandbox') +@@ -105,6 +106,26 @@ def test_vboot(u_boot_console): + util.run_and_log(cons, [mkimage, '-F', '-k', tmpdir, '-K', dtb, + '-r', fit]) + ++ def replace_fit_totalsize(size): ++ """Replace FIT header's totalsize with something greater. ++ ++ The totalsize must be less than or equal to FIT_SIGNATURE_MAX_SIZE. ++ If the size is greater, the signature verification should return false. ++ ++ Args: ++ size: The new totalsize of the header ++ ++ Returns: ++ prev_size: The previous totalsize read from the header ++ """ ++ total_size = 0 ++ with open(fit, 'r+b') as handle: ++ handle.seek(4) ++ total_size = handle.read(4) ++ handle.seek(4) ++ handle.write(struct.pack(">I", size)) ++ return struct.unpack(">I", total_size)[0] ++ + def test_with_algo(sha_algo): + """Test verified boot with the given hash algorithm. + +@@ -146,6 +167,18 @@ def test_vboot(u_boot_console): + util.run_and_log(cons, [fit_check_sign, '-f', fit, '-k', tmpdir, + '-k', dtb]) + ++ # Replace header bytes ++ bcfg = u_boot_console.config.buildconfig ++ max_size = int(bcfg.get('config_fit_signature_max_size', 0x10000000), 0) ++ existing_size = replace_fit_totalsize(max_size + 1) ++ run_bootm(sha_algo, 'Signed config with bad hash', 'Bad Data Hash', False) ++ cons.log.action('%s: Check overflowed FIT header totalsize' % sha_algo) ++ ++ # Replace with existing header bytes ++ replace_fit_totalsize(existing_size) ++ run_bootm(sha_algo, 'signed config', 'dev+', True) ++ cons.log.action('%s: Check default FIT header totalsize' % sha_algo) ++ + # Increment the first byte of the signature, which should cause failure + sig = util.run_and_log(cons, 'fdtget -t bx %s %s value' % + (fit, sig_node)) +diff --git a/tools/Makefile b/tools/Makefile +index 5dd33ed..0c3341e 100644 +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -133,6 +133,7 @@ ifdef CONFIG_FIT_SIGNATURE + # This affects include/image.h, but including the board config file + # is tricky, so manually define this options here. + HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE ++HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE_MAX_SIZE=$(CONFIG_FIT_SIGNATURE_MAX_SIZE) + endif + + ifdef CONFIG_SYS_U_BOOT_OFFS +-- +2.7.4 + diff --git a/poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch b/poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch deleted file mode 100644 index ecaa1796a..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch +++ /dev/null @@ -1,19 +0,0 @@ -Enabled dhcp client functionality for Yocto reference -hardware MPC8315E-RDB. - -Upstream-Status: Pending - -Signed-off-by: Ed Bartosh - -Index: git/configs/MPC8315ERDB_defconfig -=================================================================== ---- git.orig/configs/MPC8315ERDB_defconfig -+++ git/configs/MPC8315ERDB_defconfig -@@ -12,6 +12,7 @@ CONFIG_CMD_PCI=y - CONFIG_CMD_SATA=y - CONFIG_CMD_USB=y - # CONFIG_CMD_SETEXPR is not set -+CONFIG_CMD_DHCP=y - CONFIG_CMD_MII=y - CONFIG_CMD_PING=y - CONFIG_CMD_DATE=y diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc b/poky/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc deleted file mode 100644 index 11b82b7e2..000000000 --- a/poky/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc +++ /dev/null @@ -1,17 +0,0 @@ -HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" -SECTION = "bootloaders" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" -PE = "1" - -# We use the revision in order to avoid having to fetch it from the -# repo during parse -SRCREV = "f3dd87e0b98999a78e500e8c6d2b063ebadf535a" - -SRC_URI = "git://git.denx.de/u-boot.git \ - file://MPC8315ERDB-enable-DHCP.patch \ - file://0001-efi_loader-avoid-make-race-condition.patch \ -" - -S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-common_2018.07.inc b/poky/meta/recipes-bsp/u-boot/u-boot-common_2018.07.inc new file mode 100644 index 000000000..22b44dccc --- /dev/null +++ b/poky/meta/recipes-bsp/u-boot/u-boot-common_2018.07.inc @@ -0,0 +1,18 @@ +HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" +SECTION = "bootloaders" +DEPENDS += "flex-native bison-native" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" +PE = "1" + +# We use the revision in order to avoid having to fetch it from the +# repo during parse +SRCREV = "8c5d4fd0ec222701598a27b26ab7265d4cee45a3" + +SRC_URI = "git://git.denx.de/u-boot.git \ + file://CVE-2018-1000205-1.patch \ + file://CVE-2018-1000205-2.patch \ +" + +S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb b/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb deleted file mode 100644 index 02887a138..000000000 --- a/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb +++ /dev/null @@ -1,34 +0,0 @@ -require u-boot-common_${PV}.inc - -SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" -DEPENDS = "mtd-utils" - -INSANE_SKIP_${PN} = "already-stripped" -EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' -EXTRA_OEMAKE_class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' - -inherit uboot-config - -do_compile () { - oe_runmake ${UBOOT_MACHINE} - oe_runmake envtools -} - -do_install () { - install -d ${D}${base_sbindir} - install -d ${D}${sysconfdir} - install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv - install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv - install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config -} - -do_install_class-cross () { - install -d ${D}${bindir_cross} - install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv - install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv -} - -SYSROOT_DIRS_append_class-cross = " ${bindir_cross}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -BBCLASSEXTEND = "cross" diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.07.bb b/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.07.bb new file mode 100644 index 000000000..52c13e75d --- /dev/null +++ b/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.07.bb @@ -0,0 +1,34 @@ +require u-boot-common_${PV}.inc + +SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" +DEPENDS += "mtd-utils" + +INSANE_SKIP_${PN} = "already-stripped" +EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' +EXTRA_OEMAKE_class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' + +inherit uboot-config + +do_compile () { + oe_runmake ${UBOOT_MACHINE} + oe_runmake envtools +} + +do_install () { + install -d ${D}${base_sbindir} + install -d ${D}${sysconfdir} + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv + install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config +} + +do_install_class-cross () { + install -d ${D}${bindir_cross} + install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv + install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv +} + +SYSROOT_DIRS_append_class-cross = " ${bindir_cross}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +BBCLASSEXTEND = "cross" diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb b/poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb deleted file mode 100644 index 1c008be96..000000000 --- a/poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb +++ /dev/null @@ -1,29 +0,0 @@ -require u-boot-common_${PV}.inc - -SUMMARY = "U-Boot bootloader image creation tool" -DEPENDS = "openssl" - -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' - -do_compile () { - oe_runmake sandbox_defconfig - - # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and - # generating it requires bin2header tool, which for target build - # is built with target tools and thus cannot be executed on host. - sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config - - oe_runmake cross_tools NO_SDL=1 -} - -do_install () { - install -d ${D}${bindir} - install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage - ln -sf uboot-mkimage ${D}${bindir}/mkimage -} - -RDEPENDS_${PN} += "dtc" - -BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb b/poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb new file mode 100644 index 000000000..08bff1d16 --- /dev/null +++ b/poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb @@ -0,0 +1,29 @@ +require u-boot-common_${PV}.inc + +SUMMARY = "U-Boot bootloader image creation tool" +DEPENDS += "openssl" + +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' + +do_compile () { + oe_runmake sandbox_defconfig + + # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and + # generating it requires bin2header tool, which for target build + # is built with target tools and thus cannot be executed on host. + sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config + + oe_runmake cross_tools NO_SDL=1 +} + +do_install () { + install -d ${D}${bindir} + install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage + ln -sf uboot-mkimage ${D}${bindir}/mkimage +} + +RDEPENDS_${PN} += "dtc" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-bsp/u-boot/u-boot.inc b/poky/meta/recipes-bsp/u-boot/u-boot.inc index 95c2f4db1..48fbc5721 100644 --- a/poky/meta/recipes-bsp/u-boot/u-boot.inc +++ b/poky/meta/recipes-bsp/u-boot/u-boot.inc @@ -231,7 +231,7 @@ do_deploy () { rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK} ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK} ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY} - fi + fi if [ -n "${UBOOT_ELF}" ] then @@ -263,32 +263,32 @@ do_deploy () { if [ -n "${SPL_BINARY}" ] then - if [ -n "${UBOOT_CONFIG}" ] - then - 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 - 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} - fi - done - unset j - done - 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_CONFIG}" ] + then + 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 + 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} + fi + done + unset j + done + 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}" ] diff --git a/poky/meta/recipes-bsp/u-boot/u-boot_2018.01.bb b/poky/meta/recipes-bsp/u-boot/u-boot_2018.01.bb deleted file mode 100644 index 37c21dcaa..000000000 --- a/poky/meta/recipes-bsp/u-boot/u-boot_2018.01.bb +++ /dev/null @@ -1,4 +0,0 @@ -require u-boot-common_${PV}.inc -require u-boot.inc - -DEPENDS += "bc-native dtc-native" diff --git a/poky/meta/recipes-bsp/u-boot/u-boot_2018.07.bb b/poky/meta/recipes-bsp/u-boot/u-boot_2018.07.bb new file mode 100644 index 000000000..37c21dcaa --- /dev/null +++ b/poky/meta/recipes-bsp/u-boot/u-boot_2018.07.bb @@ -0,0 +1,4 @@ +require u-boot-common_${PV}.inc +require u-boot.inc + +DEPENDS += "bc-native dtc-native" diff --git a/poky/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch b/poky/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch index a6b241f85..7edff2614 100644 --- a/poky/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch +++ b/poky/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch @@ -1,30 +1,30 @@ -From 333d5fbbc03481f1aa222bd68c2609db168ae3e0 Mon Sep 17 00:00:00 2001 -From: Paul Eggleton -Date: Thu, 26 Jul 2012 10:37:32 +0100 -Subject: [PATCH] usb-devices: avoid dependency on bash +Upstream-Status: Backport (https://github.com/gregkh/usbutils/commit/508d1acf42e1bfd470c6bf1a188574c69c20aeed) +Signed-off-by: Ross Burton -By virtue of having #!/bin/bash this script declared that it requires -bash, however manual examination, checkbashisms and tests with dash -and busybox show that it doesn't contain any bashisms, so change the -header to avoid the dependency. +From 1c9162a5b30550aec8fa163906067bc179291b57 Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Fri, 27 Jul 2018 15:28:34 +0100 +Subject: [PATCH] usb-devices: use /bin/sh -Upstream-Status: Pending +This script doesn't use any bashisms, so change the hashbang to /bin/sh. -Signed-off-by: Paul Eggleton +Fixes #73. + +Signed-off-by: Ross Burton --- - usb-devices | 2 +- + usb-devices | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usb-devices b/usb-devices -index b2052e2..14a5358 100755 +index afb4217..89d1b7d 100755 --- a/usb-devices +++ b/usb-devices @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh - - # Copyright: 2009 Greg Kroah-Hartman - # 2009 Randy Dunlap + # SPDX-License-Identifier: GPL-2.0+ + # + # Copyright (c) 2009 Greg Kroah-Hartman -- -1.7.9.5 +2.11.0 diff --git a/poky/meta/recipes-bsp/usbutils/usbutils_009.bb b/poky/meta/recipes-bsp/usbutils/usbutils_009.bb deleted file mode 100644 index 3ffc0dd97..000000000 --- a/poky/meta/recipes-bsp/usbutils/usbutils_009.bb +++ /dev/null @@ -1,34 +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+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = "libusb zlib virtual/libiconv udev" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \ - file://usb-devices-avoid-dependency-on-bash.patch \ - " - -SRC_URI[md5sum] = "b5dbc498b2eb5058f7a57fc6532d0aad" -SRC_URI[sha256sum] = "e73543293a17c7803994eac97a49e58b377e08e6299ba11aad09794b91340e8b" - -inherit autotools pkgconfig distro_features_check update-alternatives - -ALTERNATIVE_${PN} = "lsusb" -ALTERNATIVE_PRIORITY = "100" - -FILES_${PN}-dev += "${datadir}/pkgconfig" - -RRECOMMENDS_${PN} = "udev-hwdb" -RDEPENDS_${PN}-ptest = "libboost-system libboost-thread" - -PACKAGE_BEFORE_PN =+ "${PN}-python" -FILES_${PN}-python += "${bindir}/lsusb.py" -RDEPENDS_${PN}-python = "python3-core" - -do_install_append() { - sed -i -E '1s,#!.+python,#!${bindir}/python3,' ${D}${bindir}/lsusb.py -} diff --git a/poky/meta/recipes-bsp/usbutils/usbutils_010.bb b/poky/meta/recipes-bsp/usbutils/usbutils_010.bb new file mode 100644 index 000000000..e6d05b8e8 --- /dev/null +++ b/poky/meta/recipes-bsp/usbutils/usbutils_010.bb @@ -0,0 +1,32 @@ +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 \ + file://usb-devices-avoid-dependency-on-bash.patch \ + " +SRC_URI[md5sum] = "5eb2d2d68f9ed6dc3e9659a5988f7ed6" +SRC_URI[sha256sum] = "881ba47fb2df10c3ba54a4cd6755a90377180890788e476f99d480ea9bc8bb58" + +inherit autotools pkgconfig distro_features_check 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/poky/meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch b/poky/meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch new file mode 100644 index 000000000..15f70a59a --- /dev/null +++ b/poky/meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch @@ -0,0 +1,34 @@ +From 8eda59654fd31416164c78f6068715b01767ed4e Mon Sep 17 00:00:00 2001 +From: Serhey Popovych +Date: Wed, 31 Oct 2018 07:31:47 -0400 +Subject: v86d: Support for cross compilation + +It is common to build on one system for another (e.g. on IBM Power +machine for Intel x86) where HOST_ARCH (uname -m) != TARGET_ARCH. + +Take TARGET_ARCH from environment if it is given, otherwise fall back +to `uname -m`. + +Upstream-Status: Pending +Signed-off-by: Serhey Popovych +--- + configure | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index cbbd6b3..046aa99 100755 +--- a/configure ++++ b/configure +@@ -23,7 +23,8 @@ copt_x86emu_type="bool" + copt_x86emu_def=auto + copt_x86emu_test() + { +- local m=`uname -m` ++ local m="${TARGET_ARCH:-$(uname -m)}" ++ + if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then + echo "n"; + elif [ "$m" = "x86_64" ]; then +-- +1.8.3.1 + diff --git a/poky/meta/recipes-bsp/v86d/v86d/aarch64-host.patch b/poky/meta/recipes-bsp/v86d/v86d/aarch64-host.patch deleted file mode 100644 index 701fed7b5..000000000 --- a/poky/meta/recipes-bsp/v86d/v86d/aarch64-host.patch +++ /dev/null @@ -1,18 +0,0 @@ -Accept aarch64 as valid build host - -Upstream-Status: Pending -Signed-off-by: Khem Raj - -Index: v86d-0.1.10/configure -=================================================================== ---- v86d-0.1.10.orig/configure -+++ v86d-0.1.10/configure -@@ -26,7 +26,7 @@ copt_x86emu_test() - local m=`uname -m` - if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then - echo "n"; -- elif [ "$m" = "x86_64" ]; then -+ elif [ "$m" = "x86_64" -o "$m" = "aarch64" ]; then - echo "y"; - else - echo "It looks like your architecture '$m' isn't supported by this version of v86d." >&2 diff --git a/poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb index f97b80d08..84e27d200 100644 --- a/poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb +++ b/poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb @@ -12,7 +12,7 @@ PR = "r2" 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 \ file://ar-from-env.patch \ - file://aarch64-host.patch \ + file://Support-for-cross-compilation.patch \ " SRC_URI[md5sum] = "889686ec8424468fe0d205742e77a4c2" @@ -22,7 +22,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" COMPATIBLE_HOST = '(i.86|x86_64).*-linux' do_configure () { - ./configure --with-x86emu + TARGET_ARCH="${TARGET_ARCH}" ./configure --with-x86emu } do_compile () { -- cgit v1.2.3