medion-kai: new device (!866)

This commit is contained in:
red-black-bonsai 2020-01-06 19:38:14 +01:00
parent d6ea9107bd
commit 0bc495cf44
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
8 changed files with 3546 additions and 0 deletions

View file

@ -0,0 +1,24 @@
# Reference: <https://postmarketos.org/devicepkg>
# Contributor: red-black-bonsai <red-black-bonsai@gmx.net>
pkgname="device-medion-kai"
pkgdesc="Lenovo Medion Lifetab S9714"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-medion-kai mkbootimg mesa-dri-swrast"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="8ec9bbe89a25cd1f986a70e985f6c045027300ed1a1c0323da3fddf3a9b223eaf0210a9b98fc7188196427ea9078a853ef78457a730494d166bdb1e0d84ea764 deviceinfo"

View file

@ -0,0 +1,33 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Lenovo Medion Lifetab S9714"
deviceinfo_manufacturer="Lenovo"
deviceinfo_codename="medion-kai"
deviceinfo_date="2012-12-06"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1280"
deviceinfo_screen_height="800"
deviceinfo_dev_touchscreen="/dev/input/event1"
deviceinfo_dev_touchscreen_calibration=""
deviceinfo_dev_keyboard=""
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline=""
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x10000000"
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,44 @@
From 63a3f603413ffe82ad775f2d62a5afff87fd94a0 Mon Sep 17 00:00:00 2001
From: "H. Peter Anvin" <hpa@linux.intel.com>
Date: Thu, 7 Feb 2013 17:14:08 -0800
Subject: [PATCH] timeconst.pl: Eliminate Perl warning
defined(@array) is deprecated in Perl and gives off a warning.
Restructure the code to remove that warning.
[ hpa: it would be interesting to revert to the timeconst.bc script.
It appears that the failures reported by akpm during testing of
that script was due to a known broken version of make, not a problem
with bc. The Makefile rules could probably be restructured to avoid
the make bug, or it is probably old enough that it doesn't matter. ]
Reported-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
---
Patch status: upstream
kernel/timeconst.pl | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
index eb51d76..3f42652 100644
--- a/kernel/timeconst.pl
+++ b/kernel/timeconst.pl
@@ -369,10 +369,8 @@ if ($hz eq '--can') {
die "Usage: $0 HZ\n";
}
- @val = @{$canned_values{$hz}};
- if (!defined(@val)) {
- @val = compute_values($hz);
- }
+ $cv = $canned_values{$hz};
+ @val = defined($cv) ? @$cv : compute_values($hz);
output($hz, @val);
}
exit 0;
--
2.4.10

View file

@ -0,0 +1,74 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: /proc/config.gz pulled from vendor's Android 4.1
# Contributor: red-black-bonsai <red-black-bonsai@gmx.net>
pkgname="linux-medion-kai"
pkgver=3.1.10
pkgrel=0
pkgdesc="Lenovo Medion Lifetab S9714 kernel fork"
arch="armv7"
_carch="arm"
_flavor="medion-kai"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6"
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_medion_lifetab_s9714"
_commit="d10779497812934afcadc0da2940caf91f03ed0e"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/red-black-bonsai/$_repository/archive/$_commit.tar.gz
$_config
gcc7-give-up-on-ilog2-const-optimizations.patch
gcc8-fix-put-user.patch
kernel-use-the-gnu89-standard-explicitly.patch
01_timeconst_fix.patch
"
builddir="$srcdir/$_repository-$_commit"
prepare() {
default_prepare
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
# kernel.release
install -D "$builddir/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
# zImage (find the right one)
cd "$builddir/arch/$_carch/boot"
_target="$pkgdir/boot/vmlinuz-$_flavor"
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
[ -e "$_zimg" ] || continue
msg "zImage found: $_zimg"
install -Dm644 "$_zimg" "$_target"
break
done
if ! [ -e "$_target" ]; then
error "Could not find zImage in $PWD!"
return 1
fi
}
sha512sums="c14af0ed4ada9d91b9fd42ca9150f6e57f8504d6236ea582732cdebedc530f031add7afbb57b4df16dbf6af4287ca60ad56b28e4d3c0c3c58ab6a3aba0b95dcc linux-medion-kai-d10779497812934afcadc0da2940caf91f03ed0e.tar.gz
ef5f1ce6566621c0e4b75f231a0fa9eec0cf39a5a4c665c90df1c1c92990e4b84a9e5c5bb2369c3e675a2cd39def0de19f168643d2b2c80a3bb2cb69f0f545e0 config-medion-kai.armv7
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch
d126b4ba0da557a0f29d6cc9c7d69b578c676265662a5a49906051dc27093c4212465d92076f4d90d5b5a06c996c78cbf921faffe7b07e33f74cfb00a7e520d4 01_timeconst_fix.patch"

File diff suppressed because it is too large Load diff

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