aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-10-21 00:33:43 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-10-21 00:33:43 +0200
commit023522d3a1e81fe9bc803183337fdc8c183a88c4 (patch)
treeec374744812891a627f33fa457b0bcf083e2c142 /gnu/packages/patches
parent07abc851ce8a580253061e065b31a4037d2f965d (diff)
parent7373eb8304e0ebbfabe66deb59e78187013403dd (diff)
downloadguix-023522d3a1e81fe9bc803183337fdc8c183a88c4.tar
guix-023522d3a1e81fe9bc803183337fdc8c183a88c4.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/arm-trusted-firmware-disable-hdcp.patch82
-rw-r--r--gnu/packages/patches/arm-trusted-firmware-optional-bin-generation.patch86
-rw-r--r--gnu/packages/patches/arm-trusted-firmware-rockchip-disable-binary.patch73
-rw-r--r--gnu/packages/patches/dav1d-aarch64-symbol-alignment.patch25
-rw-r--r--gnu/packages/patches/kodi-increase-test-timeout.patch18
-rw-r--r--gnu/packages/patches/libmpeg2-arm-private-symbols.patch48
-rw-r--r--gnu/packages/patches/libmpeg2-global-symbol-test.patch63
7 files changed, 395 insertions, 0 deletions
diff --git a/gnu/packages/patches/arm-trusted-firmware-disable-hdcp.patch b/gnu/packages/patches/arm-trusted-firmware-disable-hdcp.patch
new file mode 100644
index 0000000000..edae2352d9
--- /dev/null
+++ b/gnu/packages/patches/arm-trusted-firmware-disable-hdcp.patch
@@ -0,0 +1,82 @@
+From c7f0cd054578152a250f784bf82c8ca53aa91a02 Mon Sep 17 00:00:00 2001
+From: Ziyuan Xu <xzy.xu@rock-chips.com>
+Date: Tue, 8 Oct 2019 10:27:05 +0800
+Subject: [PATCH] plat/rockchip: cliam a macro to enable hdcp feature for DP
+
+HDCP is using a binary driver, add macro PLAT_RK_DP_HDCP to make it as
+an option.
+
+Change-Id: I54ef1a3635a28e8ae56654bd1e91dfe011520a7f
+Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
+Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
+---
+ plat/rockchip/rk3399/plat_sip_calls.c | 4 ++++
+ plat/rockchip/rk3399/platform.mk | 11 +++++++----
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/plat/rockchip/rk3399/plat_sip_calls.c b/plat/rockchip/rk3399/plat_sip_calls.c
+index c2cc5b11c..ce8476c9a 100644
+--- a/plat/rockchip/rk3399/plat_sip_calls.c
++++ b/plat/rockchip/rk3399/plat_sip_calls.c
+@@ -56,17 +56,21 @@ uintptr_t rockchip_plat_sip_handler(uint32_t smc_fid,
+ void *handle,
+ u_register_t flags)
+ {
++#ifdef PLAT_RK_DP_HDCP
+ uint64_t x5, x6;
++#endif
+
+ switch (smc_fid) {
+ case RK_SIP_DDR_CFG:
+ SMC_RET1(handle, ddr_smc_handler(x1, x2, x3, x4));
++#ifdef PLAT_RK_DP_HDCP
+ case RK_SIP_HDCP_CONTROL:
+ SMC_RET1(handle, dp_hdcp_ctrl(x1));
+ case RK_SIP_HDCP_KEY_DATA64:
+ x5 = read_ctx_reg(get_gpregs_ctx(handle), CTX_GPREG_X5);
+ x6 = read_ctx_reg(get_gpregs_ctx(handle), CTX_GPREG_X6);
+ SMC_RET1(handle, dp_hdcp_store_key(x1, x2, x3, x4, x5, x6));
++#endif
+ default:
+ ERROR("%s: unhandled SMC (0x%x)\n", __func__, smc_fid);
+ SMC_RET1(handle, SMC_UNK);
+diff --git a/plat/rockchip/rk3399/platform.mk b/plat/rockchip/rk3399/platform.mk
+index 25c498da8..01577492d 100644
+--- a/plat/rockchip/rk3399/platform.mk
++++ b/plat/rockchip/rk3399/platform.mk
+@@ -57,7 +57,6 @@ BL31_SOURCES += ${RK_GIC_SOURCES} \
+ ${RK_PLAT_COMMON}/aarch64/platform_common.c \
+ ${RK_PLAT_COMMON}/rockchip_sip_svc.c \
+ ${RK_PLAT_SOC}/plat_sip_calls.c \
+- ${RK_PLAT_SOC}/drivers/dp/cdn_dp.c \
+ ${RK_PLAT_SOC}/drivers/gpio/rk3399_gpio.c \
+ ${RK_PLAT_SOC}/drivers/pmu/pmu.c \
+ ${RK_PLAT_SOC}/drivers/pmu/pmu_fw.c \
+@@ -89,17 +88,21 @@ $(eval $(call add_define,RK3399M0FW))
+ RK3399M0PMUFW=${BUILD_M0}/${PLAT_M0}pmu.bin
+ $(eval $(call add_define,RK3399M0PMUFW))
+
++ifdef PLAT_RK_DP_HDCP
++BL31_SOURCES += ${RK_PLAT_SOC}/drivers/dp/cdn_dp.c
++
+ HDCPFW=${RK_PLAT_SOC}/drivers/dp/hdcp.bin
+ $(eval $(call add_define,HDCPFW))
+
++${BUILD_PLAT}/bl31/cdn_dp.o: CCACHE_EXTRAFILES=$(HDCPFW)
++${RK_PLAT_SOC}/drivers/dp/cdn_dp.c: $(HDCPFW)
++endif
++
+ # CCACHE_EXTRAFILES is needed because ccache doesn't handle .incbin
+ export CCACHE_EXTRAFILES
+ ${BUILD_PLAT}/bl31/pmu_fw.o: CCACHE_EXTRAFILES=$(RK3399M0FW):$(RK3399M0PMUFW)
+ ${RK_PLAT_SOC}/drivers/pmu/pmu_fw.c: $(RK3399M0FW)
+
+-${BUILD_PLAT}/bl31/cdn_dp.o: CCACHE_EXTRAFILES=$(HDCPFW)
+-${RK_PLAT_SOC}/drivers/dp/cdn_dp.c: $(HDCPFW)
+-
+ $(eval $(call MAKE_PREREQ_DIR,${BUILD_M0},${BUILD_PLAT}))
+ .PHONY: $(RK3399M0FW)
+ $(RK3399M0FW): | ${BUILD_M0}
+--
+2.20.1
+
diff --git a/gnu/packages/patches/arm-trusted-firmware-optional-bin-generation.patch b/gnu/packages/patches/arm-trusted-firmware-optional-bin-generation.patch
new file mode 100644
index 0000000000..b2b8a12e1d
--- /dev/null
+++ b/gnu/packages/patches/arm-trusted-firmware-optional-bin-generation.patch
@@ -0,0 +1,86 @@
+From b02de4cb14ee9c2bfff53d36f0b7ec6a2065bc94 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christoph=20M=C3=BCllner?= <christophm30@gmail.com>
+Date: Wed, 24 Apr 2019 09:45:30 +0200
+Subject: [PATCH 1/2] build_macros: Add mechanism to prevent bin generation.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On certain platforms it does not make sense to generate
+TF-A binary images. For example a platform could make use of serveral
+memory areas, which are non-continuous and the resulting binary
+therefore would suffer from the padding-bytes.
+Typically these platforms use the ELF image.
+
+This patch introduces a variable DISABLE_BIN_GENERATION, which
+can be set to '1' in the platform makefile to prevent the binary
+generation.
+
+Signed-off-by: Christoph Müllner <christophm30@gmail.com>
+Change-Id: I62948e88bab685bb055fe6167d9660d14e604462
+---
+ docs/user-guide.rst | 4 ++++
+ make_helpers/build_macros.mk | 9 +++++++++
+ make_helpers/defaults.mk | 3 +++
+ 3 files changed, 16 insertions(+)
+
+diff --git a/docs/user-guide.rst b/docs/user-guide.rst
+index 0848769b3..19919f112 100644
+--- a/docs/user-guide.rst
++++ b/docs/user-guide.rst
+@@ -369,6 +369,10 @@ Common build options
+ - ``DEBUG``: Chooses between a debug and release build. It can take either 0
+ (release) or 1 (debug) as values. 0 is the default.
+
++- ``DISABLE_BIN_GENERATION``: Boolean option to disable the generation
++ of the binary image. If set to 1, then only the ELF image is built.
++ 0 is the default.
++
+ - ``DYN_DISABLE_AUTH``: Provides the capability to dynamically disable Trusted
+ Board Boot authentication at runtime. This option is meant to be enabled only
+ for development platforms. ``TRUSTED_BOARD_BOOT`` flag must be set if this
+diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
+index 5d33954ad..2d41b2db1 100644
+--- a/make_helpers/build_macros.mk
++++ b/make_helpers/build_macros.mk
+@@ -438,6 +438,11 @@ else
+ --script $(LINKERFILE) $(BUILD_DIR)/build_message.o \
+ $(OBJS) $(LDPATHS) $(LIBWRAPPER) $(LDLIBS) $(BL_LIBS)
+ endif
++ifeq ($(DISABLE_BIN_GENERATION),1)
++ @${ECHO_BLANK_LINE}
++ @echo "Built $$@ successfully"
++ @${ECHO_BLANK_LINE}
++endif
+
+ $(DUMP): $(ELF)
+ $${ECHO} " OD $$@"
+@@ -451,7 +456,11 @@ $(BIN): $(ELF)
+ @${ECHO_BLANK_LINE}
+
+ .PHONY: bl$(1)
++ifeq ($(DISABLE_BIN_GENERATION),1)
++bl$(1): $(ELF) $(DUMP)
++else
+ bl$(1): $(BIN) $(DUMP)
++endif
+
+ all: bl$(1)
+
+diff --git a/make_helpers/defaults.mk b/make_helpers/defaults.mk
+index be84f7791..dc797ed1f 100644
+--- a/make_helpers/defaults.mk
++++ b/make_helpers/defaults.mk
+@@ -62,6 +62,9 @@ DEBUG := 0
+ # Build platform
+ DEFAULT_PLAT := fvp
+
++# Disable the generation of the binary image (ELF only).
++DISABLE_BIN_GENERATION := 0
++
+ # Enable capability to disable authentication dynamically. Only meant for
+ # development platforms.
+ DYN_DISABLE_AUTH := 0
+--
+2.20.1
+
diff --git a/gnu/packages/patches/arm-trusted-firmware-rockchip-disable-binary.patch b/gnu/packages/patches/arm-trusted-firmware-rockchip-disable-binary.patch
new file mode 100644
index 0000000000..8819a7cfad
--- /dev/null
+++ b/gnu/packages/patches/arm-trusted-firmware-rockchip-disable-binary.patch
@@ -0,0 +1,73 @@
+From 42383dcf7db5debb9e183c7c5631974a4c2f91ea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christoph=20M=C3=BCllner?= <christophm30@gmail.com>
+Date: Wed, 24 Apr 2019 09:52:54 +0200
+Subject: [PATCH 2/2] rockchip: Disable binary generation for all SoCs.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+All supported Rockchip SoCs (RK3288, RK3328, RK3368 and RK3399)
+have non-continuous memory areas in the linker script with a huge
+gap between them. This results in extremely padded binary images
+with a size of about 4 GiB.
+
+E.g. on the RK3399 we have the following memory areas (and base addresses):
+RAM (0x1000), SRAM (0xFF8C0000), and PMUSRAM (0xFF3B0000).
+
+Consumers of the TF-A project (e.g. coreboot or U-Boot) therefore
+use the ELF image instead, which has a size of a few hundred kBs.
+
+In order to prevent the generation of a huge and useless file,
+this patch disables the binary generation for all affected Rockchip
+SoCs.
+
+Signed-off-by: Christoph Müllner <christophm30@gmail.com>
+Change-Id: I4ac65bdf1e598c3e1a59507897d183aee9a36916
+---
+ plat/rockchip/rk3328/platform.mk | 2 ++
+ plat/rockchip/rk3368/platform.mk | 2 ++
+ plat/rockchip/rk3399/platform.mk | 2 ++
+ 3 files changed, 6 insertions(+)
+
+diff --git a/plat/rockchip/rk3328/platform.mk b/plat/rockchip/rk3328/platform.mk
+index 18b1b9419..01c5af6a2 100644
+--- a/plat/rockchip/rk3328/platform.mk
++++ b/plat/rockchip/rk3328/platform.mk
+@@ -8,6 +8,8 @@ RK_PLAT := plat/rockchip
+ RK_PLAT_SOC := ${RK_PLAT}/${PLAT}
+ RK_PLAT_COMMON := ${RK_PLAT}/common
+
++DISABLE_BIN_GENERATION := 1
++
+ include lib/libfdt/libfdt.mk
+
+ PLAT_INCLUDES := -Idrivers/arm/gic/common/ \
+diff --git a/plat/rockchip/rk3368/platform.mk b/plat/rockchip/rk3368/platform.mk
+index d1315fc58..4ec36ce06 100644
+--- a/plat/rockchip/rk3368/platform.mk
++++ b/plat/rockchip/rk3368/platform.mk
+@@ -8,6 +8,8 @@ RK_PLAT := plat/rockchip
+ RK_PLAT_SOC := ${RK_PLAT}/${PLAT}
+ RK_PLAT_COMMON := ${RK_PLAT}/common
+
++DISABLE_BIN_GENERATION := 1
++
+ include lib/libfdt/libfdt.mk
+
+ PLAT_INCLUDES := -I${RK_PLAT_COMMON}/ \
+diff --git a/plat/rockchip/rk3399/platform.mk b/plat/rockchip/rk3399/platform.mk
+index 101359856..25c498da8 100644
+--- a/plat/rockchip/rk3399/platform.mk
++++ b/plat/rockchip/rk3399/platform.mk
+@@ -8,6 +8,8 @@ RK_PLAT := plat/rockchip
+ RK_PLAT_SOC := ${RK_PLAT}/${PLAT}
+ RK_PLAT_COMMON := ${RK_PLAT}/common
+
++DISABLE_BIN_GENERATION := 1
++
+ include lib/libfdt/libfdt.mk
+
+ PLAT_INCLUDES := -I${RK_PLAT_COMMON}/ \
+--
+2.20.1
+
diff --git a/gnu/packages/patches/dav1d-aarch64-symbol-alignment.patch b/gnu/packages/patches/dav1d-aarch64-symbol-alignment.patch
new file mode 100644
index 0000000000..a47adf9b05
--- /dev/null
+++ b/gnu/packages/patches/dav1d-aarch64-symbol-alignment.patch
@@ -0,0 +1,25 @@
+Ensure local debug symbols are aligned on AArch64.
+
+Taken from upstream:
+https://code.videolan.org/videolan/dav1d/commit/a6228f47f0eebcdfebb1753a786e3e1654b51ea4
+
+diff --git a/src/arm/64/ipred.S b/src/arm/64/ipred.S
+index 41b3c1c..9513212 100644
+--- a/src/arm/64/ipred.S
++++ b/src/arm/64/ipred.S
+@@ -2244,6 +2244,7 @@ L(ipred_cfl_ac_420_tbl):
+ .hword L(ipred_cfl_ac_420_tbl) - L(ipred_cfl_ac_420_w16)
+ .hword L(ipred_cfl_ac_420_tbl) - L(ipred_cfl_ac_420_w8)
+ .hword L(ipred_cfl_ac_420_tbl) - L(ipred_cfl_ac_420_w4)
++ .hword 0
+
+ L(ipred_cfl_ac_420_w16_tbl):
+ .hword L(ipred_cfl_ac_420_w16_tbl) - L(ipred_cfl_ac_420_w16_wpad0)
+@@ -2432,6 +2433,7 @@ L(ipred_cfl_ac_422_tbl):
+ .hword L(ipred_cfl_ac_422_tbl) - L(ipred_cfl_ac_422_w16)
+ .hword L(ipred_cfl_ac_422_tbl) - L(ipred_cfl_ac_422_w8)
+ .hword L(ipred_cfl_ac_422_tbl) - L(ipred_cfl_ac_422_w4)
++ .hword 0
+
+ L(ipred_cfl_ac_422_w16_tbl):
+ .hword L(ipred_cfl_ac_422_w16_tbl) - L(ipred_cfl_ac_422_w16_wpad0)
diff --git a/gnu/packages/patches/kodi-increase-test-timeout.patch b/gnu/packages/patches/kodi-increase-test-timeout.patch
new file mode 100644
index 0000000000..8fb149ff9d
--- /dev/null
+++ b/gnu/packages/patches/kodi-increase-test-timeout.patch
@@ -0,0 +1,18 @@
+Increase thread timeout to reduce flakiness.
+
+Taken from upstream:
+https://github.com/xbmc/xbmc/commit/574b0182d8b641fd24029f372ebdcccc897123e2
+
+diff --git a/xbmc/threads/test/TestEvent.cpp b/xbmc/threads/test/TestEvent.cpp
+index 42fb8c2fc609..40e644c0ed3c 100644
+--- a/xbmc/threads/test/TestEvent.cpp
++++ b/xbmc/threads/test/TestEvent.cpp
+@@ -484,7 +484,7 @@ TEST(TestEvent, GroupTimedWait)
+ EXPECT_TRUE(w3.result == NULL);
+
+ // this should end given the wait is for only 50 millis
+- EXPECT_TRUE(waitThread3.timed_join(MILLIS(100)));
++ EXPECT_TRUE(waitThread3.timed_join(MILLIS(200)));
+
+ EXPECT_TRUE(!w3.waiting);
+ EXPECT_TRUE(w3.result == NULL);
diff --git a/gnu/packages/patches/libmpeg2-arm-private-symbols.patch b/gnu/packages/patches/libmpeg2-arm-private-symbols.patch
new file mode 100644
index 0000000000..7f88d65e21
--- /dev/null
+++ b/gnu/packages/patches/libmpeg2-arm-private-symbols.patch
@@ -0,0 +1,48 @@
+Set visibility of global symbols used in ARM specific assembly file to
+internal.
+
+Taken from Debian:
+https://salsa.debian.org/multimedia-team/mpeg2dec/blob/master/debian/patches/60_arm-private-symbols.patch
+
+--- mpeg2dec.orig/libmpeg2/motion_comp_arm_s.S
++++ mpeg2dec/libmpeg2/motion_comp_arm_s.S
+@@ -23,7 +23,8 @@
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_o_16_arm
++ .global MC_put_o_16_arm
++ .internal MC_put_o_16_arm
+ MC_put_o_16_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -83,7 +84,8 @@ MC_put_o_16_arm_align_jt:
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_o_8_arm
++ .global MC_put_o_8_arm
++ .internal MC_put_o_8_arm
+ MC_put_o_8_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -152,7 +154,8 @@ MC_put_o_8_arm_align_jt:
+ .endm
+
+ .align
+- .global MC_put_x_16_arm
++ .global MC_put_x_16_arm
++ .internal MC_put_x_16_arm
+ MC_put_x_16_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -244,7 +247,8 @@ MC_put_x_16_arm_align_jt:
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_x_8_arm
++ .global MC_put_x_8_arm
++ .internal MC_put_x_8_arm
+ MC_put_x_8_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
diff --git a/gnu/packages/patches/libmpeg2-global-symbol-test.patch b/gnu/packages/patches/libmpeg2-global-symbol-test.patch
new file mode 100644
index 0000000000..f6eb3c6bd7
--- /dev/null
+++ b/gnu/packages/patches/libmpeg2-global-symbol-test.patch
@@ -0,0 +1,63 @@
+Rewrite the public symbol check to verify the shared libraries, to check for
+more things, and to avoid duplication; fixes make check on ARM
+
+Taken from Debian:
+https://salsa.debian.org/multimedia-team/mpeg2dec/blob/master/debian/patches/61_global-symbol-test.patch
+
+--- mpeg2dec.orig/test/globals
++++ mpeg2dec/test/globals
+@@ -1,4 +1,8 @@
+ #!/bin/sh
++# TODO
++# - fix checking of .a libs; problem is that "nm -g --defined-only" lists
++# internal symbols; this can be solved by using objdump, but it's probably
++# good enough to just run the tests on the shared lib
+
+ if test x"$srcdir" != x""; then
+ builddir="." # running from make check, but it does not define that
+@@ -14,22 +18,30 @@ builddir=`cd $builddir;pwd`
+
+ error=0
+
+-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\
+- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'`
+-
+-if test x"$bad_globals" != x""; then
+- echo BAD GLOBAL SYMBOLS:
+- for s in $bad_globals; do echo $s; done
++# check_bad_public_symbols <symbol prefix> <lib file> [<lib file>...]
++#
++# checks public symbols in shared libs:
++# - allow prefix_anything
++# - reject _prefixanything
++# - allow _anything
++# - reject anything else
++#
++# NB: skips missing files
++check_bad_public_symbols() {
++ symbols_prefix="$1"
++ shift
++ lib_files=`ls "$@" 2>/dev/null`
++ [ -z "$lib_files" ] && return
++ bad_globals=`nm -g --defined-only $lib_files |
++ awk '{if ($3) print $3}' |
++ sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"`
++ [ -z "$bad_globals" ] && return
+ error=1
+-fi
+-
+-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\
+- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'`
++ echo BAD GLOBAL SYMBOLS in $lib_files:
++ echo "$bad_globals"
++}
+
+-if test x"$bad_globals" != x""; then
+- echo BAD GLOBAL SYMBOLS:
+- for s in $bad_globals; do echo $s; done
+- error=1
+-fi
++check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so
++check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so
+
+ exit $error