Files
operating-system/buildroot/package/libopenh264/0002-fix-mips-build.patch
Stefan Agner a0871be6c0 Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot

* Update buildroot to 2020.11-rc1

Signed-off-by: Stefan Agner <stefan@agner.ch>

* Don't rely on sfdisk --list-free output

The --list-free (-F) argument does not allow machine readable mode. And
it seems that the output format changes over time (different spacing,
using size postfixes instead of raw blocks).

Use sfdisk json output and calculate free partition space ourselfs. This
works for 2.35 and 2.36 and is more robust since we rely on output which
is meant for scripts to parse.

* Migrate defconfigs for Buildroot 2020.11-rc1

In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE).

* Rebase/remove systemd patches for systemd 246

* Drop apparmor/libapparmor from buildroot-external

* hassos-persists: use /run as directory for lockfiles

The U-Boot tools use /var/lock by default which is not created any more
by systemd by default (it is under tmpfiles legacy.conf, which we no
longer install).

* Disable systemd-update-done.service

The service is not suited for pure read-only systems. In particular the
service needs to be able to write a file in /etc and /var. Remove the
service. Note: This is a static service and cannot be removed using
systemd-preset.

* Disable apparmor.service for now

The service loads all default profiles. Some might actually cause
problems. E.g. the profile for ping seems not to match our setup for
/etc/resolv.conf:
[85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
2020-11-13 18:25:44 +01:00

74 lines
3.5 KiB
Diff

From 9d5981eecde2133b9d6099eb99f96b1c29c3e520 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Mon, 13 Apr 2020 12:03:01 +0200
Subject: [PATCH] fix mips build
In total three PR were sent upstream to fix mips builds:
https://github.com/cisco/openh264/pull/3185
https://github.com/cisco/openh264/pull/3217
https://github.com/cisco/openh264/pull/3225
Buildroot used the first version
https://git.buildroot.net/buildroot/commit/package/libopenh264?id=e8d0df569e1844f7ba28918a53ee38027b325b8f
downloaded from https://github.com/cisco/openh264/pull/3185
During discussion the gcc option '-march=loongson3a' was changed to
'-Wa,-mloongson-mmi,-mloongson-ext':
https://github.com/cisco/openh264/pull/3185#discussion_r337818960
This causes build errors with gcc version 8.3.0 (Buildroot 2020.02)
tmp/cctgEQaw.s:662: Error: opcode not supported on this processor: loongson3a (mips64r2) `bc .L22'
/tmp/cctgEQaw.s:1679: Error: opcode not supported on this processor: loongson3a (mips64r2) `bc .L27'
/tmp/cctgEQaw.s:2218: Error: opcode not supported on this processor: loongson3a (mips64r2) `jrc $31'
This patch partly reverts the change to fix mips build.
$ /home/bernd/buildroot/br5/output/host/bin/mips64el-linux-gcc -v
Using built-in specs.
COLLECT_GCC=/home/bernd/buildroot/br5/output/host/opt/ext-toolchain/bin/mips64el-linux-gcc.br_real
COLLECT_LTO_WRAPPER=/home/bernd/buildroot/br5/output/host/opt/ext-toolchain/bin/../libexec/gcc/mips64el-buildroot-linux-gnu/8.3.0/lto-wrapper
Target: mips64el-buildroot-linux-gnu
Configured with: ./configure --prefix=/opt/br-mips64r6-n64-el-hf-2020.02 --sysconfdir=/opt/br-mips64r6-n64-el-hf-2020.02/etc --enable-static --target=mips64el-buildroot-linux-gnu --with-sysroot=/opt/br-mips64r6-n64-el-hf-2020.02/mips64el-buildroot-linux-gnu/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --with-gmp=/opt/br-mips64r6-n64-el-hf-2020.02 --with-mpc=/opt/br-mips64r6-n64-el-hf-2020.02 --with-mpfr=/opt/br-mips64r6-n64-el-hf-2020.02 --with-pkgversion='Buildroot 2020.02' --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath --enable-tls --enable-threads --without-isl --without-cloog --with-arch=mips64r6 --with-abi=64 --with-nan=2008 --enable-languages=c,c++ --with-build-time-tools=/opt/br-mips64r6-n64-el-hf-2020.02/mips64el-buildroot-linux-gnu/bin --enable-shared --disable-libgomp
Thread model: posix
gcc version 8.3.0 (Buildroot 2020.02)
Patch sent upstream: https://github.com/cisco/openh264/pull/3267
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
build/arch.mk | 2 +-
build/mips-simd-check.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/build/arch.mk b/build/arch.mk
index 1bf318ab..c6570ed4 100644
--- a/build/arch.mk
+++ b/build/arch.mk
@@ -41,7 +41,7 @@ ASMFLAGS += -I$(SRC_PATH)codec/common/mips/
ifeq ($(ENABLE_MMI), Yes)
ENABLE_MMI = $(shell $(SRC_PATH)build/mips-simd-check.sh $(CC) mmi)
ifeq ($(ENABLE_MMI), Yes)
-CFLAGS += -DHAVE_MMI -Wa,-mloongson-mmi,-mloongson-ext
+CFLAGS += -DHAVE_MMI -march=loongson3a
endif
endif
#msa
diff --git a/build/mips-simd-check.sh b/build/mips-simd-check.sh
index 5efffbef..d0d72f9e 100755
--- a/build/mips-simd-check.sh
+++ b/build/mips-simd-check.sh
@@ -15,7 +15,7 @@ TMPO=$(mktemp tmp.XXXXXX.o)
if [ $2 == "mmi" ]
then
echo "void main(void){ __asm__ volatile(\"punpcklhw \$f0, \$f0, \$f0\"); }" > $TMPC
- $1 -Wa,-mloongson-mmi $TMPC -o $TMPO &> /dev/null
+ $1 -march=loongson3a $TMPC -o $TMPO &> /dev/null
if test -s $TMPO
then
echo "Yes"
--
2.25.0