sony-ivy: new device (MR 2864)

[ci:skip-build] already built successfully in CI
This commit is contained in:
MollySophia 2022-01-19 23:05:27 -08:00 committed by Clayton Craft
parent 680b4c2b50
commit 8eab5f8b16
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A
16 changed files with 4403 additions and 0 deletions

View file

@ -0,0 +1,8 @@
# udev rules file
# All device names can be read from weston's logfile
# Touchscreen (use 'weston-calibrator' to calibrate)
SUBSYSTEM=="input", ATTRS{name}=="clearpad", \
ENV{ID_INPUT}="1", ENV{ID_INPUT_TOUCHSCREEN}="1" \
ENV{WL_CALIBRATION}="1.013786 0.035310 -24.920929 -0.008370 0.990421 12.094299"

View file

@ -0,0 +1,38 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-sony-ivy
pkgdesc="Sony Xperia Z3+"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base linux-sony-ivy mkbootimg mesa-dri-swrast mkbootimg msm-fb-refresher"
makedepends="devicepkg-dev"
source="
deviceinfo
90-android-touch-dev.rules
"
subpackages="
$pkgname-nonfree-firmware:nonfree_firmware
"
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
}
nonfree_firmware() {
pkgdesc="Wifi firmware"
depends="firmware-sony-ivy"
mkdir "$subpkgdir"
}
sha512sums="
6a94362c20b33810c489057b2c12fdea4fe214739d87311d971facc41ce23fdf9fd5577e07467c6084eb277a06bc8a06c8b927fa014b1408d6bd7e76a8cacf29 deviceinfo
8b6034c0338ab4c7d648f47983aad6da07e427e7dba47baabf85a1b3ddeeda47c8d7fbcd547a302c9a759b2943ee30d3e82c3b368d8582833a058e4671638a9e 90-android-touch-dev.rules
"

View file

@ -0,0 +1,30 @@
# 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 Xperia Z3+"
deviceinfo_manufacturer="Sony"
deviceinfo_codename="sony-ivy"
deviceinfo_year="2015"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="false"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="1920"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 boot_cpus=0-5 zram.backend=z3fold coherent_pool=2M dwc3_msm.prop_chg_detect=Y dwc3_msm.hvdcp_max_current=1500 buildvariant=userdebug enforcing=0 androidboot.selinux=permissive 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="0x00000000"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_pagesize="4096"
deviceinfo_chassis="handset"

View file

