motorola-titan: fix broken framebuffer, touchscreen and switch to armv7 (!815)
This commit is contained in:
parent
d18a04f7c4
commit
1c46348201
6 changed files with 100 additions and 21 deletions
|
@ -2,10 +2,10 @@
|
|||
# Contributor: Pablo Castellano <pablo@anche.no>
|
||||
pkgname=device-motorola-titan
|
||||
pkgver=1
|
||||
pkgrel=33
|
||||
pkgrel=34
|
||||
pkgdesc="Motorola Moto G 2014"
|
||||
url="https://postmarketos.org"
|
||||
arch="armhf"
|
||||
arch="armv7"
|
||||
license="MIT"
|
||||
depends="postmarketos-base linux-motorola-titan mkbootimg msm-fb-refresher mesa-dri-swrast"
|
||||
makedepends="devicepkg-dev"
|
||||
|
@ -42,7 +42,7 @@ nonfree_firmware() {
|
|||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="1292c8054a9c5c02a04466f9baf9fced8aa9a11a042e018ea7489c5368f135573dc6beb4e28c32adab36e01a7abadd9305fcf3c05e73c31f778d54464f73b78d deviceinfo
|
||||
sha512sums="a56ed08a60d62397e521554fd1de4876a7a2839d2fc7271e37b775f19865f5597e5a7ba5113ab8c5300c9ded03c4762e753d481a4670018631d2c517a8946d9d deviceinfo
|
||||
8406968cd554393ea1e350967c80810d059de2b1d33ea1302e265780c1f0110d64cf15a68c2f374981a88906d0317315e0a71995c85fd5eaf93bb47ed427529c 90-android-touch-dev.rules
|
||||
d04013c17caf77a87ebea167dbe48f7efa9c9d3123c5743d359f3ea8ccc6b268fa021535a4bf8291eb4a352f0c92f6eb527da0db340421f53bc1cc439a453306 profile.sh
|
||||
86a0c08720225e4532f797ad69307dfff66867e4a35de1aacceefc48f19721caf93f9a17a268e58f1f5a7e947f157d6984676837c2b5b835b0caf6ee9821bb5a weston.ini"
|
||||
|
|
|
@ -11,11 +11,12 @@ deviceinfo_dtb=""
|
|||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_arch="armhf"
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Splash screen
|
||||
deviceinfo_screen_width="720"
|
||||
deviceinfo_screen_height="1280"
|
||||
deviceinfo_dev_touchscreen="/dev/input/event4"
|
||||
|
||||
# Fastboot related
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
|
|
79
device/linux-motorola-titan/06_fix_mdss_fb_rgba_mode.patch
Normal file
79
device/linux-motorola-titan/06_fix_mdss_fb_rgba_mode.patch
Normal file
|
@ -0,0 +1,79 @@
|
|||
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
|
||||
index 0d481980..8b686f47 100644
|
||||
--- a/drivers/video/msm/mdss/mdss_fb.c
|
||||
+++ b/drivers/video/msm/mdss/mdss_fb.c
|
||||
@@ -1461,16 +1461,16 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
|
||||
fix->xpanstep = 1;
|
||||
fix->ypanstep = 1;
|
||||
var->vmode = FB_VMODE_NONINTERLACED;
|
||||
- var->blue.offset = 0;
|
||||
- var->green.offset = 8;
|
||||
- var->red.offset = 16;
|
||||
+ var->blue.offset = 24;
|
||||
+ var->green.offset = 16;
|
||||
+ var->red.offset = 8;
|
||||
var->blue.length = 8;
|
||||
var->green.length = 8;
|
||||
var->red.length = 8;
|
||||
var->blue.msb_right = 0;
|
||||
var->green.msb_right = 0;
|
||||
var->red.msb_right = 0;
|
||||
- var->transp.offset = 24;
|
||||
+ var->transp.offset = 0;
|
||||
var->transp.length = 8;
|
||||
bpp = 4;
|
||||
break;
|
||||
@@ -1480,16 +1480,16 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
|
||||
fix->xpanstep = 1;
|
||||
fix->ypanstep = 1;
|
||||
var->vmode = FB_VMODE_NONINTERLACED;
|
||||
- var->blue.offset = 8;
|
||||
- var->green.offset = 16;
|
||||
- var->red.offset = 24;
|
||||
+ var->blue.offset = 16;
|
||||
+ var->green.offset = 8;
|
||||
+ var->red.offset = 0;
|
||||
var->blue.length = 8;
|
||||
var->green.length = 8;
|
||||
var->red.length = 8;
|
||||
var->blue.msb_right = 0;
|
||||
var->green.msb_right = 0;
|
||||
var->red.msb_right = 0;
|
||||
- var->transp.offset = 0;
|
||||
+ var->transp.offset = 24;
|
||||
var->transp.length = 8;
|
||||
bpp = 4;
|
||||
break;
|
||||
@@ -2226,15 +2226,15 @@ static int mdss_fb_check_var(struct fb_var_screeninfo *var,
|
||||
/* Figure out if the user meant RGBA or ARGB
|
||||
and verify the position of the RGB components */
|
||||
|
||||
- if (var->transp.offset == 24) {
|
||||
- if ((var->blue.offset != 0) ||
|
||||
- (var->green.offset != 8) ||
|
||||
- (var->red.offset != 16))
|
||||
- return -EINVAL;
|
||||
- } else if (var->transp.offset == 0) {
|
||||
- if ((var->blue.offset != 8) ||
|
||||
+ if (var->transp.offset == 0) {
|
||||
+ if ((var->blue.offset != 24) ||
|
||||
(var->green.offset != 16) ||
|
||||
- (var->red.offset != 24))
|
||||
+ (var->red.offset != 8))
|
||||
+ return -EINVAL;
|
||||
+ } else if (var->transp.offset == 24) {
|
||||
+ if ((var->blue.offset != 16) ||
|
||||
+ (var->green.offset != 8) ||
|
||||
+ (var->red.offset != 0))
|
||||
return -EINVAL;
|
||||
} else
|
||||
return -EINVAL;
|
||||
@@ -2324,7 +2324,7 @@ static int mdss_fb_set_par(struct fb_info *info)
|
||||
break;
|
||||
|
||||
case 32:
|
||||
- if (var->transp.offset == 24)
|
||||
+ if (var->transp.offset == 0)
|
||||
mfd->fb_imgType = MDP_ARGB_8888;
|
||||
else
|
||||
mfd->fb_imgType = MDP_RGBA_8888;
|
|
@ -17,35 +17,33 @@
|
|||
_vendor=motorola
|
||||
_flavor=motorola-titan
|
||||
_commit="22bc4ed7f4149f95c84634e6c1baccbbd16c5cc5"
|
||||
_config="config-${_flavor}.armhf"
|
||||
_config="config-$_flavor.armv7"
|
||||
|
||||
pkgname=linux-${_flavor}
|
||||
pkgname=linux-$_flavor
|
||||
pkgver=3.4.113
|
||||
case $pkgver in
|
||||
*.*.*) _kernver=${pkgver%.*};;
|
||||
*.*) _kernver=$pkgver;;
|
||||
esac
|
||||
pkgrel=11
|
||||
arch="armhf"
|
||||
pkgrel=12
|
||||
arch="armv7"
|
||||
pkgdesc="Motorola Moto G 2014 kernel from LineageOS"
|
||||
url="https://github.com/LineageOS/android_kernel_motorola_msm8226"
|
||||
depends=""
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6 dtbtool"
|
||||
options="!strip !check !tracedeps"
|
||||
install=
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/android_kernel_motorola_msm8226/archive/${_commit}.tar.gz
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/android_kernel_motorola_msm8226/archive/$_commit.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
00_fix_return_address.patch
|
||||
02_mdss_fb_refresh_rate.patch
|
||||
06_fix_mdss_fb_rgba_mode.patch
|
||||
multiple-fixes-gcc-5.patch
|
||||
Wno-error.patch
|
||||
"
|
||||
subpackages=""
|
||||
license="GPL2"
|
||||
license="GPL-2.0-only"
|
||||
|
||||
_abi_release=${pkgver}
|
||||
_abi_release=$pkgver
|
||||
_carch="arm"
|
||||
|
||||
# Compiler: this kernel was only tested with GCC6. Feel free to make a merge
|
||||
|
@ -57,11 +55,11 @@ if [ "${CC:0:5}" != "gcc6-" ]; then
|
|||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
ksrcdir="$srcdir/android_kernel_motorola_msm8226-${_commit}"
|
||||
_ksrcdir="$srcdir/android_kernel_motorola_msm8226-$_commit"
|
||||
|
||||
prepare() {
|
||||
local _patch_failed=
|
||||
cd "$ksrcdir"
|
||||
cd "$_ksrcdir"
|
||||
|
||||
# first apply patches in specified order
|
||||
for i in $source; do
|
||||
|
@ -83,11 +81,11 @@ prepare() {
|
|||
fi
|
||||
|
||||
# gcc6 support
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$_ksrcdir/include/linux/"
|
||||
|
||||
mkdir -p "$srcdir"/build
|
||||
cp "$srcdir"/$_config "$srcdir"/build/.config
|
||||
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||||
make -C "$_ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||||
silentoldconfig
|
||||
}
|
||||
|
||||
|
@ -115,9 +113,10 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="5e55db19f198fadf0f914c2726c034eeaf9a1f4ad5823a7e8a4e9be2664eb0279c91fb2f1c6a9292be2ac523e367551475ff40569676775a03a709ae50a3d0ec linux-motorola-titan-22bc4ed7f4149f95c84634e6c1baccbbd16c5cc5.tar.gz
|
||||
6c5ed99876f44746262d93f158c91377cb4b003f0abcd4226510bec10c7f571479dd3c7165602fd58ca54113cbab512899c819b0022c8d1dda94be3cba8f45ea config-motorola-titan.armhf
|
||||
6c5ed99876f44746262d93f158c91377cb4b003f0abcd4226510bec10c7f571479dd3c7165602fd58ca54113cbab512899c819b0022c8d1dda94be3cba8f45ea config-motorola-titan.armv7
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00_fix_return_address.patch
|
||||
a8c955bf718f155011e980f3d0948be98e1fee5649f418299a4851780543019daf7afa406aa7b0829375645107e4e6fbf241026b0cabe2b2ac895a47df83d2d8 02_mdss_fb_refresh_rate.patch
|
||||
5f0c30fc48fd0c8f9ca4e3d929dd15e982565e91b2e9e6b81df88c78c7fb646d3e99dfd6c9e02873caa1ca1e9cd6a7c03b97640fb80781cc78f5725122b65507 06_fix_mdss_fb_rgba_mode.patch
|
||||
4c13711fdcdce3ac0c4d30b79da7a331a9f32d46ad0b9572419b82d58db6eed76f728a340848d66a6378702749c56247439abb26fc1df0d3f5cfd1ef5b53acf9 multiple-fixes-gcc-5.patch
|
||||
d77966385f1aeb17fad6c3989766e874fea9d5818433d0c92c106dfd9aa3065102f018afb38678b0d741192d9efa4ede0ac4278802bf0878e3dec62dec64f50c Wno-error.patch"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Contributor: Pablo Castellano <pablo@anche.no>
|
||||
pkgname=firmware-motorola-titan
|
||||
pkgver=1
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
_commit="ac0d15c78cc705c9a76506e6f761cd006018d7bd"
|
||||
pkgdesc="Firmware files for Motorola Moto G 2014 (titan) and Moto G 4G 2013 (peregrine)"
|
||||
url="https://postmarketos.org"
|
||||
arch="armhf"
|
||||
arch="armv7"
|
||||
license="proprietary"
|
||||
depends="wcnss-wlan"
|
||||
source="$pkgname-$_commit.tar.gz::https://github.com/PabloCastellano/vendor_motorola_titan/archive/$_commit.tar.gz"
|
||||
|
|
Loading…
Reference in a new issue