samsung-nevisp: new device (!954)

This commit is contained in:
Théo Friberg 2020-02-14 10:34:47 +02:00 committed by Bart Ribbers
parent d01e175c70
commit 9e1d95cb88
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
7 changed files with 3281 additions and 0 deletions

View file

@ -0,0 +1,25 @@
# Contributor: Théo Friberg <fsmnarmosta@posteo.net>
# Maintainer: Théo Friberg <fsmnarmosta@posteo.net>
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-samsung-nevisp"
pkgdesc="Samsung Galaxy Fame GT-S6810P"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-samsung-nevisp mkbootimg mesa-dri-swrast msm-fb-refresher"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="233d1fca39301b3ba995b6ae9a52aa19d7124efd2f452009f828d1fe0ae88fcde98a46257990adf75281d8cf99b3bf1d24c30ff949393e54f4f0e6a55a35734e deviceinfo"

View file

@ -0,0 +1,38 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Galaxy Fame GT-S6810P"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-nevisp"
deviceinfo_date=""
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="320"
deviceinfo_screen_height="480"
deviceinfo_dev_touchscreen=""
deviceinfo_dev_touchscreen_calibration=""
deviceinfo_dev_keyboard=""
# Bootloader related
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_kernel_cmdline="console=ttyS0,115200n8 mem=456M androidboot.console=ttyS0 gpt v3d_mem=67108864 pmem=24M@0x9E800000 buildvariant=eng"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x82000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="4096"
deviceinfo_flash_heimdall_partition_kernel=""
deviceinfo_flash_heimdall_partition_system="system"
deviceinfo_flash_heimdall_partition_boot="BOOT"
deviceinfo_flash_sparse="true"

View file

@ -0,0 +1,74 @@
# Contributor: Théo Friberg <fsmnarmosta@posteo.net>
# Maintainer: Théo Friberg <fsmnarmosta@posteo.net>
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/cyanogenmod_nevisp_defconfig
pkgname="linux-samsung-nevisp"
pkgver=3.0.101
pkgrel=0
pkgdesc="Samsung Galaxy Fame GT-S6810P kernel fork"
arch="armv7"
_carch="arm"
_flavor="samsung-nevisp"
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 gcc4 xz"
if [ "${CC:0:5}" != "gcc4-" ]; then
CC="gcc4-$CC"
HOSTCC="gcc4-gcc"
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_rhea"
_commit="8224116dca7de79d181c0761468f569e6ac3505e"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/bcm216xx/$_repository/archive/$_commit.tar.gz
$_config
android_paranoid_network.patch
gcc7-give-up-on-ilog2-const-optimizations.patch
gcc8-fix-put-user.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="1c62313451ff2a04ab9259a4b2c954388a360f45f20af90d05e9cfe73d31f49fc4847f24c1742c89a45f1646e1d27999fc6f5bd224baba7046b07ab324e7baae linux-samsung-nevisp-8224116dca7de79d181c0761468f569e6ac3505e.tar.gz
18056bc314704d2a6f9f2c14cddd970663297c49296909ebe4d42ec5b4b55d107a86ef1b6b8df82c46f6ac1cd4b09e8aca1383d54a005bc380fa4134c87b4372 config-samsung-nevisp.armv7
d8cdc1137e6a4ad78a3a31acc40f0c98f4db272eaf5b90ee850abb83b80916c4ff3c18a0a181e94eebead44213f6314e3363d0c4b91d95ee1adafbcad6dc57ab android_paranoid_network.patch
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch"

View file

@ -0,0 +1,15 @@
--- android_kernel_samsung_tuna/security/commoncap.c 2013-06-13 11:17:13.000000000 +0200
+++ patched_kernel/security/commoncap.c 2017-05-28 16:51:20.551000000 +0200
@@ -88,10 +88,12 @@
int cap_capable(struct task_struct *tsk, const struct cred *cred,
struct user_namespace *targ_ns, int cap, int audit)
{
+#ifdef CONFIG_ANDROID_PARANOID_NETWORK
if (cap == CAP_NET_RAW && in_egroup_p(AID_NET_RAW))
return 0;
if (cap == CAP_NET_ADMIN && in_egroup_p(AID_NET_ADMIN))
return 0;
+#endif
for (;;) {
/* The creator of the user namespace has all caps. */

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