samsung-gts210vewifi: use devicepkg-dev (!353)

Instead of doing it step by step in APKBUILD, use
downstreamkernel_prepare.

[ci:skip-build]: already built successfully in CI
This commit is contained in:
K-laus 2019-05-09 21:39:16 +00:00 committed by Oliver Smith
parent 2978dfd42a
commit 1528be93f3
2 changed files with 6 additions and 90 deletions

View File

@ -1,4 +1,5 @@
# Kernel config based on: kernel/samsung/msm8976/arch/arm64/configs/gts210vewifi_defconfig
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: (kernel/samsung/msm8976/)arch/arm64/configs/gts210vewifi_defconfig
pkgname="linux-samsung-gts210vewifi"
pkgver=3.10.102
@ -8,9 +9,9 @@ arch="aarch64"
_carch="arm64"
_flavor="samsung-gts210vewifi"
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 dtbtool gcc6"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool gcc6 devicepkg-dev"
# 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
@ -29,7 +30,6 @@ _config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
$_config
compiler-gcc6.h
01_fix_msm_dba.patch
"
builddir="$srcdir/${_repository}-${_commit}"
@ -37,27 +37,13 @@ builddir="$srcdir/${_repository}-${_commit}"
prepare() {
default_prepare
# gcc6 support
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
# Remove -Werror from all makefiles
local i
local makefiles="$(find . -type f -name Makefile)
$(find . -type f -name Kbuild)"
for i in $makefiles; do
sed -i 's/-Werror-/-W/g' "$i"
sed -i 's/-Werror//g' "$i"
done
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
cp "$srcdir"/$_config "$builddir"/.config
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
C_INCLUDE_PATH="./arch/arm/mach-msm:./sound/soc/msm/qdsp6v2"
C_INCLUDE_PATH="./arch/arm/mach-msm:./sound/soc/msm/qdsp6v2" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# As path is symlinked from arm64 to arm, dtb files end up below arm, not arm64
echo dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm64/boot/dt.img" "arch/arm/boot/dts/"
@ -91,5 +77,4 @@ package() {
sha512sums="37e55b3e64308a29deb8932d8d2452ff76601558bdcb9ff58f3a016f5ec63c2941e5fe7cdcced50d5039d3cdadaa5d43004c4e27cb8b105f8fda7596d676fb9e linux-samsung-gts210vewifi-82d475a1952b9bbb6652b35e87671b5031bcf934.tar.gz
31d6b7356ac1c1053dce3319371b18298a4a6e815abcd910a7e0ff0a4dc03bcff15da14f8e8d485c80da29169788754f019f2b158355c3768bae7c2b17f3047b config-samsung-gts210vewifi.aarch64
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
7e765cb696fa8c3dfbc305b05cbf1fad85fb9572613d5391e945341dae5974a745f4906c795dc841e5562b19ab77d5257f9741e514af2c2573aa4bb8b262ce51 01_fix_msm_dba.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 */