Fairphone 2 support (#602)
* Started with stock kernel config (fairphone-perf_defconfig) * Enabled DEVTMPFS * Deactivated MSM_KGSL * Enabled the serial console * Enabled USB networking
This commit is contained in:
parent
3fc5efe33a
commit
5227409d06
12 changed files with 4423 additions and 0 deletions
3
device/device-fairphone-fp2/90-android-touch-dev.rules
Normal file
3
device/device-fairphone-fp2/90-android-touch-dev.rules
Normal file
|
@ -0,0 +1,3 @@
|
|||
# use 'weston-calibrator' to calibrate the touchscreen!
|
||||
SUBSYSTEM=="input", ATTRS{name}=="synaptics_dsx", \
|
||||
ENV{ID_INPUT}="1", ENV{ID_INPUT_TOUCHSCREEN}="1"
|
38
device/device-fairphone-fp2/APKBUILD
Normal file
38
device/device-fairphone-fp2/APKBUILD
Normal file
|
@ -0,0 +1,38 @@
|
|||
pkgname=device-fairphone-fp2
|
||||
pkgver=1
|
||||
pkgrel=1
|
||||
pkgdesc="Fairphone 2"
|
||||
url="https://github.com/postmarketOS"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="linux-fairphone-fp2 linux-firmware mkbootimg"
|
||||
makedepends=""
|
||||
install=""
|
||||
subpackages=""
|
||||
source="
|
||||
deviceinfo
|
||||
initfs-hook.sh
|
||||
90-android-touch-dev.rules
|
||||
bcmdhd.cal
|
||||
"
|
||||
options="!check"
|
||||
|
||||
build() {
|
||||
return 0
|
||||
}
|
||||
|
||||
package() {
|
||||
install -D -m644 "$srcdir"/deviceinfo \
|
||||
"$pkgdir"/etc/deviceinfo
|
||||
install -D -m644 "$srcdir"/initfs-hook.sh \
|
||||
"$pkgdir"/etc/postmarketos-mkinitfs/hooks/00-${pkgname}.sh
|
||||
install -D -m644 "$srcdir"/90-android-touch-dev.rules \
|
||||
"$pkgdir"/etc/udev/rules.d/90-android-touch-dev.rules
|
||||
install -D -m644 "$srcdir"/bcmdhd.cal \
|
||||
"$pkgdir"/etc/wifi/bcmdhd.cal
|
||||
}
|
||||
|
||||
sha512sums="2048492ab05df7b1414dc082414e2c82c451c76b037e436fbf8df4059e95d56306c3239aee2eb0f336c7f7dd59a6b0e9ffccd7b1b0757e6f6d8f9e9aa122ba91 deviceinfo
|
||||
8590967fa10388a890fdfafdb1070b9ab22dc89e06a3a8834806c772191e3b67de7b914b0d68e5ddf581cee715cb90f3f24abcb8762c415ff328c6da23e55d52 initfs-hook.sh
|
||||
4e6c0b87872f278de5603d821a1e9dab8363db285d1d7fd56e900b33e8533eecb79b1fb6359e58e112e69e714a4f2aee06157b1d6f8d3e26274cd29c93cd659b 90-android-touch-dev.rules
|
||||
32652ef366694f34dec31f316a38aca96700e3a5a3eac1f8d192e3c5de7b91e480b1c0fcd8e7c80a51692dc3737020ebbb2e5d3779436e82fb18822089c63055 bcmdhd.cal"
|
129
device/device-fairphone-fp2/bcmdhd.cal
Normal file
129
device/device-fairphone-fp2/bcmdhd.cal
Normal file
|
@ -0,0 +1,129 @@
|
|||
#Hammerhead for 4339 iPA/eLNA / AARDVARK_6_30_271
|
||||
#2G CCK Filter / 5G EVM SW Ctrl / Targer power / 130930
|
||||
#Boardflags3 / 5G cal / RSSI cal
|
||||
|
||||
sromrev=11
|
||||
boardrev=0x1106
|
||||
boardtype=0x06b6
|
||||
|
||||
boardflags=0x10081401
|
||||
boardflags2=0x00000000
|
||||
boardflags3=0x08001188
|
||||
|
||||
#boardnum=57410
|
||||
macaddr=00:90:4c:c5:12:38
|
||||
ccode=XV
|
||||
regrev=17
|
||||
antswitch=0
|
||||
pdgain2g=7
|
||||
pdgain5g=7
|
||||
tworangetssi2g=0
|
||||
tworangetssi5g=0
|
||||
muxenab=0x10
|
||||
#sd_gpout=0
|
||||
#sd_oobonly=1
|
||||
vendid=0x14e4
|
||||
devid=0x43ae
|
||||
manfid=0x2d0
|
||||
#prodid=0x052e
|
||||
nocrc=1
|
||||
otpimagesize=502
|
||||
xtalfreq=37400
|
||||
extpagain2g=2
|
||||
pdetrange2g=2
|
||||
extpagain5g=2
|
||||
pdetrange5g=2
|
||||
|
||||
rxgains2gelnagaina0=4
|
||||
rxgains2gtrisoa0=6
|
||||
rxgains2gtrelnabypa0=1
|
||||
rxgains5gelnagaina0=5
|
||||
rxgains5gtrisoa0=9
|
||||
|
||||
rxgains5gtrelnabypa0=1
|
||||
rxchain=1
|
||||
txchain=1
|
||||
aa2g=1
|
||||
aa5g=1
|
||||
|
||||
agbg0=0
|
||||
aga0=0
|
||||
|
||||
tssipos5g=0
|
||||
tssipos2g=0
|
||||
|
||||
|
||||
pa2gccka0=-116,7568,-852
|
||||
pa2ga0=-161,6269,-723
|
||||
|
||||
pa5ga0=0xFF40,0x15EA,0xFD51,0xFF33,0x160A,0xFD49,0xFF51,0x1706,0xFD3E,0xFF54,0x16E3,0xFD47
|
||||
pa5gbw40a0=0xFF45,0x1676,0xFD49,0xFF45,0x1789,0xFD21,0xFF38,0x16CE,0xFD28,0xFF25,0x15D1,0xFD36
|
||||
pa5gbw80a0=0xFF49,0x15C6,0xFD61,0xFF52,0x1736,0xFD39,0xFF5D,0x1735,0xFD4B,0xFF48,0x16B4,0xFD3B
|
||||
|
||||
pdoffset40ma0=0
|
||||
pdoffset80ma0=0
|
||||
pdoffsetcckma0=0
|
||||
|
||||
maxp2ga0=78
|
||||
|
||||
cckbw202gpo=0x0000
|
||||
cckbw20ul2gpo=0x0000
|
||||
cckbw20ul2gpo=0x0
|
||||
|
||||
ofdmlrbw202gpo=0x8864
|
||||
dot11agofdmhrbw202gpo=0x8866
|
||||
|
||||
mcsbw202gpo=0xaaaa8884
|
||||
mcsbw402gpo=0xaaaa8884
|
||||
|
||||
maxp5ga0=74,74,74,78
|
||||
|
||||
tssifloor2g=500
|
||||
|
||||
#low
|
||||
mcsbw205glpo=0xaa866662
|
||||
mcsbw405glpo=0xaa888888
|
||||
mcsbw805glpo=0xaa888888
|
||||
mcsbw1605glpo=0xaa888888
|
||||
#mid
|
||||
mcsbw205gmpo=0xaa866662
|
||||
mcsbw405gmpo=0xaa888888
|
||||
mcsbw805gmpo=0xaa888888
|
||||
mcsbw1605gmpo=0xaa888888
|
||||
#high
|
||||
mcsbw205ghpo=0xcca88882
|
||||
mcsbw405ghpo=0xccaaaaaa
|
||||
mcsbw805ghpo=0xccaaaaaa
|
||||
mcsbw1605ghpo=0xccaaaaaa
|
||||
|
||||
mcslr5glpo=0x0000
|
||||
mcslr5gmpo=0x0000
|
||||
mcslr5ghpo=0x0000
|
||||
|
||||
sb20in40hrrpo=0x0
|
||||
sb20in80and160hr5glpo=0x0
|
||||
sb40and80hr5glpo=0x0
|
||||
sb20in80and160hr5gmpo=0x0
|
||||
sb40and80hr5gmpo=0x0
|
||||
sb20in80and160hr5ghpo=0x0
|
||||
sb40and80hr5ghpo=0x0
|
||||
sb20in40lrpo=0x0
|
||||
sb20in80and160lr5glpo=0x0
|
||||
sb40and80lr5glpo=0x0
|
||||
sb20in80and160lr5gmpo=0x0
|
||||
sb40and80lr5gmpo=0x0
|
||||
sb20in80and160lr5ghpo=0x0
|
||||
sb40and80lr5ghpo=0x0
|
||||
dot11agduphrpo=0x0
|
||||
dot11agduplrpo=0x0
|
||||
phycal_tempdelta=25
|
||||
cckdigfilttype=1
|
||||
|
||||
swctrlmap_5g=0x00080008,0x00040000,0x00000008,0x800301,0x00c
|
||||
swctrlmap_2g=0x00000000,0x00030001,0x00010000,0x800301,0x0ff
|
||||
swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000
|
||||
swctrlmapext_2g=0x00000001,0x00000000,0x00000000,0x000000,0x001
|
||||
|
||||
|
||||
rssicorrnorm_c0=2,2
|
||||
rssicorrnorm5g_c0=-1,0,0,-2,0,0,0,1,1,1,2,2
|
36
device/device-fairphone-fp2/deviceinfo
Normal file
36
device/device-fairphone-fp2/deviceinfo
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Fairphone 2"
|
||||
deviceinfo_manufacturer="Fairphone"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_nonfree="????"
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_external_disk="true"
|
||||
deviceinfo_external_disk_install="true"
|
||||
deviceinfo_flash_methods="fastboot"
|
||||
deviceinfo_flash_sparse="true"
|
||||
deviceinfo_arch="armhf"
|
||||
|
||||
# Splash screen
|
||||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="1920"
|
||||
|
||||
# Fastboot related
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
|
||||
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 PMOS_NO_OUTPUT_REDIRECT"
|
||||
deviceinfo_flash_offset_kernel="0x00000000"
|
||||
deviceinfo_flash_offset_ramdisk="0x02000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x01E00000"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
|
||||
# Weston red screen workaround (see issue #54)
|
||||
deviceinfo_weston_pixman_type="2"
|
||||
deviceinfo_weston_core_modules="xwayland.so"
|
4
device/device-fairphone-fp2/initfs-hook.sh
Normal file
4
device/device-fairphone-fp2/initfs-hook.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
# set framebuffer resolution
|
||||
cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode
|
|
@ -0,0 +1,46 @@
|
|||
From bd447b61c49fc26f0299587db3e6d66da49dc529 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] 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.14.1
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
From bde304575f3ecaa9570a9329196dffaadf3adafa 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] 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 aa697ece405b..42df9e3beae8 100644
|
||||
--- a/drivers/input/mouse/sentelic.h
|
||||
+++ b/drivers/input/mouse/sentelic.h
|
||||
@@ -123,11 +123,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.14.1
|
||||
|
49
device/linux-fairphone-fp2/00_fix_return_address.patch
Normal file
49
device/linux-fairphone-fp2/00_fix_return_address.patch
Normal file
|
@ -0,0 +1,49 @@
|
|||
From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
|
||||
From: Behan Webster <behanw@converseincode.com>
|
||||
Date: Wed, 24 Sep 2014 01:06:46 +0100
|
||||
Subject: [PATCH] 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 39eb16b0066f2..bfe2a2f5a644e 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 fafedd86885dd..f6aa84d5b93c9 100644
|
||||
--- a/arch/arm/kernel/return_address.c
|
||||
+++ b/arch/arm/kernel/return_address.c
|
||||
@@ -63,11 +63,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);
|
133
device/linux-fairphone-fp2/APKBUILD
Normal file
133
device/linux-fairphone-fp2/APKBUILD
Normal file
|
@ -0,0 +1,133 @@
|
|||
# APKBUILD based on linux-vanilla aport. Changes:
|
||||
# - disabled module installation
|
||||
# - add !check !tracedeps
|
||||
# - package: just install zimage and kernel.release, because the kernel config
|
||||
# does not generate modules or dtb files
|
||||
# - do not create -dev subpackage (makes no sense without module support)
|
||||
#
|
||||
# Kernel config based on: arch/arm/configs/fairphone-perf_defconfig
|
||||
# Changes:
|
||||
# - enable devtmpfs (needed for udev -> touch support in weston)
|
||||
|
||||
_vendor=fairphone
|
||||
_flavor=fairphone-fp2
|
||||
_hash="8c73c363d1cd11624ddda9a1ef08b9dc7a5569e4"
|
||||
_config="config-${_flavor}.armhf"
|
||||
|
||||
pkgname=linux-${_flavor}
|
||||
pkgver=3.4.0
|
||||
case $pkgver in
|
||||
*.*.*) _kernver=${pkgver%.*};;
|
||||
*.*) _kernver=$pkgver;;
|
||||
esac
|
||||
pkgrel=1
|
||||
arch="armhf"
|
||||
pkgdesc="LineageOS kernel for Fairphone 2"
|
||||
url="https://github.com/LineageOS/android_kernel_fairphone_msm8974"
|
||||
depends="postmarketos-mkinitfs"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev python2 dtbtool"
|
||||
options="!strip !check !tracedeps"
|
||||
install=
|
||||
source="
|
||||
https://github.com/LineageOS/android_kernel_fairphone_msm8974/archive/${_hash}.zip
|
||||
${_config}
|
||||
compiler-gcc6.h
|
||||
00_fix_return_address.patch
|
||||
00_Input-lifebook-use-static-inline-instead-of-inline-i.patch
|
||||
00_Input-sentelic-use-static-inline-instead-of-inline.patch
|
||||
gpu-msm-fix-gcc5-compile.patch
|
||||
"
|
||||
|
||||
subpackages=""
|
||||
license="GPL2"
|
||||
|
||||
_abi_release=${pkgver}
|
||||
_carch="arm"
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
ksrcdir="$srcdir/android_kernel_fairphone_msm8974-${_hash}"
|
||||
|
||||
prepare() {
|
||||
local _patch_failed=
|
||||
cd "$ksrcdir"
|
||||
|
||||
# first apply patches in specified order
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch)
|
||||
msg "Applying $i..."
|
||||
if ! patch -s -p1 -N -i "$srcdir"/$i; then
|
||||
echo $i >>failed
|
||||
_patch_failed=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if ! [ -z "$_patch_failed" ]; then
|
||||
error "The following patches failed:"
|
||||
cat failed
|
||||
return 1
|
||||
fi
|
||||
|
||||
# gcc6 support
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
|
||||
|
||||
mkdir -p "$srcdir"/build
|
||||
cp "$srcdir"/$_config "$srcdir"/build/.config || return 1
|
||||
echo "--[ silentoldconfig ]--"
|
||||
yes "" | make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||||
oldconfig
|
||||
}
|
||||
|
||||
|
||||
|
||||
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
|
||||
menuconfig() {
|
||||
cd "$srcdir"/build || return 1
|
||||
echo "--[ menuconfig ]--"
|
||||
make ARCH="$_carch" menuconfig
|
||||
cp .config "$startdir"/$_config
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/build
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" CONFIG_NO_ERROR_ON_MISMATCH=y \
|
||||
|| return 1
|
||||
echo "--[ Build modules ]--"
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" CONFIG_NO_ERROR_ON_MISMATCH=y \
|
||||
modules || return 1
|
||||
|
||||
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/"
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 "$srcdir/build/arch/arm/boot/dt.img" \
|
||||
"$pkgdir/boot/dt.img"
|
||||
|
||||
install -Dm644 "$srcdir/build/arch/arm/boot/zImage" \
|
||||
"$pkgdir/boot/vmlinuz-$_flavor"
|
||||
|
||||
install -D "$srcdir/build/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
cd "$srcdir"/build
|
||||
unset LDFLAGS
|
||||
echo "--[ Installing modules ]--"
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" CONFIG_NO_ERROR_ON_MISMATCH=y \
|
||||
INSTALL_MOD_PATH="$pkgdir" modules_install \
|
||||
|| return 1
|
||||
}
|
||||
|
||||
sha512sums="acddc069c3e8aa5b58c82eddc6e335946695e618fe5756e81a730cbcfbba0fd256b6e46024c46a66f8551d67608edd6d55b5a7cfa8ea98b064ca1ddaa1d7238d 8c73c363d1cd11624ddda9a1ef08b9dc7a5569e4.zip
|
||||
f54d39a033b0841f5c4f17352eeae37839ac3d271914ef1ce8553f96144ab9169f2a14eff7537aeb49ce39dfd975cebd51193f419dbb74244a6bbdfa8b5cd301 config-fairphone-fp2.armhf
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00_fix_return_address.patch
|
||||
5c49f6ff6773a7dc3067d2b1359648fe7a9f758b6c068d6fa69d9aaf24a291ba8022c960317d926aabc11d020a71b20c4e81a6fcf9b21ef66d9b6d065bae23e9 00_Input-lifebook-use-static-inline-instead-of-inline-i.patch
|
||||
2d77d90b501aa8afbf81629e73fc0a2055b373942975f58277e43f398d0835b3dbbff4a1118137ec82873ba90a254fea87c1d73ba7708578f1779bd0b4c6ff2d 00_Input-sentelic-use-static-inline-instead-of-inline.patch
|
||||
7be03a9e78b7ac330a54b1f00509caa0621a95c0c55901878ad757f9dd69cc05ba2c8b5ea987063ae1224f92c4d090d515fa5d369e7755181a4871b0d0f82881 gpu-msm-fix-gcc5-compile.patch"
|
69
device/linux-fairphone-fp2/compiler-gcc6.h
Normal file
69
device/linux-fairphone-fp2/compiler-gcc6.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
// 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 */
|
||||
|
3847
device/linux-fairphone-fp2/config-fairphone-fp2.armhf
Normal file
3847
device/linux-fairphone-fp2/config-fairphone-fp2.armhf
Normal file
File diff suppressed because it is too large
Load diff
33
device/linux-fairphone-fp2/gpu-msm-fix-gcc5-compile.patch
Normal file
33
device/linux-fairphone-fp2/gpu-msm-fix-gcc5-compile.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
source:
|
||||
https://github.com/ShinySide/HispAsian_Lollipop_G6/commit/b7756b6fc4bb728722b14d2dfdbaf1dc843812e9
|
||||
|
||||
* 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>
|
||||
|
||||
--- a/drivers/gpu/msm/kgsl_iommu.c
|
||||
+++ b/drivers/gpu/msm/kgsl_iommu.c
|
||||
@@ -1010,7 +1010,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;
|
||||
@@ -1080,7 +1080,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;
|
Loading…
Reference in a new issue