Add asus-grouper (#180)

This commit is contained in:
Anton Lazarev 2017-07-20 12:05:33 -04:00 committed by Oliver Smith
parent faaec71289
commit d1da069c02
8 changed files with 3656 additions and 0 deletions

View File

@ -0,0 +1,3 @@
SUBSYSTEM=="input", ATTRS{name}=="elan-touchscreen", \
ENV{ID_INPUT}="1", ENV{ID_INPUT_TOUCHSCREEN}="1" \
ENV{WL_CALIBRATION}="0.982113 -0.006129 1.983124 -0.002560 1.000800 -6.012451"

View File

@ -0,0 +1,30 @@
pkgname=device-asus-grouper
pkgver=1
pkgrel=2
pkgdesc="Asus Nexus 7 2012 Wifi"
url="https://github.com/postmarketOS"
arch="noarch"
license="MIT"
depends="linux-asus-grouper mkbootimg"
makedepends=""
install=""
subpackages=""
source="deviceinfo initfs-hook.sh 90-android-touch-dev.rules"
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
}
sha512sums="dcd9e938578d34f9fba7a18bbc7cc6a8707bdf0f08caa82d70a4ff0421e4035a99892d329ea7eed7cd048eb9fa4dc000bbb6c61d551ae29f14f7008a8dfc01e1 deviceinfo
8590967fa10388a890fdfafdb1070b9ab22dc89e06a3a8834806c772191e3b67de7b914b0d68e5ddf581cee715cb90f3f24abcb8762c415ff328c6da23e55d52 initfs-hook.sh
05f938784e8f30cdbe9923a5f3e34ce7c539060d3a621741206bc5ed02afd7cbf480b02fbe48a70968e7182f885ab9bfe57c4d1e7c6eefca54a6f7188d2849f2 90-android-touch-dev.rules"

View File

@ -0,0 +1,24 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Nexus 7 2012 Wifi"
deviceinfo_manufacturer="Asus"
deviceinfo_date=""
deviceinfo_keyboard="false"
deviceinfo_nonfree="????"
deviceinfo_dtb=""
deviceinfo_modules=""
deviceinfo_modules_initfs=""
deviceinfo_external_disk="false"
deviceinfo_external_disk_install="false"
deviceinfo_flash_methods="fastboot"
deviceinfo_arch="armhf"
# Fastboot related
deviceinfo_generate_bootimg="true"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"

View File

@ -0,0 +1,4 @@
#!/bin/sh
# set framebuffer resolution
cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode

View File

@ -0,0 +1,108 @@
# 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/lineageos_grouper_defconfig
# Changes:
# - enable devtmpfs (needed for udev -> touch support in weston)
_vendor=asus
_flavor=asus-grouper
_hash="953e26f2709dfe0c185c3c99c50b0c9d56d473a4"
_config="config-${_flavor}.armhf"
pkgname=linux-${_flavor}
pkgver=3.4.0
case $pkgver in
*.*.*) _kernver=${pkgver%.*};;
*.*) _kernver=$pkgver;;
esac
pkgrel=3
arch="armhf"
pkgdesc="Nexus 7 (2012) kernel from LineageOS"
url="https://github.com/LineageOS/android_kernel_asus_grouper"
depends="postmarketos-mkinitfs"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
options="!strip !check !tracedeps"
install=
source="
$pkgname-$_hash.zip::https://github.com/LineageOS/android_kernel_asus_grouper/archive/${_hash}.zip
$_config
compiler-gcc6.h
duplicate-return-address-definition.patch
"
subpackages=""
license="GPL2"
_abi_release=${pkgver}
_carch="arm"
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
#ksrcdir="$srcdir/${_vendor}-kernel-grouper-${_hash}"
ksrcdir="$srcdir/android_kernel_asus_grouper-${_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
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
silentoldconfig
}
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
menuconfig() {
cd "$srcdir"/build || return 1
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" \
|| return 1
}
package() {
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"
}
sha512sums="03d7c2073e6998d4c414267956691300fbd4a1d8b6ea8a773ea906ba306329269aaa47734fc91f65069861f07a4d5b9f63b8f1160c671aa21445ae4196cdec27 linux-asus-grouper-953e26f2709dfe0c185c3c99c50b0c9d56d473a4.zip
3a655e00e4820f123010de8a6bbe7b757b53d352d0e51eef5de4565bd8f473a6735d5bb7961f5abd9fc4de9b0312f303d1819986756a7c603e2e69aa806ab144 config-asus-grouper.armhf
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
9b15bf1f6cb66f54c785b0af6c9db8a7d63257e6fa3eeb0cbf47284334166aa6a7ff93e1b64ab69206c8047d64641199c0f5fcbc257bbe039263252fff45118e duplicate-return-address-definition.patch"

View 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 */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,50 @@
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);