commit
5cf496ddb0
9 changed files with 3010 additions and 3 deletions
24
device-samsung-maguro/APKBUILD
Normal file
24
device-samsung-maguro/APKBUILD
Normal file
|
@ -0,0 +1,24 @@
|
|||
pkgname=device-samsung-maguro
|
||||
pkgver=2
|
||||
pkgrel=2
|
||||
pkgdesc="Google Galaxy Nexus (GSM)"
|
||||
url="https://github.com/postmarketOS"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="linux-samsung-tuna"
|
||||
makedepends=""
|
||||
install=""
|
||||
subpackages=""
|
||||
source="deviceinfo"
|
||||
options="!check"
|
||||
|
||||
build() {
|
||||
return 0
|
||||
}
|
||||
|
||||
package() {
|
||||
install -D -m644 "$srcdir"/deviceinfo \
|
||||
"$pkgdir"/etc/deviceinfo
|
||||
}
|
||||
|
||||
sha512sums="eaeafab8e394c95c007d00e97b9b3563aedb006013f22b2fae500026700f009a3ef871a911b423103ef59cfae12bfeef96542e75bc22bcace8e17c308cbbddf6 deviceinfo"
|
26
device-samsung-maguro/deviceinfo
Normal file
26
device-samsung-maguro/deviceinfo
Normal file
|
@ -0,0 +1,26 @@
|
|||
# This document format is a draft.
|
||||
# You can source it in shell scripts.
|
||||
# Use only double quotes.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Google Galaxy Nexus"
|
||||
deviceinfo_manufacturer="Samsung"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_nonfree="????"
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_external_disk="false"
|
||||
deviceinfo_external_disk_install="false"
|
||||
deviceinfo_flash_methods="fastboot"
|
||||
deviceinfo_arch="armhf"
|
||||
|
||||
|
||||
# You can for example extract these from an existing boot.img
|
||||
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"
|
109
linux-samsung-tuna/APKBUILD
Normal file
109
linux-samsung-tuna/APKBUILD
Normal file
|
@ -0,0 +1,109 @@
|
|||
# APKBUILD based on linux-vanilla aport. Changes:
|
||||
# - disabled module installation
|
||||
# - add !check !tracedeps
|
||||
# - package: just install zimage and kernel.release, because the kernel config
|
||||
# does not generate modules or dtb files
|
||||
# - do not create -dev subpackage (makes no sense without module support)
|
||||
#
|
||||
# Kernel config based on: arch/arm/configs/lineageos_mako_defconfig
|
||||
# Changes:
|
||||
# - enable devtmpfs (needed for udev -> touch support in weston)
|
||||
|
||||
_vendor=samsung
|
||||
_flavor=samsung_tuna
|
||||
_hash="e14e5fe679a63eef92346cde874175d8b62b6a4a"
|
||||
_config="config-${_flavor}.armhf"
|
||||
|
||||
pkgname=linux-samsung-tuna
|
||||
pkgver=3.4.0
|
||||
case $pkgver in
|
||||
*.*.*) _kernver=${pkgver%.*};;
|
||||
*.*) _kernver=$pkgver;;
|
||||
esac
|
||||
pkgrel=3
|
||||
arch="armhf"
|
||||
pkgdesc="Nexus 4 kernel from LineageOS"
|
||||
url="https://github.com/LineageOS/android_kernel_samsung_tuna"
|
||||
depends="postmarketos-mkinitfs"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
|
||||
options="!strip !check !tracedeps"
|
||||
install=
|
||||
source="
|
||||
https://github.com/LineageOS/android_kernel_${_flavor}/archive/${_hash}.zip
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
android_paranoid_network.patch
|
||||
fix_old_perl_code.patch
|
||||
"
|
||||
subpackages=""
|
||||
license="GPL2"
|
||||
|
||||
_abi_release=${pkgver}
|
||||
_carch="arm"
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
ksrcdir="$srcdir/android_kernel_${_flavor}-${_hash}"
|
||||
|
||||
prepare() {
|
||||
local _patch_failed=
|
||||
cd "$ksrcdir"
|
||||
|
||||
# first apply patches in specified order
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch)
|
||||
msg "Applying $i..."
|
||||
if ! patch -s -p1 -N -i "$srcdir"/$i; then
|
||||
echo $i >>failed
|
||||
_patch_failed=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if ! [ -z "$_patch_failed" ]; then
|
||||
error "The following patches failed:"
|
||||
cat failed
|
||||
return 1
|
||||
fi
|
||||
|
||||
# gcc6 support
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
|
||||
|
||||
mkdir -p "$srcdir"/build
|
||||
cp "$srcdir"/$_config "$srcdir"/build/.config || return 1
|
||||
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||||
silentoldconfig
|
||||
}
|
||||
|
||||
|
||||
|
||||
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
|
||||
menuconfig() {
|
||||
cd "$srcdir"/build || return 1
|
||||
make ARCH="$_carch" menuconfig
|
||||
cp .config "$startdir"/$_config
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/build
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
|
||||
|| return 1
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 "$srcdir/build/arch/arm/boot/zImage" \
|
||||
"$pkgdir/boot/vmlinuz-$_flavor"
|
||||
|
||||
install -D "$srcdir/build/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
}
|
||||
|
||||
sha512sums="c048b4f195ac6083e1884e41a7fc77c111edb555e6d53ee391d6220f308138c76389edaeb6b166c6f132fa33e8588f03734ed70397440a738b8e3f1c0068fbab e14e5fe679a63eef92346cde874175d8b62b6a4a.zip
|
||||
c6235a1db9a48cf2ba371ffcff50254095fe32c7982d7899a93773edb5fb18cb94e7a257146884f27aac34711ce8cfa9fd2fcc62f4a3fc5869e23a3f286c0128 config-samsung_tuna.armhf
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||
d8cdc1137e6a4ad78a3a31acc40f0c98f4db272eaf5b90ee850abb83b80916c4ff3c18a0a181e94eebead44213f6314e3363d0c4b91d95ee1adafbcad6dc57ab android_paranoid_network.patch
|
||||
65eb11dca6645073885228af6aae6efa40b6f063fd04157b501acf40368bf331dd701f746ed187659f654a9354ddf304aaefca8ffc9ea2b00c145c61162e1189 fix_old_perl_code.patch"
|
15
linux-samsung-tuna/android_paranoid_network.patch
Normal file
15
linux-samsung-tuna/android_paranoid_network.patch
Normal 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. */
|
69
linux-samsung-tuna/compiler-gcc6.h
Normal file
69
linux-samsung-tuna/compiler-gcc6.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
// 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 */
|
||||
|
2753
linux-samsung-tuna/config-samsung_tuna.armhf
Normal file
2753
linux-samsung-tuna/config-samsung_tuna.armhf
Normal file
File diff suppressed because it is too large
Load diff
11
linux-samsung-tuna/fix_old_perl_code.patch
Normal file
11
linux-samsung-tuna/fix_old_perl_code.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- android_kernel_samsung_tuna/kernel/timeconst.pl 2013-06-13 11:17:13.000000000 +0200
|
||||
+++ patched_kernel/kernel/timeconst.pl 2017-05-28 17:01:20.279000000 +0200
|
||||
@@ -370,7 +370,7 @@
|
||||
}
|
||||
|
||||
@val = @{$canned_values{$hz}};
|
||||
- if (!defined(@val)) {
|
||||
+ if (!@val) {
|
||||
@val = compute_values($hz);
|
||||
}
|
||||
output($hz, @val);
|
|
@ -1,6 +1,6 @@
|
|||
pkgname=postmarketos-base
|
||||
pkgver=1
|
||||
pkgrel=6
|
||||
pkgrel=7
|
||||
pkgdesc="Meta package for minimal postmarketos base"
|
||||
url="https://github.com/postmarketOS"
|
||||
arch="noarch"
|
||||
|
|
|
@ -17,9 +17,9 @@ done
|
|||
# Add user account
|
||||
adduser -u 1000 -D -h /home/user -G users user 2>/dev/null
|
||||
|
||||
# Autologin on tty1, disable tty 3-5
|
||||
# Autologin on tty1, let busybox autoconfigure 2-6
|
||||
autologin="root"
|
||||
for i in 1 3 4 5 6; do
|
||||
for i in 1 2 3 4 5 6; do
|
||||
old="^tty$i::respawn:/sbin/getty 38400 tty$i"
|
||||
new="# tty$i::respawn:/sbin/getty 38400 tty$i"
|
||||
[ "$i" == "1" ] && new="tty1::respawn:/bin/login -f $autologin"
|
||||
|
|
Loading…
Reference in a new issue