Add Xperia Z2 Tablet WiFi (#339)
* Add Xperia Z2 Tablet WiFi config * Various fixes for Z2 tablet * Fix Checksums
This commit is contained in:
parent
6b5774c7ae
commit
55b32da086
6 changed files with 4144 additions and 0 deletions
8
device/device-sony-castor-windy/90-android.rules
Normal file
8
device/device-sony-castor-windy/90-android.rules
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# udev rules file
|
||||||
|
# All device names can be read from weston's logfile (/tmp/weston.log in postmarketOS)
|
||||||
|
|
||||||
|
# Touchscreen (use 'weston-calibrator' to calibrate)
|
||||||
|
SUBSYSTEM=="input", ATTRS{name}=="clearpad", \
|
||||||
|
ENV{ID_INPUT}="1", ENV{ID_INPUT_TOUCHSCREEN}="1" \
|
||||||
|
ENV{WL_CALIBRATION}="0.982113 -0.006129 1.983124 -0.002560 1.000800 -6.012451"
|
||||||
|
|
26
device/device-sony-castor-windy/APKBUILD
Normal file
26
device/device-sony-castor-windy/APKBUILD
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
pkgname=device-sony-castor-windy
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=4
|
||||||
|
pkgdesc="Sony Xperia Z2 Tablet WIFI"
|
||||||
|
url="https://github.com/postmarketOS"
|
||||||
|
arch="noarch"
|
||||||
|
license="MIT"
|
||||||
|
depends="mkbootimg linux-sony-castor-windy"
|
||||||
|
makedepends=""
|
||||||
|
install=""
|
||||||
|
subpackages=""
|
||||||
|
source="deviceinfo 90-android.rules"
|
||||||
|
options="!check"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -D -m644 "$srcdir/deviceinfo" \
|
||||||
|
"$pkgdir/etc/deviceinfo"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="2814b5a1522f01b82d867d1506992e14892435f1ceba084c05dfedf93f0e1c3f50aa8b754975b30acf642c2c476daccf61d1e1b02aa481dbf033b4f2e61d4607 deviceinfo
|
||||||
|
d309bc3ef26a30ea24be87bd3120eef9cd9fe1d09812ce35f1a9e8d291d5c5ca5651b7fa5a61fb155d8fb98b7df7104ab35c087b96b66ba0b0a54d7e7c5985ff 90-android.rules"
|
24
device/device-sony-castor-windy/deviceinfo
Normal file
24
device/device-sony-castor-windy/deviceinfo
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Reference: <https://postmarketos.org/deviceinfo>
|
||||||
|
# Please use double quotes only. You can source this file in shell scripts.
|
||||||
|
|
||||||
|
deviceinfo_format_version="0"
|
||||||
|
deviceinfo_name="Xperia Z2 Tablet WIFI"
|
||||||
|
deviceinfo_manufacturer="Sony"
|
||||||
|
deviceinfo_date=""
|
||||||
|
deviceinfo_keyboard="false"
|
||||||
|
deviceinfo_nonfree="????"
|
||||||
|
deviceinfo_dtb=""
|
||||||
|
deviceinfo_modules_initfs=""
|
||||||
|
deviceinfo_external_disk="true"
|
||||||
|
deviceinfo_external_disk_install="true"
|
||||||
|
deviceinfo_flash_methods="fastboot"
|
||||||
|
deviceinfo_arch="armhf"
|
||||||
|
|
||||||
|
# Fastboot related
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x02000000"
|
||||||
|
deviceinfo_flash_offset_second="0x00f00000"
|
||||||
|
deviceinfo_flash_offset_tags="0x01e00000"
|
||||||
|
deviceinfo_flash_pagesize="2048"
|
||||||
|
deviceinfo_flash_cmdline="clk_ignore_unused console=ttyMSM0,115200,n8"
|
111
device/linux-sony-castor-windy/APKBUILD
Normal file
111
device/linux-sony-castor-windy/APKBUILD
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
# APKBUILD based on linux-vanilla aport. Changes:
|
||||||
|
# - disabled module installation
|
||||||
|
# - add !check !tracedeps
|
||||||
|
# - package: just install zImage-dtb 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 changes, based on: arch/arm/configs/aosp_rhine_amami_defconfig
|
||||||
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
||||||
|
# - change compression from CONFIG_KERNEL_LZMA=y to
|
||||||
|
# CONFIG_KERNEL_GZIP=y (so it works with busybox)
|
||||||
|
# - disable proprietary graphics driver
|
||||||
|
|
||||||
|
_vendor=sony
|
||||||
|
_flavor=sony-castor-windy
|
||||||
|
_branch=wifi-fixes
|
||||||
|
_config="config-${_flavor}.armhf"
|
||||||
|
|
||||||
|
pkgname=linux-${_flavor}
|
||||||
|
pkgver=4.3
|
||||||
|
case $pkgver in
|
||||||
|
*.*.*) _kernver=${pkgver%.*};;
|
||||||
|
*.*) _kernver=$pkgver;;
|
||||||
|
esac
|
||||||
|
pkgrel=1
|
||||||
|
arch="armhf"
|
||||||
|
pkgdesc="Sony Xperia Z2 Tablet kernel"
|
||||||
|
url="https://github.com/opendata26"
|
||||||
|
depends="postmarketos-mkinitfs"
|
||||||
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
|
||||||
|
options="!strip !check !tracedeps"
|
||||||
|
install=
|
||||||
|
source="
|
||||||
|
$pkgname-$_branch.tar.gz::https://github.com/opendata26/kernel/archive/${_branch}.tar.gz
|
||||||
|
$_config
|
||||||
|
compiler-gcc6.h
|
||||||
|
"
|
||||||
|
subpackages=""
|
||||||
|
license="GPL2"
|
||||||
|
|
||||||
|
_abi_release=${pkgver}
|
||||||
|
_carch="arm"
|
||||||
|
HOSTCC="${CC:-gcc}"
|
||||||
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||||
|
|
||||||
|
ksrcdir="$srcdir/kernel-${_branch}"
|
||||||
|
|
||||||
|
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/" || return 1
|
||||||
|
|
||||||
|
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() {
|
||||||
|
cat "$srcdir/build/arch/arm/boot/zImage" \
|
||||||
|
"$srcdir/build/arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dtb" > \
|
||||||
|
"$srcdir/build/arch/arm/boot/zImage-dtb"
|
||||||
|
|
||||||
|
install -Dm644 "$srcdir/build/arch/arm/boot/zImage-dtb" \
|
||||||
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
||||||
|
|
||||||
|
install -D "$srcdir/build/include/config/kernel.release" \
|
||||||
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||||
|
}
|
||||||
|
sha512sums="d27a8850e6412c2edb2752433600c9b46e3a83a319b3d175dfeaff447ddc2213c4bbfcdb3688eed76743dc89ac1679a40ec95e8b334f30b4e463ae42facdfcc5 linux-sony-castor-windy-wifi-fixes.tar.gz
|
||||||
|
6505f6371153bc741d48bd9f9e15001c8ccd7feb96ce6bb3a6ab7cb3b2012e7b61439edbbac5b1377e11b3af1cb4e2b3878b54b4fdc00729f0a6b2272f64591f config-sony-castor-windy.armhf
|
||||||
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h"
|
69
device/linux-sony-castor-windy/compiler-gcc6.h
Normal file
69
device/linux-sony-castor-windy/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 */
|
||||||
|
|
3906
device/linux-sony-castor-windy/config-sony-castor-windy.armhf
Normal file
3906
device/linux-sony-castor-windy/config-sony-castor-windy.armhf
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue