Basic Xperia Z3 Tablet Compact support (#1200)
This commit is contained in:
parent
39883062ed
commit
0fbe7ee76c
9 changed files with 4249 additions and 0 deletions
22
device/device-sony-scorpion/APKBUILD
Normal file
22
device/device-sony-scorpion/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-sony-scorpion"
|
||||
pkgdesc="Xperia Z3 Tablet Compact"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="noarch"
|
||||
options="!check"
|
||||
depends="linux-sony-scorpion mkbootimg mesa-dri-swrast msm-fb-refresher"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="0282c002f585688cf7ea5f7de13bf633bac6456ad0374de85943f3c06c26e2e833c91cfd626dcd010d91b785c793d08cec4b981cc95a70514f2ef7cf27309907 deviceinfo"
|
35
device/device-sony-scorpion/deviceinfo
Normal file
35
device/device-sony-scorpion/deviceinfo
Normal 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="Xperia Z3 Tablet Compact"
|
||||
deviceinfo_manufacturer="Sony"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_external_disk_install="false"
|
||||
deviceinfo_arch="armhf"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_disk="true"
|
||||
deviceinfo_screen_width="1200"
|
||||
deviceinfo_screen_height="1920"
|
||||
deviceinfo_dev_touchscreen="/dev/input/event2"
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
deviceinfo_dev_keyboard=""
|
||||
|
||||
deviceinfo_msm_refresher="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 vmalloc=300M user_debug=31 androidboot.selinux=permissive console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 msm_rtb.filter=0x3F ehci-hcd.park=3 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y coherent_pool=8M sched_enable_power_aware=1 androidboot.hardware=scorpion_windy buildvariant=userdebug"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x02000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x01e00000"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From bd447b61c49fc26f0299587db3e6d66da49dc529 Mon Sep 17 00:00:00 2001
|
||||
From: Chen Gang <gang.chen.5i5j@gmail.com>
|
||||
Date: Sun, 9 Nov 2014 13:31:11 -0800
|
||||
Subject: [PATCH] Input: lifebook - use "static inline" instead of "inline" in
|
||||
lifebook.h
|
||||
|
||||
For functions defined in header files we should use static inline rather
|
||||
than inline, which breaks under the latest upstream gcc (which is really
|
||||
gcc issue, but static inline is better suited regardless).
|
||||
|
||||
The related error (with allmodconfig under tile):
|
||||
|
||||
MODPOST 4002 modules
|
||||
ERROR: "lifebook_detect" [drivers/input/mouse/psmouse.ko] undefined!
|
||||
|
||||
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
|
||||
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
---
|
||||
drivers/input/mouse/lifebook.h | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h
|
||||
index 4c4326c6f504..0baf02a70a99 100644
|
||||
--- a/drivers/input/mouse/lifebook.h
|
||||
+++ b/drivers/input/mouse/lifebook.h
|
||||
@@ -16,14 +16,14 @@ void lifebook_module_init(void);
|
||||
int lifebook_detect(struct psmouse *psmouse, bool set_properties);
|
||||
int lifebook_init(struct psmouse *psmouse);
|
||||
#else
|
||||
-inline void lifebook_module_init(void)
|
||||
+static inline void lifebook_module_init(void)
|
||||
{
|
||||
}
|
||||
-inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
|
||||
+static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
-inline int lifebook_init(struct psmouse *psmouse)
|
||||
+static inline int lifebook_init(struct psmouse *psmouse)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
--
|
||||
2.14.1
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
From bde304575f3ecaa9570a9329196dffaadf3adafa Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 22 May 2015 09:56:29 -0700
|
||||
Subject: [PATCH] Input: sentelic - use "static inline" instead of "inline"
|
||||
|
||||
gcc-5 defaults to gnu11 which used c99 inline semantics in c99 'inline' is
|
||||
not externally visible unlike gnu89, therefore we use 'static inline' which
|
||||
has same semantics between gnu89 and c99
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
---
|
||||
drivers/input/mouse/sentelic.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h
|
||||
index aa697ece405b..42df9e3beae8 100644
|
||||
--- a/drivers/input/mouse/sentelic.h
|
||||
+++ b/drivers/input/mouse/sentelic.h
|
||||
@@ -123,11 +123,11 @@ struct fsp_data {
|
||||
extern int fsp_detect(struct psmouse *psmouse, bool set_properties);
|
||||
extern int fsp_init(struct psmouse *psmouse);
|
||||
#else
|
||||
-inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
|
||||
+static inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
-inline int fsp_init(struct psmouse *psmouse)
|
||||
+static inline int fsp_init(struct psmouse *psmouse)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
--
|
||||
2.14.1
|
||||
|
33
device/linux-sony-scorpion/02_gpu-msm-fix-gcc5-compile.patch
Normal file
33
device/linux-sony-scorpion/02_gpu-msm-fix-gcc5-compile.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
source:
|
||||
https://github.com/ShinySide/HispAsian_Lollipop_G6/commit/b7756b6fc4bb728722b14d2dfdbaf1dc843812e9
|
||||
|
||||
* These need to be static to avoid these errors:
|
||||
|
||||
drivers/built-in.o: In function `.LANCHOR1':
|
||||
msm_iommu_sec.c:(.data+0x9298): undefined reference to `kgsl_iommu_sync_lock'
|
||||
msm_iommu_sec.c:(.data+0x929c): undefined reference to `kgsl_iommu_sync_unlock'
|
||||
Makefile:877: recipe for target '.tmp_vmlinux1' failed
|
||||
make: *** [.tmp_vmlinux1] Error 1
|
||||
|
||||
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
|
||||
|
||||
--- a/drivers/gpu/msm/kgsl_iommu.c
|
||||
+++ b/drivers/gpu/msm/kgsl_iommu.c
|
||||
@@ -1010,7 +1010,7 @@ static int kgsl_iommu_init_sync_lock(struct kgsl_mmu *mmu)
|
||||
*
|
||||
* Return - int - number of commands.
|
||||
*/
|
||||
-inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
|
||||
+static inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
|
||||
unsigned int *cmds)
|
||||
{
|
||||
struct kgsl_device *device = mmu->device;
|
||||
@@ -1080,7 +1080,7 @@ inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
|
||||
*
|
||||
* Return - int - number of commands.
|
||||
*/
|
||||
-inline unsigned int kgsl_iommu_sync_unlock(struct kgsl_mmu *mmu,
|
||||
+static inline unsigned int kgsl_iommu_sync_unlock(struct kgsl_mmu *mmu,
|
||||
unsigned int *cmds)
|
||||
{
|
||||
struct kgsl_device *device = mmu->device;
|
26
device/linux-sony-scorpion/02_reduce_lzo_compression.patch
Normal file
26
device/linux-sony-scorpion/02_reduce_lzo_compression.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||
index a7ca009..808091b 100644
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -259,7 +259,7 @@ cmd_lzma = (cat $(filter-out FORCE,$^) | \
|
||||
|
||||
quiet_cmd_lzo = LZO $@
|
||||
cmd_lzo = (cat $(filter-out FORCE,$^) | \
|
||||
- lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
|
||||
+ lzop -6 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
|
||||
(rm -f $@ ; false)
|
||||
|
||||
# XZ
|
||||
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
|
||||
index b482f16..c4e08c5 100644
|
||||
--- a/scripts/gen_initramfs_list.sh
|
||||
+++ b/scripts/gen_initramfs_list.sh
|
||||
@@ -245,7 +245,7 @@ case "$arg" in
|
||||
echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f"
|
||||
echo "$output_file" | grep -q "\.xz$" && \
|
||||
compr="xz --check=crc32 --lzma2=dict=1MiB"
|
||||
- echo "$output_file" | grep -q "\.lzo$" && compr="lzop -9 -f"
|
||||
+ echo "$output_file" | grep -q "\.lzo$" && compr="lzop -6 -f"
|
||||
echo "$output_file" | grep -q "\.cpio$" && compr="cat"
|
||||
shift
|
||||
;;
|
88
device/linux-sony-scorpion/APKBUILD
Normal file
88
device/linux-sony-scorpion/APKBUILD
Normal file
|
@ -0,0 +1,88 @@
|
|||
# Kernel config based on: arch/arm/configs/aosp_shinano_scorpion_defconfig
|
||||
|
||||
pkgname="linux-sony-scorpion"
|
||||
pkgver=3.10.84
|
||||
pkgrel=0
|
||||
pkgdesc="Xperia Z3 Tablet Compact kernel fork"
|
||||
arch="armhf"
|
||||
_carch="arm"
|
||||
_flavor="sony-scorpion"
|
||||
url="https://kernel.org"
|
||||
license="GPL2"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
# Source
|
||||
_repository="kernel"
|
||||
_commit="1cc4f02f27228698213af5dac9ff690ea0e27d55"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/lowtraxx/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
00_Input-sentelic-use-static-inline-instead-of-inline.patch
|
||||
00_Input-lifebook-use-static-inline-instead-of-inline-i.patch
|
||||
02_reduce_lzo_compression.patch
|
||||
"
|
||||
builddir="$srcdir/${_repository}-${_commit}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
# gcc6 support
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
|
||||
|
||||
# Remove -Werror from all makefiles
|
||||
local i
|
||||
local makefiles="$(find . -type f -name Makefile)
|
||||
$(find . -type f -name Kbuild)"
|
||||
for i in $makefiles; do
|
||||
sed -i 's/-Werror-/-W/g' "$i"
|
||||
sed -i 's/-Werror//g' "$i"
|
||||
done
|
||||
|
||||
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
|
||||
cp "$srcdir"/$_config "$builddir"/.config
|
||||
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
|
||||
}
|
||||
|
||||
menuconfig() {
|
||||
cd "$builddir"
|
||||
make ARCH="$_carch" menuconfig
|
||||
cp .config "$startdir"/$_config
|
||||
}
|
||||
|
||||
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="a3e1bd39f25da9b695fceb0282c036721352c52b7e495f37dc578d6076462c8495cbcf0714e3b03b66e564d08430f0bda6aee40ef45c437028b37ae162cace9b linux-sony-scorpion-1cc4f02f27228698213af5dac9ff690ea0e27d55.tar.gz
|
||||
81b5e9fc58c672c1f2b3f891455a66c32e2931a6f2b2c1fa3ae90e3006586b5d9821df86005da2b29e4d847661e95aba30ad51400d4ab54afd17d7d5b549d46b config-sony-scorpion.armhf
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||
2d77d90b501aa8afbf81629e73fc0a2055b373942975f58277e43f398d0835b3dbbff4a1118137ec82873ba90a254fea87c1d73ba7708578f1779bd0b4c6ff2d 00_Input-sentelic-use-static-inline-instead-of-inline.patch
|
||||
5c49f6ff6773a7dc3067d2b1359648fe7a9f758b6c068d6fa69d9aaf24a291ba8022c960317d926aabc11d020a71b20c4e81a6fcf9b21ef66d9b6d065bae23e9 00_Input-lifebook-use-static-inline-instead-of-inline-i.patch
|
||||
ef5b912c26fea4ab882592bdf7487942c64b123de8d25d08d976f29743f311742ee2f773bf2d110ddb5095f254dbb0bd4487c5cfce77311929082599199e7ebd 02_reduce_lzo_compression.patch"
|
69
device/linux-sony-scorpion/compiler-gcc6.h
Normal file
69
device/linux-sony-scorpion/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 */
|
||||
|
3894
device/linux-sony-scorpion/config-sony-scorpion.armhf
Normal file
3894
device/linux-sony-scorpion/config-sony-scorpion.armhf
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue