samsung-superior: new device (Samsung Galaxy Premier) (MR 1852)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
begs 2021-01-05 01:15:10 +03:00 committed by Oliver Smith
parent 0a9ac24560
commit 8c39c913d1
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
9 changed files with 3148 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-superior
pkgdesc="Samsung Galaxy Premier"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-samsung-superior mkbootimg mesa-dri-gallium"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="
deviceinfo
modules-load.conf
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="Wifi firmware"
depends="firmware-samsung-superior"
mkdir "$subpkgdir"
}
sha512sums="0118c9baf51c562f64673e764c7f2f0ee77bcafca08e04565e2679eca24a620687faf8341a2932f159f9a5a0bf0b6edd91db91d956b994e09672e41b50ac1b64 deviceinfo
761387a44a2280589336a69b24a24bc33e81aebc441f4033ffd992820edee6b386cc817d7b8519cbf52467a56180ec6b9a88929ee54e73f01217107ef206cab4 modules-load.conf"

View file

@ -0,0 +1,35 @@
# 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 Premier"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-superior"
deviceinfo_year="2013"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1280"
# Bootloader related
deviceinfo_flash_sparse="true"
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_kernel_cmdline="console=ttyO2,115200n8 mem=1024M androidboot.console=ttyO2 vram=20M omapfb.vram=0:16M"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_heimdall_partition_kernel="BOOT"

View file

@ -0,0 +1,5 @@
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# wifi module
dhd

View file

@ -0,0 +1,21 @@
pkgname=firmware-samsung-superior
pkgver=1
pkgrel=0
_commit="53ad8adcfe42835acd6d8b9fc222717929e67811"
pkgdesc="Samsung Galaxy Premier firmware"
url="https://github.com/Begggs/proprietary_vendor_samsung_superior"
arch="armv7"
license="proprietary"
source="$pkgname-$_commit.tar.gz::https://github.com/Begggs/proprietary_vendor_samsung_superior/archive/$_commit.tar.gz"
options="!check !strip !archcheck !spdx"
builddir="$srcdir/proprietary_vendor_samsung_superior-$_commit"
package() {
# Wifi
for _i in bcmdhd_sta.bin_b2 nvram_net.txt; do
install -Dm644 system/etc/wifi/"$_i" \
"$pkgdir"/lib/firmware/postmarketos/"$_i"
done
}
sha512sums="f9ce4d7f82c80bc6b981fe211556e55aa4dd531a0eb014ce952e1596b186a2171819121b7914019ce5c3071201395fcd61f8e563fc4da6351b0c2f94eddf9203 firmware-samsung-superior-53ad8adcfe42835acd6d8b9fc222717929e67811.tar.gz"

View file

@ -0,0 +1,59 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/cyanogenmod_superior_defconfig
pkgname=linux-samsung-superior
pkgver=3.0.31
pkgrel=0
pkgdesc="Samsung Galaxy Premier kernel from LineageOS"
arch="armv7"
_carch="arm"
_flavor="samsung-superior"
url="https://github.com/LineageOS/android_kernel_samsung_piranha"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl"
# Source
_repository="android_kernel_samsung_piranha"
_commit="63b62b25f355535aa03956f957658f29f4a62cf2"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
$_config
gcc8-fix-put-user.patch
fix_aid_net_on_apn_disable.patch
timeconst.pl-Eliminate-Perl-warning.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# the 'no-pic' flag is necessary to avoid the
# error 'Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)' when loading the module
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" CFLAGS_MODULE="-fno-pic" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" modules
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 modules_install
}
sha512sums="048619a71e7f7565807ada4a16286cf3844c3ce547c832ad77c267d597488ad6cf3bf24289cb0172075e61b89a635a28a2bf4d5b698ccdf96145d50db1ff20c8 linux-samsung-superior-63b62b25f355535aa03956f957658f29f4a62cf2.tar.gz
ac7d451f42f4d7eac61fe23fa20638e6d262661c14a814597f25ceca534b76897baef0c0478ca07524e184b86024e2178c6ff973f732ac8b95319869e246b0ba config-samsung-superior.armv7
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
1cae09c775d787e877f82cb164b5d68530f4bd9b108b7abaf8192bd85a3d8975456762ce9f563fa766b1c03519e09ef93e177fd6972e439e4aa0c3a5709ea691 fix_aid_net_on_apn_disable.patch
1fcfb5f06a2bfdcc55d53054ca80d1b989599a39a5379d057a0724fc405187d74da4309a650e70b9c79d39444e81923cfc5c9199ed8c0a77c83dcd7998446bb7 timeconst.pl-Eliminate-Perl-warning.patch"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,27 @@
From 7041266a29e9681fc13034f345cdcc269d672f83 Mon Sep 17 00:00:00 2001
From: Alejandro Mery <amery@geeks.cl>
Date: Fri, 11 May 2012 23:57:15 +0200
Subject: [PATCH] security: fixed to build with ANDROID_PARANOID_NETWORK
disabled
---
security/commoncap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/security/commoncap.c b/security/commoncap.c
index ccfe568b396fb..8bfbd13497467 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -88,10 +88,12 @@ EXPORT_SYMBOL(cap_netlink_recv);
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. */

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc8-fix-put-user.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/timeconst.pl-Eliminate-Perl-warning.patch