@ -0,0 +1,62 @@
pkgname=firmware-sony-ivy
pkgver=1
pkgrel=0
pkgdesc="Sony Xperia Z3+ Firmware"
url="https://github.com/TheMuppets/proprietary_vendor_sony"
arch="aarch64"
license="proprietary"
_commit="fd7901fc26c1aee86a776a78f745f161f1d9db93"
options="!check !strip !tracedeps pmb:cross-native"
# Source
source="
ivy-fw_bcmdhd.bin::https://github.com/TheMuppets/proprietary_vendor_sony/raw/$_commit/ivy/proprietary/etc/firmware/wlan/bcmdhd/fw_bcmdhd.bin
wlan_macaddr0
wlan_txpower_2_4g
wlan_txpower_5g_low
wlan_txpower_5g_mid
wlan_txpower_5g_high
wlan_txpower_co1_2_4g
wlan_txpower_co1_5g_high
wlan_txpower_co1_5g_mid
wlan_txpower_co1_5g_low
ivy-bcmdhd.cal::https://raw.githubusercontent.com/sonyxperiadev/device-sony-ivy/master/rootdir/system/etc/wifi/bcmdhd.cal
"
package() {
# Wifi
mkdir -p "$pkgdir"/lib/firmware/postmarketos/bcmdhd/bcm4356/
install -Dm644 "$srcdir/ivy-fw_bcmdhd.bin" "$pkgdir/lib/firmware/postmarketos/bcmdhd/bcm4356/fw_bcm4356.bin"
install -D -m644 "$srcdir"/wlan_macaddr0 \
"$pkgdir"/etc/wlan_macaddr0
install -D -m644 "$srcdir"/wlan_txpower_2_4g \
"$pkgdir"/etc/wlan_txpower_2_4g
install -D -m644 "$srcdir"/wlan_txpower_5g_low \
"$pkgdir"/etc/wlan_txpower_5g_low
install -D -m644 "$srcdir"/wlan_txpower_5g_mid \
"$pkgdir"/etc/wlan_txpower_5g_mid
install -D -m644 "$srcdir"/wlan_txpower_5g_high \
"$pkgdir"/etc/wlan_txpower_5g_high
install -D -m644 "$srcdir"/wlan_txpower_co1_2_4g \
"$pkgdir"/etc/wlan_txpower_co1_2_4g
install -D -m644 "$srcdir"/wlan_txpower_co1_5g_high \
"$pkgdir"/etc/wlan_txpower_co1_5g_high
install -D -m644 "$srcdir"/wlan_txpower_co1_5g_low \
"$pkgdir"/etc/wlan_txpower_co1_5g_low
install -D -m644 "$srcdir"/wlan_txpower_co1_5g_mid \
"$pkgdir"/etc/wlan_txpower_co1_5g_mid
install -D -m644 "$srcdir"/ivy-bcmdhd.cal \
"$pkgdir"/etc/wifi/bcmdhd.cal
}
sha512sums="
79c00d624e40b96a8364bce9bdcda008346cada539f99a76c48b8294b12dcd20cbbe4def002ee02138ad3a08bb5c0df3b04548a75249334342da7c3cadd8a55e ivy-fw_bcmdhd.bin
b4ab2443b7a2e661f1a2b02788336e8dcf9b0052559fc52848b42f039b03fb57cf600a094bc30fe02b366ac7c4d6ba389107ab946cb89fff9dcbe6181494fdd2 wlan_macaddr0
764e4556b8d604280c860282198eb94a179f27992d986784408370d20452c5ccfa5fa36fb6395e0176db902e05fac56c03ca38171cc32892352d40475d8465c0 wlan_txpower_2_4g
b398cca4ddb0c1c45bb2da734d7547fa3637e89be6257acdd57b22e7b94cdff51574af2edc37cd0a9cf196cc3d54c58d8ad21dd3e2cb8bfc03585e21f8c5b818 wlan_txpower_5g_low
b398cca4ddb0c1c45bb2da734d7547fa3637e89be6257acdd57b22e7b94cdff51574af2edc37cd0a9cf196cc3d54c58d8ad21dd3e2cb8bfc03585e21f8c5b818 wlan_txpower_5g_mid
b398cca4ddb0c1c45bb2da734d7547fa3637e89be6257acdd57b22e7b94cdff51574af2edc37cd0a9cf196cc3d54c58d8ad21dd3e2cb8bfc03585e21f8c5b818 wlan_txpower_5g_high
783aa7d829249ae1521882ec48e9b7978818aca44046ca9f8dd96994873dc317c0723df4c5a72486312f40a007eae382149edc13e8ebecf3637cd1f388337a2e wlan_txpower_co1_2_4g
b398cca4ddb0c1c45bb2da734d7547fa3637e89be6257acdd57b22e7b94cdff51574af2edc37cd0a9cf196cc3d54c58d8ad21dd3e2cb8bfc03585e21f8c5b818 wlan_txpower_co1_5g_high
b398cca4ddb0c1c45bb2da734d7547fa3637e89be6257acdd57b22e7b94cdff51574af2edc37cd0a9cf196cc3d54c58d8ad21dd3e2cb8bfc03585e21f8c5b818 wlan_txpower_co1_5g_mid
b398cca4ddb0c1c45bb2da734d7547fa3637e89be6257acdd57b22e7b94cdff51574af2edc37cd0a9cf196cc3d54c58d8ad21dd3e2cb8bfc03585e21f8c5b818 wlan_txpower_co1_5g_low
80c62a8fcd4d00ce35b859e12b2b8d9d0b8f0154f3bffb8bc8c329c1ddea5a790f341a7ebcc991ae1a74bd363511063ecd0baba2a5af811ebf004819ac7cd795 ivy-bcmdhd.cal
"

View file

@ -0,0 +1 @@
00:00:00:00:00:00

View file

@ -0,0 +1 @@
50:-100:-100:0:0:0:0

View file

@ -0,0 +1 @@
0:0:0:0:0:0:0

View file

@ -0,0 +1 @@
0:0:0:0:0:0:0

View file

@ -0,0 +1 @@
0:0:0:0:0:0:0

View file

@ -0,0 +1 @@
0:-150:-100:0:0:0:0

View file

@ -0,0 +1 @@
0:0:0:0:0:0:0

View file

@ -0,0 +1 @@
0:0:0:0:0:0:0

View file

@ -0,0 +1 @@
0:0:0:0:0:0:0

View file

@ -0,0 +1,52 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/kitakami-ivy-defconfig
pkgname=linux-sony-ivy
pkgver=3.10.84
pkgrel=0
pkgdesc="Sony Xperia Z3+ kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="sony-ivy"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="gcc4 linux-headers lz4 bash bc bison devicepkg-dev flex openssl-dev perl"
# Compiler: GCC 4 (doesn't boot when compiled with newer versions)
if [ "${CC:0:5}" != "gcc4-" ]; then
CC="gcc4-$CC"
HOSTCC="gcc4-gcc"
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_sony_msm8994"
_commit="0c7176b039b6deeecdd31ceea97b39910393a563"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
$_config
gcc10-extern_YYLOC_global_declaration.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="
789e9abdc5fd7e93ef3a80e332d045302f699adcef1e69c56a9798ac4cea01c9853170bfaf03ac7603f1f2d970cb723ced430a85b03dc602eab14a8a9876cb75 linux-sony-ivy-0c7176b039b6deeecdd31ceea97b39910393a563.tar.gz
5d7dd8b739525a8f0a4c53092bd1e377a3e418c1e6c74e044bd7829f09b24520925c973ba49a21461541b49de80e878cf6bad778947983cc8921e808299141e8 config-sony-ivy.aarch64
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch