Verified Commit 6159e283 authored by audunmg's avatar audunmg Committed by Alexey Min
Browse files

sony-leo: new device (MR 1190)

Initial effort for sony-leo. It has working touch, screen and
wifi.
parent 1c60afc9
Pipeline #141230676 passed with stages
in 29 minutes and 18 seconds
# use 'weston-calibrator' to calibrate the touchscreen!
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"
# Contributor: Audun MG <audun@gangsto.org>
# Maintainer: Audun MG <audun@gangsto.org>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-sony-leo
pkgdesc="Sony Z3"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base mkbootimg mesa-dri-swrast msm-fb-refresher"
makedepends="devicepkg-dev"
subpackages="
$pkgname-kernel-downstream:kernel_downstream
$pkgname-nonfree-firmware:nonfree_firmware
"
source="deviceinfo
90-android-touch-dev.rules
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
install -D -m644 "$srcdir"/90-android-touch-dev.rules \
"$pkgdir"/etc/udev/rules.d/90-android-touch-dev.rules
}
kernel_downstream() {
pkgdesc="Weston and X.Org with touch and wifi works (see device table for details)"
depends="linux-sony-leo"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
nonfree_firmware() {
pkgdesc="Wifi and touchscreen firmware"
depends="firmware-sony-leo"
mkdir "$subpkgdir"
}
sha512sums="b083a217c39b77a7e5bd8c9500ae5fc115c50bc60a614caca14692d0edd704afe60379e2c51ada694592d8fd11b358acadd2bc3e5eca381b892cc80778ca6105 deviceinfo
0fbbc5ef5b303431a0f1a9b9ef939f03aef6f1774765089102ce95e57dc5edb692c685a6c11adcada40db608998b714029d12a05c9364bd0445ce8fda7bf5fde 90-android-touch-dev.rules"
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Sony Z3"
deviceinfo_manufacturer="Sony"
deviceinfo_codename="sony-leo"
deviceinfo_year="2014"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="1920"
# Bootloader related
deviceinfo_kernel_cmdline="androidboot.hardware=qcom msm_rtb.filter=0x37 ehci-hcd.park=3 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y vmalloc=300M buildvariant=userdebug"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="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"
From a23d549c51e38ad9fc481859326a786bc00baad8 Mon Sep 17 00:00:00 2001
From: Federico Amedeo Izzo <federico.izzo42@gmail.com>
Date: Fri, 22 Mar 2019 19:37:07 +0100
Subject: [PATCH] fix video argb setting
---
drivers/video/msm/mdss/mdss_fb.c | 34 ++++++++++++++++----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
index 835f6fc9687..a598cbd72dc 100644
--- a/drivers/video/msm/mdss/mdss_fb.c
+++ b/drivers/video/msm/mdss/mdss_fb.c
@@ -1767,16 +1767,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;
@@ -1786,16 +1786,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;
@@ -2723,15 +2723,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;
@@ -2821,7 +2821,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;
--
2.21.0
# Contributor: Audun MG <audun@gangsto.org>
# Maintainer: Audun MG <audun@gangsto.org>
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/lineageos_shinano_leo_defconfig
pkgname=linux-sony-leo
pkgver=3.4.113
pkgrel=0
pkgdesc="Sony Z3 LineageOS Kernel"
arch="armv7"
_carch="arm"
_flavor="sony-leo"
url="https://github.com/LineageOS/android_kernel_sony_msm8974"
license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz"
# Source
_repository="android_kernel_sony_msm8974"
_commit="bd06661fef846ee569888a27f3d12db9cf1d8741"
_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
00_fix-video-argb-setting.patch
"
builddir="$srcdir/$_repository-$_commit"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
}
sha512sums="baf5e90b83abd8d9630563144faae13c72df50b9d1867325061f78738e0c6a8b5cbd0086f96359cea79f1cd8cd87aab8f8a8149daca6466ae2c08881c6a57447 linux-sony-leo-bd06661fef846ee569888a27f3d12db9cf1d8741.tar.gz
8bcee38ddffebe1eeccdcea552f0d90ac79447c9cd584c06a37bfcaccbe43dda02123fe05decdfba95bac9fad76e66103dec8f87431515533d5f1cbe46f7e087 config-sony-leo.armv7
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
a48336bbfead6ad0c84d2fce0c40a3f5530aebdff356a6835cceaf59a50a6f860d2f8027703a92927955fbb18857ba78788e010d017bf67730f069b36e96fe87 00_fix-video-argb-setting.patch"
This diff is collapsed.
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
\ No newline at end of file
../../.shared-patches/linux/gcc8-fix-put-user.patch
\ No newline at end of file
pkgname=firmware-sony-leo
pkgver=0.1
pkgrel=0
pkgdesc="Firmware files for Sony Shinano-Leo platform"
url="https://github.com/TheMuppets/proprietary_vendor_sony"
arch="noarch"
license="proprietary"
options="!strip !check !archcheck"
# Source
_files_z3="BCM43xx.hcd touch_module_id_0x96.img"
_files_shinano="fw_bcmdhd.bin fw_bcmdhd_apsta.bin"
_files_msm8974="a330_pfp.fw a330_pm4.fw"
_commit="0bf6c0b23b4cfce921135b2a5fec27d821c50964"
_url="https://github.com/TheMuppets/proprietary_vendor_sony/raw/$_commit"
for _i in $_files_z3; do
source="$source $pkgname-$_commit-$_i::$_url/z3/proprietary/vendor/firmware/$_i"
done
for _i in $_files_msm8974; do
source="$source $pkgname-$_commit-$_i::$_url/msm8974-common/proprietary/vendor/firmware/$_i"
done
for _i in $_files_shinano; do
source="$source $pkgname-$_commit-$_i::$_url/shinano-common/proprietary/vendor/firmware/$_i"
done
package() {
cd "$srcdir"
for _i in $_files_z3; do
install -D -m644 "$pkgname-$_commit-$_i" \
"$pkgdir/lib/firmware/postmarketos/$_i"
done
for _i in $_files_msm8974; do
install -D -m644 "$pkgname-$_commit-$_i" \
"$pkgdir/lib/firmware/postmarketos/$_i"
done
for _i in $_files_shinano; do
install -D -m644 "$pkgname-$_commit-$_i" \
"$pkgdir/lib/firmware/postmarketos/$_i"
done
}
sha512sums="648a6d7fdde54524a678c3b7147093e76ac564e0adf5e14e27c432e359792c70ba54da44148f5f3f52cfe4be09231c964090eeedda6211bc71f398de16212b40 firmware-sony-leo-0bf6c0b23b4cfce921135b2a5fec27d821c50964-BCM43xx.hcd
678b167d1bd15360d3b3cf01f2a6408a7a5f283c383538b1824b852ece9a61f70e729105320acef65908498c2db81d3a4f95b2f77d703432985541b27dd20779 firmware-sony-leo-0bf6c0b23b4cfce921135b2a5fec27d821c50964-touch_module_id_0x96.img
a642584990333d62ba6a985eeaddc6898c37a8e80aabb61121f93a90d5076861eb698422101e7b00706b7d3dfc00f9f358ea5e44a70fda7369931eb58b455931 firmware-sony-leo-0bf6c0b23b4cfce921135b2a5fec27d821c50964-a330_pfp.fw
999e3e0777b8dffc0e0d20b214c8217dab577a31753b6a29af2fae57293693196e992a905265e35a586a7978c04547aa8c88496dbe6f836b74ed39026eaa5f05 firmware-sony-leo-0bf6c0b23b4cfce921135b2a5fec27d821c50964-a330_pm4.fw
066e7a72d556356a10bb367afe4dc984337291b2d7e00ed0d6594092fa2b97e2b0246fa12d37b47bdbd1bbe0f9619a4b9575fc5891f79d4768d91e13a9e51ad5 firmware-sony-leo-0bf6c0b23b4cfce921135b2a5fec27d821c50964-fw_bcmdhd.bin
29031ec0802d90d86005029ca7e645e2898c7e0d34e6d6251215cdfee80c0253ead140ae973a765106c5b2148a11a3dabbf38479a24539bb16320b5cc0062f2c firmware-sony-leo-0bf6c0b23b4cfce921135b2a5fec27d821c50964-fw_bcmdhd_apsta.bin"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment