Skip to content
Snippets Groups Projects
Verified Commit 4c731968 authored by VaporGame's avatar VaporGame Committed by Clayton Craft
Browse files

samsung-i9105p: new device (MR 5861)

[ci:skip-build]: already built successfully in CI
parent 6907cf23
No related branches found
No related tags found
No related merge requests found
Showing
with 3152 additions and 0 deletions
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-i9105p
pkgdesc="Samsung Galaxy S2 Plus"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-samsung-i9105p
mkbootimg
postmarketos-base
"
makedepends="devicepkg-dev"
source="
deviceinfo
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
61dcaf1daeb2ee96d8476e4fecbeb076bde2235fd58b9659e84d94509b8ff76ae5f2420bef521a07ad64ce53e6ee520caf207c1532c61207cb90191d19576bb1 deviceinfo
"
# 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 S2 Plus"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-i9105p"
deviceinfo_year="2013"
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
# Bootloader related
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_kernel_cmdline="console=ttyS0,115200n8 mem=832M@0xA2000000 androidboot.console=ttyS0 vc-cma-mem=0/176M@0xCB000000 buildvariant=userdebug"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="4096"
deviceinfo_header_version="0"
deviceinfo_flash_offset_base="0xa2000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_heimdall_partition_kernel="KERNEL"
deviceinfo_flash_heimdall_partition_rootfs="system"
deviceinfo_flash_sparse="true"
deviceinfo_create_initfs_extra="true"
deviceinfo_partition_table="msdos"
This fixes compilation with ANDROID_PARANOID_NETWORK disabled. Without this
patch, compilation breaks with:
/home/pmos/build/src/android_kernel_samsung_latona-7b8d73dd32e6cd21107f9a963a32a5ed237a6e78/security/commoncap.c:
In function 'cap_capable':
/home/pmos/build/src/android_kernel_samsung_latona-7b8d73dd32e6cd21107f9a963a32a5ed237a6e78/security/commoncap.c:91:40:
error: 'AID_NET_RAW' undeclared (first use in this function)
if (cap == CAP_NET_RAW && in_egroup_p(AID_NET_RAW))
^~~~~~~~~~~
/home/pmos/build/src/android_kernel_samsung_latona-7b8d73dd32e6cd21107f9a963a32a5ed237a6e78/security/commoncap.c:91:40:
note: each undeclared identifier is reported only once for each function it
appears in
/home/pmos/build/src/android_kernel_samsung_latona-7b8d73dd32e6cd21107f9a963a32a5ed237a6e78/security/commoncap.c:93:42:
error: 'AID_NET_ADMIN' undeclared (first use in this function)
if (cap == CAP_NET_ADMIN && in_egroup_p(AID_NET_ADMIN))
---
From e9a85c71afa38ee304e71c86ca7d74ed4658318c Mon Sep 17 00:00:00 2001
From: Tushar Behera <tushar.behera@linaro.org>
Date: Mon, 26 Mar 2012 16:54:15 +0530
Subject: [PATCH] security: Add proper checks for Android specific capability
checks
Commit b641072 ("security: Add AID_NET_RAW and AID_NET_ADMIN capability
check in cap_capable().") introduces additional checks for AID_NET_xxx
macros. Since the header file including those macros are conditionally
included, the checks should also be conditionally executed.
Change-Id: Iaec5208d5b95a46b1ac3f2db8449c661e803fa5b
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
---
security/commoncap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/security/commoncap.c b/security/commoncap.c
index 897af00e477..0051ac2d058 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -80,10 +80,12 @@ int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
int cap_capable(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. */
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/bcm28155_capri_ss_s2vep_rev05_defconfig
pkgname=linux-samsung-i9105p
pkgver=3.0.101
pkgrel=0
pkgdesc="Samsung Galaxy S2 Plus kernel fork"
arch="armv7"
_carch="arm"
_flavor="samsung-i9105p"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
findutils
flex
gcc4
msm-fb-refresher
openssl-dev
perl
"
# Compiler: GCC 4 (doesn't boot when compiled with newer versions)
if [ "${CC:0:5}" != "gcc4-" ]; then
CC="gcc4-$CC"
HOSTCC="gcc4-gcc"
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_samsung_galaxys2plus-common"
_commit="6625d1eba424bf57bd64f466a1c25db10cb68f26"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/surblazer/$_repository/archive/$_commit.tar.gz
$_config
kernel-use-the-gnu89-standard-explicitly.patch
gcc10-extern_YYLOC_global_declaration.patch
03_fix_paranoid_network_disabled.patch
linux3.4-fix-piggy.gzip.S.patch
linux3.0-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
fix-check-lxdialog.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
make ARCH="$_carch" mrproper
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
"$_flavor" "$_outdir"
}
sha512sums="
3b48ad727127707a18503d1f77a5ef60de831fbbcfd4c65745ebb4e1de3419b82f42e3e9a0c0ae2d4e4d0d5349baa4364f28d6c0198463871362c470172a61f1 linux-samsung-i9105p-6625d1eba424bf57bd64f466a1c25db10cb68f26.tar.gz
4e7b808049b143ed79262324a971692efe5a7580ac7c74aba474ad1a2df14598911c31d1702a514eb6f505b6dd3d09db96f48df4effa2d8443ca6cd5d05c851a config-samsung-i9105p.armv7
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
df62e03666313bb03d9a455eac875f170a55d378b6e56b847c1c6ff1ce5cfafcfdf1d7605754ca3c684840ea00357f9ec4c6621f6ff77377132a484b9258f6f7 03_fix_paranoid_network_disabled.patch
080745ca4ecaa804ee1df26ea81975ca93b74372e0c08322a6c481e97807495ae6ceb6cc77653afa24f9f2df45da8ebf8e5de6b06037fbb08e0279877ce42188 linux3.4-fix-piggy.gzip.S.patch
66ab793bb1fa50a07f10e2cdb0f49ea05a787c6b1fe5358e69a76e43295ac5be3b68cdf6a882e868bfe6969cac981c5545587cd57eee4b5cec26078ae0ecaa1c linux3.0-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
182be3c596b9cc267ac108d7cf03fc8c328ccc6b36770800e4dcedea8d1bb65e3f5eacf590c2948f58b1418cc60a1670ba77dde8c259e428d158c31b6e1dbaf5 fix-check-lxdialog.patch
"
This diff is collapsed.
../../.shared-patches/linux/fix-check-lxdialog.patch
\ No newline at end of file
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
\ No newline at end of file
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch
\ No newline at end of file
../../.shared-patches/linux/linux3.0-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
\ No newline at end of file
../../.shared-patches/linux/linux3.4-fix-piggy.gzip.S.patch
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment