New device: htc-ville (HTC One S) (!177)

Boots and runs weston so far.

[skip ci]: already built successfully in CI
This commit is contained in:
escoand 2019-02-12 21:45:39 +00:00 committed by Oliver Smith
parent 1b353c020a
commit 62b145d8db
11 changed files with 3992 additions and 0 deletions

View file

@ -0,0 +1,30 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-htc-ville"
pkgdesc="HTC One S"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armhf"
options="!check !archcheck"
depends="postmarketos-base linux-htc-ville mkbootimg mesa-dri-swrast msm-fb-refresher"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="All non-free firmwares from a device image (wifi, modem, camera etc.)"
depends="firmware-htc-ville"
mkdir "$subpkgdir"
}
sha512sums="287101068defb7417227ec564eecd9b708c84369edc9002d87d4e4910517853e88e2024d6d6dfe72d3a6e93a8cefe087967d1f818d7daa9296bbcbfeb491d437 deviceinfo"

View file

@ -0,0 +1,33 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="HTC One S"
deviceinfo_manufacturer="HTC"
deviceinfo_codename="htc-ville"
deviceinfo_date="2012-04-02"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armhf"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="false"
deviceinfo_screen_width="540"
deviceinfo_screen_height="960"
deviceinfo_dev_touchscreen="/dev/input/event2"
deviceinfo_dev_touchscreen_calibration=""
deviceinfo_dev_keyboard=""
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.hardware=qcom androidboot.selinux=permissive"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_flash_offset_base="0x80400000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01700000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"

View file

@ -0,0 +1,72 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/ville_defconfig
pkgname="linux-htc-ville"
pkgver=3.4.110
pkgrel=0
pkgdesc="HTC One S kernel fork"
arch="armhf"
_carch="arm"
_flavor="htc-ville"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev"
# Compiler: latest GCC from Alpine
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
# Source
_repository="android_kernel_htc_msm8960"
_commit="5b59c1be35a99c8913d33e68d608eee9cdef3393"
_config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
$_config
gcc7-give-up-on-ilog2-const-optimizations.patch
gcc8-fix-put-user.patch
static-inline-in-ftrace.h.patch
psmouse_base.patch
kgsl_iommu_sync_lock.patch
"
builddir="$srcdir/${_repository}-${_commit}"
prepare() {
default_prepare
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
}
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="5f5bd1399608301dc8688bea638bdb729b5229202748769d68cabc1e4da423ae28e06f856c971a7265d053c8a46d77e0a4f71a6d57ffea13aa5f9d84e594f2d2 linux-htc-ville-5b59c1be35a99c8913d33e68d608eee9cdef3393.tar.gz
6cf654cb8d76b1b0944ca96044e78b6949ce447f992f09e5abe0c61ba477f7c1b232540c480a4fd3124f7817a241b291d376a2f22dd103a0bdacc357081a9ae6 config-htc-ville.armhf
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 static-inline-in-ftrace.h.patch
f7e31cfe422696922aec52002e56c58103183966edee3bb8e1995d33f8d37b07c32280a8ecc213874e358a6ff367418556a4542fba7e3c17e4b8e82e05c3a543 psmouse_base.patch
448bad436377a22c93ac401b9aecb504fe8e84b9511a3dd28f3cc125f3725cc1168ef03dee9f8f1085a9fbb7910b9e75cd25a382ccce626b427c8e27f7c17ffc kgsl_iommu_sync_lock.patch"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,70 @@
this fixes:
CC arch/arm/mach-tegra/common.o
/home/user/build/src/android_kernel_boxer8_ouya-aec3c7f7900554ede9cb34559416e3ee74d0bf36/arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address sh
ould use unwind tables" [-Wcpp]
#warning "TODO: return_address should use unwind tables"
^~~~~~~
/home/user/build/src/android_kernel_boxer8_ouya-aec3c7f7900554ede9cb34559416e3ee74d0bf36/arch/arm/kernel/return_address.c:65:7: error: redefinition of 'return_address'
void *return_address(unsigned int level)
^~~~~~~~~~~~~~
In file included from /home/user/build/src/android_kernel_boxer8_ouya-aec3c7f7900554ede9cb34559416e3ee74d0bf36/include/linux/ftrace.h:20:0,
from /home/user/build/src/android_kernel_boxer8_ouya-aec3c7f7900554ede9cb34559416e3ee74d0bf36/arch/arm/kernel/return_address.c:12:
/home/user/build/src/android_kernel_boxer8_ouya-aec3c7f7900554ede9cb34559416e3ee74d0bf36/arch/arm/include/asm/ftrace.h:48:21: note: previous definition of 'return_address' was here
extern inline void *return_address(unsigned int level)
^~~~~~~~~~~~~~
make[3]: *** [/home/user/build/src/android_kernel_boxer8_ouya-aec3c7f7900554ede9cb34559416e3ee74d0bf36/scripts/Makefile.build:305: arch/arm/kernel/return_address.o] Error 1
original commit message:
---
From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
From: Behan Webster <behanw@converseincode.com>
Date: Wed, 24 Sep 2014 01:06:46 +0100
Subject: [PATCH] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). In this case using static inline
and removing the NULL version of return_address in return_address.c does
the right thing.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/include/asm/ftrace.h | 2 +-
arch/arm/kernel/return_address.c | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 39eb16b0066f2..bfe2a2f5a644e 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -45,7 +45,7 @@ void *return_address(unsigned int);
#else
-extern inline void *return_address(unsigned int level)
+static inline void *return_address(unsigned int level)
{
return NULL;
}
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index fafedd86885dd..f6aa84d5b93c9 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -63,11 +63,6 @@ void *return_address(unsigned int level)
#warning "TODO: return_address should use unwind tables"
#endif
-void *return_address(unsigned int level)
-{
- return NULL;
-}
-
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
EXPORT_SYMBOL_GPL(return_address);

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch

View file

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

View file

@ -0,0 +1,40 @@
From 2853d750d5051be484a94406e8614b2fe5fc2d76 Mon Sep 17 00:00:00 2001
From: Chet Kener <Cl3Kener@gmail.com>
Date: Tue, 21 Oct 2014 18:41:36 -0400
Subject: [PATCH] gcc5: gpu: msm: fix 5.0 compile
* 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>
---
drivers/gpu/msm/kgsl_iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c
index f76c95204a2..caf75592a2a 100755
--- a/drivers/gpu/msm/kgsl_iommu.c
+++ b/drivers/gpu/msm/kgsl_iommu.c
@@ -1019,7 +1019,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;
@@ -1089,7 +1089,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;

View file

@ -0,0 +1,106 @@
From ae4fef6fc558b0621532d0de6ebaaeaabe861792 Mon Sep 17 00:00:00 2001
From: sub77 <sub77@ymail.com>
Date: Fri, 31 Jul 2015 17:47:45 +0200
Subject: [PATCH] fix build error: PS2MOUSE fsp_detect & lifebook
---
drivers/input/mouse/psmouse-base.c | 62 +++++++++++++++++++-------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index a19c183557d..ad3d2e861d0 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -708,14 +708,14 @@ static int psmouse_extensions(struct psmouse *psmouse,
/*
* We always check for lifebook because it does not disturb mouse
* (it only checks DMI information).
+ *
+ * if (psmouse_do_detect(lifebook_detect, psmouse, set_properties) == 0) {
+ * if (max_proto > PSMOUSE_IMEX) {
+ * if (!set_properties || lifebook_init(psmouse) == 0)
+ * return PSMOUSE_LIFEBOOK;
+ * }
+ * }
*/
- if (psmouse_do_detect(lifebook_detect, psmouse, set_properties) == 0) {
- if (max_proto > PSMOUSE_IMEX) {
- if (!set_properties || lifebook_init(psmouse) == 0)
- return PSMOUSE_LIFEBOOK;
- }
- }
-
/*
* Try Kensington ThinkingMouse (we try first, because synaptics probe
* upsets the thinkingmouse).
@@ -821,19 +821,19 @@ static int psmouse_extensions(struct psmouse *psmouse,
/*
* Try Finger Sensing Pad. We do it here because its probe upsets
* Trackpoint devices (causing TP_READ_ID command to time out).
- */
- if (max_proto > PSMOUSE_IMEX) {
- if (psmouse_do_detect(fsp_detect,
- psmouse, set_properties) == 0) {
- if (!set_properties || fsp_init(psmouse) == 0)
- return PSMOUSE_FSP;
-/*
+ *
+ * if (max_proto > PSMOUSE_IMEX) {
+ * if (psmouse_do_detect(fsp_detect,
+ * psmouse, set_properties) == 0) {
+ * if (!set_properties || fsp_init(psmouse) == 0)
+ * return PSMOUSE_FSP;
+ *
* Init failed, try basic relative protocols
+ *
+ * max_proto = PSMOUSE_IMEX;
+ * }
+ * }
*/
- max_proto = PSMOUSE_IMEX;
- }
- }
-
/*
* Reset to defaults in case the device got confused by extended
* protocol probes. Note that we follow up with full reset because
@@ -944,12 +944,12 @@ static const struct psmouse_protocol psmouse_protocols[] = {
},
#endif
#ifdef CONFIG_MOUSE_PS2_LIFEBOOK
- {
- .type = PSMOUSE_LIFEBOOK,
- .name = "LBPS/2",
- .alias = "lifebook",
- .init = lifebook_init,
- },
+/* {
+* .type = PSMOUSE_LIFEBOOK,
+* .name = "LBPS/2",
+* .alias = "lifebook",
+* .init = lifebook_init,
+* },*/
#endif
#ifdef CONFIG_MOUSE_PS2_TRACKPOINT
{
@@ -985,13 +985,13 @@ static const struct psmouse_protocol psmouse_protocols[] = {
},
#endif
#ifdef CONFIG_MOUSE_PS2_SENTELIC
- {
- .type = PSMOUSE_FSP,
- .name = "FSPPS/2",
- .alias = "fsp",
- .detect = fsp_detect,
- .init = fsp_init,
- },
+/* {
+* .type = PSMOUSE_FSP,
+* .name = "FSPPS/2",
+* .alias = "fsp",
+* .detect = fsp_detect,
+* .init = fsp_init,
+* },*/
#endif
{
.type = PSMOUSE_CORTRON,

View file

@ -0,0 +1,49 @@
From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
From: Behan Webster <behanw@converseincode.com>
Date: Wed, 24 Sep 2014 01:06:46 +0100
Subject: [PATCH] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). In this case using static inline
and removing the NULL version of return_address in return_address.c does
the right thing.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/include/asm/ftrace.h | 2 +-
arch/arm/kernel/return_address.c | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 39eb16b0066f2..bfe2a2f5a644e 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -45,7 +45,7 @@ void *return_address(unsigned int);
#else
-extern inline void *return_address(unsigned int level)
+static inline void *return_address(unsigned int level)
{
return NULL;
}
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index fafedd86885dd..f6aa84d5b93c9 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -63,11 +63,6 @@ void *return_address(unsigned int level)
#warning "TODO: return_address should use unwind tables"
#endif
-void *return_address(unsigned int level)
-{
- return NULL;
-}
-
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
EXPORT_SYMBOL_GPL(return_address);

View file

@ -0,0 +1,24 @@
pkgname=firmware-htc-ville
pkgver=1
pkgrel=0
pkgdesc="Firmware files for HTC One S (htc-ville)"
url="https://postmarketos.org"
arch="armhf"
license="proprietary"
depends="wcnss-wlan"
options="!check !strip !archcheck"
# source
_commit="264fdb3e9e01c85baa487b057b149262e2df9310"
_repo="android_vendor_htc_ville"
_url="https://github.com/UISS-Dev-Team"
source="$pkgname-$_commit.tar.gz::$_url/$_repo/archive/${_commit}.tar.gz"
package() {
cd "$srcdir/$_repo-$_commit/proprietary/etc/firmware"
find -type f |
while read _i; do
install -D -m644 "$_i" "$pkgdir/lib/firmware/postmarketos/$_i"
done
}
sha512sums="0b03cea2effcdaa1b230e909152ea8fbe79ed3e25f70e22ec7d8797147ff2276958b328f438e49a66c07128f063477d1069e00f90a8fadd7946c58da6838d919 firmware-htc-ville-264fdb3e9e01c85baa487b057b149262e2df9310.tar.gz"