fairphone-fp2: switch to armv7 (!273)

[ci:skip-build]: already built successfully
This commit is contained in:
Luca Weiss 2019-02-13 19:54:14 +01:00 committed by Oliver Smith
parent 3a9ab3c7e6
commit 7a604328ac
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
13 changed files with 20 additions and 269 deletions

View file

@ -5,7 +5,7 @@ pkgver=2
pkgrel=3
url="https://postmarketos.org"
license="MIT"
arch="armhf"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-fairphone-fp2 mkbootimg mesa-dri-swrast"
makedepends="devicepkg-dev"
@ -34,6 +34,6 @@ alsa() {
install -Dm644 "$srcdir"/hifi "$subpkgdir"/usr/share/alsa/ucm/FP2/
}
sha512sums="ae1b06f495affe25969648b3d10ec1884d7b90935ca2b2c164df023a994beaa530ef937698608d604ba7d9f05bb507db8d17dff4e7190756157c44dca1d48b3a deviceinfo
sha512sums="c20d8601def1e45df617f87159e336b8a9a8189bbc73b8112291a60ff6246d432549af9d1fb838252665b8be92aed97fc2afcba1736b59565458e50ae097f5fb deviceinfo
55360b1ba4ddadea341c9edb13c32ba5f19aabf75ab28602f30cfb79b9df8834f115ef979c70569f23ec1293b1fcd408baf320d87803293ce7106bdc73a26c9f FP2.conf
b834461c6866bb0c473dd089dd5da641dd42a00f610aad6503117aa50fe6e200db9ad0a264bb609f12350d59faee1f772907bacd75439f702ea7d52f6f85e2b1 hifi"

View file

@ -8,7 +8,7 @@ deviceinfo_codename="fairphone-fp2"
deviceinfo_date=""
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armhf"
deviceinfo_arch="armv7"
# Device related
deviceinfo_keyboard="false"

View file

@ -1,52 +0,0 @@
From e281a7f1481d1f900ca32844f70ca3bb56351781 Mon Sep 17 00:00:00 2001
From: Behan Webster <behanw@converseincode.com>
Date: Wed, 24 Sep 2014 01:06:46 +0100
Subject: [PATCH 1/6] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). In this case using static inline
and removing the NULL version of return_address in return_address.c does
the right thing.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/include/asm/ftrace.h | 2 +-
arch/arm/kernel/return_address.c | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index f89515adac60..2bb8cac28b9e 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -45,7 +45,7 @@ void *return_address(unsigned int);
#else
-extern inline void *return_address(unsigned int level)
+static inline void *return_address(unsigned int level)
{
return NULL;
}
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index 8085417555dd..57827a61f13c 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -62,11 +62,6 @@ void *return_address(unsigned int level)
#warning "TODO: return_address should use unwind tables"
#endif
-void *return_address(unsigned int level)
-{
- return NULL;
-}
-
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
EXPORT_SYMBOL_GPL(return_address);
--
2.18.0

View file

@ -1,43 +0,0 @@
From 33f9e6039c4f1780b9b457fb70b2817dea56fa35 Mon Sep 17 00:00:00 2001
From: Chet Kener <Cl3Kener@gmail.com>
Date: Tue, 21 Oct 2014 18:41:36 -0400
Subject: [PATCH 2/6] gpu: msm: Fix compilation
* These need to be static to avoid these errors:
drivers/built-in.o: In function `.LANCHOR1':
msm_iommu_sec.c:(.data+0x9298): undefined reference to `kgsl_iommu_sync_lock'
msm_iommu_sec.c:(.data+0x929c): undefined reference to `kgsl_iommu_sync_unlock'
Makefile:877: recipe for target '.tmp_vmlinux1' failed
make: *** [.tmp_vmlinux1] Error 1
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
---
drivers/gpu/msm/kgsl_iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c
index f755b226b078..deb568e3446f 100644
--- a/drivers/gpu/msm/kgsl_iommu.c
+++ b/drivers/gpu/msm/kgsl_iommu.c
@@ -997,7 +997,7 @@ static int kgsl_iommu_init_sync_lock(struct kgsl_mmu *mmu)
*
* Return - int - number of commands.
*/
-inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
+static inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
unsigned int *cmds)
{
struct kgsl_device *device = mmu->device;
@@ -1067,7 +1067,7 @@ inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
*
* Return - int - number of commands.
*/
-inline unsigned int kgsl_iommu_sync_unlock(struct kgsl_mmu *mmu,
+static inline unsigned int kgsl_iommu_sync_unlock(struct kgsl_mmu *mmu,
unsigned int *cmds)
{
struct kgsl_device *device = mmu->device;
--
2.18.0

View file

@ -1,46 +0,0 @@
From 1bbea76e31078276fae96dd09eddc8a8aa8d027e Mon Sep 17 00:00:00 2001
From: Chen Gang <gang.chen.5i5j@gmail.com>
Date: Sun, 9 Nov 2014 13:31:11 -0800
Subject: [PATCH 5/6] Input: lifebook - use "static inline" instead of "inline"
in lifebook.h
For functions defined in header files we should use static inline rather
than inline, which breaks under the latest upstream gcc (which is really
gcc issue, but static inline is better suited regardless).
The related error (with allmodconfig under tile):
MODPOST 4002 modules
ERROR: "lifebook_detect" [drivers/input/mouse/psmouse.ko] undefined!
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/mouse/lifebook.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h
index 4c4326c6f504..0baf02a70a99 100644
--- a/drivers/input/mouse/lifebook.h
+++ b/drivers/input/mouse/lifebook.h
@@ -16,14 +16,14 @@ void lifebook_module_init(void);
int lifebook_detect(struct psmouse *psmouse, bool set_properties);
int lifebook_init(struct psmouse *psmouse);
#else
-inline void lifebook_module_init(void)
+static inline void lifebook_module_init(void)
{
}
-inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
+static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
{
return -ENOSYS;
}
-inline int lifebook_init(struct psmouse *psmouse)
+static inline int lifebook_init(struct psmouse *psmouse)
{
return -ENOSYS;
}
--
2.18.0

View file

@ -1,36 +0,0 @@
From 8aced5520b9c1ec1f23e004aae59a2a88ad74764 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 22 May 2015 09:56:29 -0700
Subject: [PATCH 6/6] Input: sentelic - use "static inline" instead of "inline"
gcc-5 defaults to gnu11 which used c99 inline semantics in c99 'inline' is
not externally visible unlike gnu89, therefore we use 'static inline' which
has same semantics between gnu89 and c99
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/mouse/sentelic.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h
index 334de19e5ddb..a821628244b9 100644
--- a/drivers/input/mouse/sentelic.h
+++ b/drivers/input/mouse/sentelic.h
@@ -115,11 +115,11 @@ struct fsp_data {
extern int fsp_detect(struct psmouse *psmouse, bool set_properties);
extern int fsp_init(struct psmouse *psmouse);
#else
-inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
+static inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
{
return -ENOSYS;
}
-inline int fsp_init(struct psmouse *psmouse)
+static inline int fsp_init(struct psmouse *psmouse)
{
return -ENOSYS;
}
--
2.18.0

View file

@ -1,20 +1,19 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/lineageos_FP2_defconfig
pkgname="linux-fairphone-fp2"
pkgver=3.4.0
pkgrel=9
pkgdesc="Fairphone 2 kernel fork"
arch="armhf"
arch="armv7"
_carch="arm"
_flavor="fairphone-fp2"
url="https://kernel.org"
license="GPL2"
license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool xz gcc6"
# Compiler: this kernel was only tested with GCC6. Feel free to make a merge
# request if you find out that it is booting working with newer GCCs as
# well. See <https://postmarketos.org/vendorkernel> for instructions.
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
@ -28,13 +27,11 @@ _config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
$_config
compiler-gcc6.h
0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
0002-gpu-msm-Fix-compilation.patch
gcc7-give-up-on-ilog2-const-optimizations.patch
gcc8-fix-put-user.patch
kernel-use-the-gnu89-standard-explicitly.patch
0003-Fix-includes.patch
0004-msm-fix-trace.patch
0005-Input-lifebook-use-static-inline-instead-of-inline-i.patch
0006-Input-sentelic-use-static-inline-instead-of-inline.patch
"
builddir="$srcdir/${_repository}-${_commit}"
@ -77,11 +74,9 @@ package() {
}
sha512sums="6b440c5d087b790894606d4736af815204d9e6f682b7c1ba78f5852fa7aecd74cb276f4953d270f14c96d5418f4e2a83c5179c54d50e2e5afc9084f83ab54200 linux-fairphone-fp2-284400aea4b9f8a3c97a34408f48d0971897ae02.tar.gz
cb5f1d366daff93b2d4cd8785b095f7113a606ef82736b5d1486f53eeb69f3f684eabf6e4a83d96aaf7b129a41d0e2e9c6bbd6b8c6206bce52e0ba2172414009 config-fairphone-fp2.armhf
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
19d21a15d5470ba0a77ddfac2ea662f6424bca4af66d310019ba3c3d7d976cae6b7f88422d64e564c47a7347a7338459f61f3ac94d13d7b981defc206f99a120 0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
6f806c8e2a5b6e7e503c2b98ff55cd90f4e77cb7d82b9a3e3f85f4d718265be06f03a81ab9c0d88a95508b4192713c98f3959b18c6119edf209722c3002d19fe 0002-gpu-msm-Fix-compilation.patch
dafe4a3f2b6e8415c6114df20acc9619791fe80b3f2e772e4da685a80b8fe856f77f8bb038c992559f092e5ce38145c3b021db6d00c6f267ce3d85020225bde9 config-fairphone-fp2.armv7
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch
403d4999e98ddf73e083076c130a7c9de265096b7abeaabe1ba4305403202e651289a538d104cb37adf783fcecea009f3ed2b722d8640d8d3f12e6cbb8ebe97d 0003-Fix-includes.patch
432099f87fbcd66fa801ecaedb06715754198761c709cbb40b0dc8ffef14a6d6d5f0df27823229b731b18438c705c60c0ce44728b192d8e0f20c285bf761b7f3 0004-msm-fix-trace.patch
fdc336206dedc11f560849738903f18ffa28ea5387b8764cae37c981a5e1bc610d32f041c0cde4ff246fb24cb79cb3f5d7820a40ea33aac75b9660897299b03f 0005-Input-lifebook-use-static-inline-instead-of-inline-i.patch
ea45a9faa3320410b76409b373dc4a2d41ef2f815c48cdfe5ca8072df402ecab87bbd2021f116a4d93827bc62f59bce4c5defc10758134a1e054a66822371a77 0006-Input-sentelic-use-static-inline-instead-of-inline.patch"
432099f87fbcd66fa801ecaedb06715754198761c709cbb40b0dc8ffef14a6d6d5f0df27823229b731b18438c705c60c0ce44728b192d8e0f20c285bf761b7f3 0004-msm-fix-trace.patch"

View file

@ -1,69 +0,0 @@
// SOURCE:
// https://github.com/NextThingCo/CHIP-u-boot/issues/10#issuecomment-287515505
#ifndef __LINUX_COMPILER_H
#error "Please don't include <linux/compiler-gcc6.h> directly, include <linux/compiler.h> instead."
#endif
#define __used __attribute__((__used__))
#define __must_check __attribute__((warn_unused_result))
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
/* Mark functions as cold. gcc will assume any path leading to a call
to them will be unlikely. This means a lot of manual unlikely()s
are unnecessary now for any paths leading to the usual suspects
like BUG(), printk(), panic() etc. [but let's keep them for now for
older compilers]
Early snapshots of gcc 4.3 don't support this and we can't detect this
in the preprocessor, but we can live with this because they're unreleased.
Maketime probing would be overkill here.
gcc also has a __attribute__((__hot__)) to move hot functions into
a special section, but I don't see any sense in this right now in
the kernel context */
#define __cold __attribute__((__cold__))
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
#ifndef __CHECKER__
# define __compiletime_warning(message) __attribute__((warning(message)))
# define __compiletime_error(message) __attribute__((error(message)))
#endif /* __CHECKER__ */
/*
* Mark a position in code as unreachable. This can be used to
* suppress control flow warnings after asm blocks that transfer
* control elsewhere.
*
* Early snapshots of gcc 4.5 don't support this and we can't detect
* this in the preprocessor, but we can live with this because they're
* unreleased. Really, we need to have autoconf for the kernel.
*/
#define unreachable() __builtin_unreachable()
/* Mark a function definition as prohibited from being cloned. */
#define __noclone __attribute__((__noclone__))
/*
* Tell the optimizer that something else uses this function or variable.
*/
#define __visible __attribute__((externally_visible))
/*
* GCC 'asm goto' miscompiles certain code sequences:
*
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
*
* Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
*
* (asm goto is automatically volatile - the naming reflects this.)
*/
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
#define __HAVE_BUILTIN_BSWAP32__
#define __HAVE_BUILTIN_BSWAP64__
#define __HAVE_BUILTIN_BSWAP16__
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */

View file

@ -3745,7 +3745,6 @@ CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_ABLK_HELPER=y
# CONFIG_CRYPTO_USER is not set
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
CONFIG_CRYPTO_GF128MUL=y
@ -3807,7 +3806,7 @@ CONFIG_CRYPTO_SHA512_ARM_NEON=y
#
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_ARM=y
CONFIG_CRYPTO_AES_ARM_BS=y
# CONFIG_CRYPTO_AES_ARM_BS is not set
# CONFIG_CRYPTO_ANUBIS is not set
CONFIG_CRYPTO_ARC4=y
# CONFIG_CRYPTO_BLOWFISH is not set

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc8-fix-put-user.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch

View file

@ -4,7 +4,7 @@ pkgrel=1
pkgdesc="Firmware for Fairphone 2"
subpackages="$pkgname-wcnss $pkgname-adsp $pkgname-modem"
url="https://github.com/FairBlobs/firmware"
arch="armhf"
arch="armv7"
license="proprietary"
options="!check !strip !archcheck"