xiaomi-rolex: new device (MR 1911)

Based on !1158 by @nrdnandan (5 files)
new file: device/testing/device-xiaomi-rolex/APKBUILD
new file: device/testing/device-xiaomi-rolex/deviceinfo
new file: device/testing/linux-xiaomi-rolex/APKBUILD
new file: device/testing/linux-xiaomi-rolex/config-xiaomi-rolex.aarch64
new file: firmware/firmware-xiaomi-rolex/APKBUILD

Changed deviceinfo : Width x Height was 800x600 to correct dimension -> 720x1280

modified: device/testing/device-xiaomi-rolex/APKBUILD
modified: device/testing/device-xiaomi-rolex/deviceinfo

Added directfbrc and fb.modes file. Also added SWAP file support swap_size=1024

Added Audio files and rules removed uneccessary lines in deviceinfo.

device/xiaomi-rolex: Fix linting issues

xiaomi-rolex: Linting fixes; is a handset

xiaomi-rolex: Moved firmware/ to device/testing/

xiaomi-rolex: Enable pmb:cross-native for kernel compilation
because it is the default for recent apkbuilds

xiaomi-rolex: Apply YYLOC patch to build 3.18.140 with gcc-10 (-fno-common)

xiaomi-rolex: update patch checksums in kernel APKBUILD

xiaomi-rolex: update deviceinfo checksum; replace common patch with a symlink

xiaomi-rolex: use mdss patch

xiaomi-rolex: use BGRA mdss framebuffer patch

xiaomi-rolex: mark myself as maintainer, drop contributor from apkbuilds
Refer to git commit history instead to determine contributors

xiaomi-rolex: update kernel config for multiple devpts

xiaomi-rolex: allow firmware cross-native builds, disable tracedeps per linter

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Denis Tolstov 2021-12-08 22:13:59 +03:00 committed by Newbyte
parent 6a40c2392d
commit e30bcfc5ff
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
13 changed files with 5378 additions and 0 deletions

View file

@ -0,0 +1,46 @@
# Maintainer: Denis Tolstov <tolstov_den@mail.ru>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-xiaomi-rolex
pkgdesc="Xiaomi Redmi 4A"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base linux-xiaomi-rolex mkbootimg mesa-dri-swrast mdss-fb-init-hack msm-fb-refresher"
makedepends="devicepkg-dev"
source="deviceinfo directfbrc fb.modes ucm/90-device-xiaomi-rolex-audio.rules ucm/HiFi ucm/msm8917-sku7-snd-card.conf"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
install -Dm644 "$srcdir"/fb.modes "$pkgdir"/etc/fb.modes
install -Dm644 "$srcdir"/directfbrc "$pkgdir"/etc/directfbrc
}
nonfree_firmware() {
pkgdesc="Wifi firmware,Audio DSP Firmware"
depends="firmware-xiaomi-rolex wcnss-wlan adsp-audio pulseaudio pulseaudio-alsa alsa-plugins-pulse alsa-utils"
mkdir "$subpkgdir"
# Install UCM files for rolex
install -Dm644 "$srcdir"/HiFi \
"$subpkgdir"/usr/share/alsa/ucm2/msm8917-sku7-snd-card/HiFi
install -Dm644 "$srcdir"/msm8917-sku7-snd-card.conf \
"$subpkgdir"/usr/share/alsa/ucm2/msm8917-sku7-snd-card/msm8917-sku7-snd-card.conf
install -Dm644 "$srcdir"/90-device-xiaomi-rolex-audio.rules \
"$subpkgdir"/etc/udev/rules.d/90-device-xiaomi-rolex-audio.rules
}
sha512sums="05cca120734c3b61d68498f21b7849644c662c66008634670044251bdf7a596b686a8df67ab0d8f228e23882d455a8397a2d709b879bee620a876c6abee9253c deviceinfo
3db3ec596e159be926ea2b5b2496c18e9bc7be24a64a232a56c89a0c9ee710aa2efb2b6fa9fc08efa34759e8242e6c629d08a4ce688ec8aa125830717c191515 directfbrc
024d11176fbd19f98746317b098d0b54236166aa66155cc68ad75a7ce8335999a1a14ed2efc93f9ac4e05fbc787d8bad793efccf813db81aa48fffd1850ec24e fb.modes
89be68680649f7a60b7fb7e5b5f593f60b9be4ca8fa76e90e2be02466add9af7d944f6c1fabed15876bdd7348b15bd1c63d754131ffffea4f0f4641d2d9a847c 90-device-xiaomi-rolex-audio.rules
749e4e1429b457b494157a7c370d9e03af7c8e979fed55863dc22d4ac3602c4cfc3740f2b4b320bcbbe1c078d6df6a456cbf0f5cbc281003f9283b3d9df353c8 HiFi
e31645c0f2c04da28f4f1a81ca7563c70e971080a1a54b22413d420a8110636433aeb0ad5d265fde57b7bc87dd6b7cf3158c7aa1d8b36d2d1238299877b98b49 msm8917-sku7-snd-card.conf"

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="Xiaomi Redmi 4A"
deviceinfo_manufacturer="Xiaomi"
deviceinfo_codename="xiaomi-rolex"
deviceinfo_year="2016"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1280"
deviceinfo_swap_size_recommended="1024"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.usbconfigfs=false androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78B0000 androidboot.selinux=permissive loop.max_part=7 buildvariant=userdebug"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"

View file

@ -0,0 +1 @@
pixelformat=ARGB

View file

@ -0,0 +1,8 @@
mode "720x1280-60"
# D: 98.542 MHz, H: 80.706 kHz, V: 60.004 Hz
geometry 720 1280 720 1280 16
timings 10148 241 240 28 35 20 2
accel false
rgba 8/0,8/8,8/16,8/24
endmode

View file

@ -0,0 +1,9 @@
# This udev rule is a workaround, udev doesn't care about the headphone jack input events :(
# We need a better workaround, perhaps a daemon for jack detection?
# Init
ATTRS{id}=="msm8917sku7sndc", RUN+="/usr/bin/alsaucm -c msm8917-sku7-snd-card set _verb HiFi set _enadev Speaker"
# Jack detection
SUBSYSTEM=="switch",ATTRS{state}=="[1-4]",RUN+="/usr/bin/alsaucm -c msm8917-sku7-snd-card set _verb HiFi set _enadev Headphones"
SUBSYSTEM=="switch",ATTRS{state}=="0",RUN+="/usr/bin/alsaucm -c msm8917-sku7-snd-card set _verb HiFi set _enadev Speaker"

View file

@ -0,0 +1,187 @@
SectionVerb {
EnableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
]
DisableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
]
Value {
TQ "HiFi"
PlaybackPCM "hw:msm8917sku7sndc,0"
CapturePCM "hw:msm8917sku7sndc,0"
}
}
SectionDevice."Speaker" {
Comment "Internal speaker"
EnableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='MI2S_RX Channels' One"
cset "name='RX2 MIX1 INP1' RX2"
cset "name='RDAC2 MUX' RX2"
cset "name='HPHR' Switch"
cset "name='Lineout_1 amp' ENABLE"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
]
DisableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='MI2S_RX Channels' One"
cset "name='RX2 MIX1 INP1' ZERO"
cset "name='RDAC2 MUX' ZERO"
cset "name='HPHR' ZERO"
cset "name='Lineout_1 amp' DISABLE"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
]
Value {
PlaybackChannels "2"
PlaybackPriority 300
}
}
SectionDevice."Headphones" {
Comment "Headset"
EnableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='MI2S_RX Channels' Two"
cset "name='RX1 MIX1 INP1' RX1"
cset "name='RX2 MIX1 INP1' RX2"
cset "name='RDAC2 MUX' RX2"
cset "name='HPHL' Switch"
cset "name='HPHR' Switch"
cset "name='headset amp' ENABLE"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
]
DisableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='MI2S_RX Channels' One"
cset "name='RX1 MIX1 INP1' ZERO"
cset "name='RX2 MIX1 INP1' ZERO"
cset "name='RDAC2 MUX' ZERO"
cset "name='HPHL' ZERO"
cset "name='HPHR' ZERO"
cset "name='headset amp' DISABLE"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
]
Value {
PlaybackChannels "2"
PlaybackPriority 100
}
}
SectionDevice."Handset" {
Comment "Earpiece speaker"
EnableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='RX1 MIX1 INP1' RX1"
cset "name='RDAC2 MUX' RX1"
cset "name='RX1 Digital Volume' 86"
cset "name='EAR PA Gain' POS_6_DB"
cset "name='EAR_S' Switch"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
]
DisableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='RX1 MIX1 INP1' ZERO"
cset "name='RDAC2 MUX' ZERO"
cset "name='RX1 Digital Volume' 86"
cset "name='EAR PA Gain' POS_6_DB"
cset "name='EAR_S' ZERO"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
]
Value {
PlaybackChannels "2"
PlaybackPriority 200
}
}
SectionDevice."HandsetMic" {
Comment "Internal Microphone"
ConflictingDevice [
"HeadsetMic"
]
EnableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='ADC1 Volume' 6"
cset "name='DEC1 MUX' ADC1"
cset "name='IIR1 INP1 MUX' DEC1"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
]
DisableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='ADC1 Volume' 4"
cset "name='DEC1 MUX' ZERO"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
]
Value {
CapturePriority 500
CaptureChannels "2"
}
}
SectionDevice."HeadsetMic" {
Comment "Headset Microphone"
ConflictingDevice [
"HandsetMic"
]
EnableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='ADC2 Volume' 6"
cset "name='DEC1 MUX' ADC2"
cset "name='ADC2 MUX' INP2"
cset "name='IIR1 INP1 MUX' DEC1"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
]
DisableSequence [
cdev "hw:msm8917sku7sndc"
cset "name='ADC2 Volume' 4"
cset "name='DEC1 MUX' ZERO"
cset "name='ADC2 MUX' ZERO"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
]
Value {
CapturePriority 100
CaptureChannels "2"
}
}

View file

@ -0,0 +1,171 @@
Syntax 2
SectionUseCase."HiFi" {
File "HiFi"
}
SectionDefaults [
cdev "hw:msm8917sku7sndc"
cset "name='TTY Mode' Off"
cset "name='RX1 Digital Volume' 86"
cset "name='RX2 Digital Volume' 84"
cset "name='RX3 Digital Volume' 84"
cset "name='IIR1 INP1 Volume' 84"
cset "name='IIR1 INP2 Volume' 84"
cset "name='IIR1 INP3 Volume' 84"
cset "name='IIR1 INP4 Volume' 84"
cset "name='ADC1 Volume' 4"
cset "name='ADC2 Volume' 4"
cset "name='ADC3 Volume' 4"
cset "name='DEC1 Volume' 84"
cset "name='DEC2 Volume' 84"
cset "name='DEC2 MUX' ZERO"
cset "name='DEC1 MUX' ZERO"
cset "name='ADC2 MUX' ZERO"
cset "name='RDAC2 MUX' ZERO"
cset "name='RX2 MIX2 INP1' ZERO"
cset "name='RX1 MIX2 INP1' ZERO"
cset "name='RX3 MIX1 INP2' ZERO"
cset "name='RX3 MIX1 INP1' ZERO"
cset "name='RX2 MIX1 INP2' ZERO"
cset "name='RX2 MIX1 INP1' ZERO"
cset "name='RX1 MIX1 INP2' ZERO"
cset "name='RX1 MIX1 INP1' ZERO"
cset "name='EAR_S' ZERO"
cset "name='HPHL' ZERO"
cset "name='HPHR' ZERO"
cset "name='Lineout_1 amp' DISABLE"
cset "name='headset amp' DISABLE"
cset "name='SPK' ZERO"
cset "name='WSA Spk Switch' ZERO"
cset "name='EAR PA Gain' POS_6_DB"
cset "name='EAR PA Boost' ENABLE"
cset "name='EAR PA Gain' POS_1P5_DB"
cset "name='EAR PA Boost' ENABLE"
cset "name='MI2S_RX Channels' One"
cset "name='MI2S_TX Channels' One"
cset "name='PRI_MI2S_RX_DL_HL Switch' 0"
cset "name='PRI_MI2S_RX_VI_FB_MUX' ZERO"
cset "name='DEC3 MUX' ZERO"
cset "name='DEC4 MUX' ZERO"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
cset "name='INTERNAL_BT_SCO_RX Audio Mixer MultiMedia1' 0"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia3' 0"
cset "name='INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3' 0"
cset "name='AFE_PCM_RX Audio Mixer MultiMedia3' 0"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia4' 0"
cset "name='INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4' 0"
cset "name='AFE_PCM_RX Audio Mixer MultiMedia4' 0"
cset "name='INTERNAL_FM_RX Audio Mixer MultiMedia4' 0"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia5' 0"
cset "name='INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5' 0"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
cset "name='MultiMedia5 Mixer TERT_MI2S_TX' 0"
cset "name='MultiMedia1 Mixer INTERNAL_BT_SCO_TX' 0"
cset "name='PRI_MI2S_RX_Voice Mixer CSVoice' 0"
cset "name='Voice_Tx Mixer TERT_MI2S_TX_Voice' 0"
cset "name='Internal BTSCO SampleRate' BTSCO_RATE_8KHZ"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer CSVoice' 0"
cset "name='Voice_Tx Mixer INTERNAL_BT_SCO_TX_Voice' 0"
cset "name='MultiMedia6 Mixer TERT_MI2S_TX' 0"
cset "name='PRI_MI2S_RX_Voice Mixer Voice2' 0"
cset "name='Voice2_Tx Mixer TERT_MI2S_TX_Voice2' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer Voice2' 0"
cset "name='Voice2_Tx Mixer INTERNAL_BT_SCO_TX_Voice2' 0"
cset "name='AFE_PCM_RX_Voice Mixer Voice2' 0"
cset "name='Voice2_Tx Mixer AFE_PCM_TX_Voice2' 0"
cset "name='PRI_MI2S_RX_Voice Mixer VoLTE' 0"
cset "name='VoLTE_Tx Mixer TERT_MI2S_TX_VoLTE' 0"
cset "name='HDMI_RX_Voice Mixer VoLTE' 0"
cset "name='VoLTE_Tx Mixer SLIM_0_TX_VoLTE' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer VoLTE' 0"
cset "name='VoLTE_Tx Mixer INTERNAL_BT_SCO_TX_VoLTE' 0"
cset "name='AFE_PCM_RX_Voice Mixer VoLTE' 0"
cset "name='VoLTE_Tx Mixer AFE_PCM_TX_VoLTE' 0"
cset "name='PRI_MI2S_RX_Voice Mixer VoWLAN' 0"
cset "name='VoWLAN_Tx Mixer TERT_MI2S_TX_VoWLAN' 0"
cset "name='HDMI_RX_Voice Mixer VoWLAN' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer VoWLAN' 0"
cset "name='VoWLAN_Tx Mixer INTERNAL_BT_SCO_TX_VoWLAN' 0"
cset "name='AFE_PCM_RX_Voice Mixer VoWLAN' 0"
cset "name='VoWLAN_Tx Mixer AFE_PCM_TX_VoWLAN' 0"
cset "name='PRI_MI2S_RX_Voice Mixer VoiceMMode1' 0"
cset "name='VoiceMMode1_Tx Mixer TERT_MI2S_TX_MMode1' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer VoiceMMode1' 0"
cset "name='VoiceMMode1_Tx Mixer INT_BT_SCO_TX_MMode1' 0"
cset "name='AFE_PCM_RX_Voice Mixer VoiceMMode1' 0"
cset "name='VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1' 0"
cset "name='PRI_MI2S_RX_Voice Mixer VoiceMMode2' 0"
cset "name='VoiceMMode2_Tx Mixer TERT_MI2S_TX_MMode2' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer VoiceMMode2' 0"
cset "name='VoiceMMode2_Tx Mixer INT_BT_SCO_TX_MMode2' 0"
cset "name='AFE_PCM_RX_Voice Mixer VoiceMMode2' 0"
cset "name='VoiceMMode2_Tx Mixer AFE_PCM_TX_MMode2' 0"
cset "name='PRI_MI2S_RX_Voice Mixer Voip' 0"
cset "name='Voip_Tx Mixer TERT_MI2S_TX_Voip' 0"
cset "name='Internal BTSCO SampleRate' BTSCO_RATE_8KHZ"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer Voip' 0"
cset "name='Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip' 0"
cset "name='PRI_MI2S_RX_Voice Mixer VoiceMMode1' 0"
cset "name='VoiceMMode1_Tx Mixer TERT_MI2S_TX_MMode1' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer VoiceMMode1' 0"
cset "name='VoiceMMode1_Tx Mixer INT_BT_SCO_TX_MMode1' 0"
cset "name='AFE_PCM_RX_Voice Mixer VoiceMMode1' 0"
cset "name='VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1' 0"
cset "name='PRI_MI2S_RX_Voice Mixer VoiceMMode2' 0"
cset "name='VoiceMMode2_Tx Mixer TERT_MI2S_TX_MMode2' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer VoiceMMode2' 0"
cset "name='VoiceMMode2_Tx Mixer INT_BT_SCO_TX_MMode2' 0"
cset "name='AFE_PCM_RX_Voice Mixer VoiceMMode2' 0"
cset "name='VoiceMMode2_Tx Mixer AFE_PCM_TX_MMode2' 0"
cset "name='Internal FM RX Volume' 0"
cset "name='PRI_MI2S_RX Port Mixer INTERNAL_FM_TX' 0"
cset "name='MultiMedia1 Mixer INTERNAL_FM_TX' 0"
cset "name='MultiMedia2 Mixer INTERNAL_FM_TX' 0"
cset "name='MultiMedia5 Mixer INTERNAL_FM_TX' 0"
cset "name='INTERNAL_FM_RX Audio Mixer MultiMedia1' 0"
cset "name='INTERNAL_FM_RX Audio Mixer MultiMedia5' 0"
cset "name='RT_PROXY_1_RX SetCalMode' CAL_MODE_NONE"
cset "name='RT_PROXY_1_TX SetCalMode' CAL_MODE_NONE"
cset "name='MultiMedia1 Mixer VOC_REC_UL' 0"
cset "name='MultiMedia1 Mixer VOC_REC_DL' 0"
cset "name='Incall_Music Audio Mixer MultiMedia2' 0"
cset "name='Incall_Music_2 Audio Mixer MultiMedia9' 0"
cset "name='PRI_MI2S_RX_Voice Mixer QCHAT' 0"
cset "name='QCHAT_Tx Mixer TERT_MI2S_TX_QCHAT' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer QCHAT' 0"
cset "name='QCHAT_Tx Mixer INTERNAL_BT_SCO_TX_QCHAT' 0"
cset "name='AUDIO_REF_EC_UL1 MUX' None"
cset "name='IIR1 Band1' 268435456"
cset "name='IIR1 Band1' 0"
cset "name='IIR1 Band1' ,0"
cset "name='IIR1 Band1' ,,0"
cset "name='IIR1 Band1' ,,,0"
cset "name='IIR1 Band2' 268435456"
cset "name='IIR1 Band2' 0"
cset "name='IIR1 Band2' ,0"
cset "name='IIR1 Band2' ,,0"
cset "name='IIR1 Band2' ,,,0"
cset "name='IIR1 Band3' 268435456"
cset "name='IIR1 Band3' 0"
cset "name='IIR1 Band3' ,0"
cset "name='IIR1 Band3' ,,0"
cset "name='IIR1 Band3' ,,,0"
cset "name='IIR1 Band4' 268435456"
cset "name='IIR1 Band4' 0"
cset "name='IIR1 Band4' ,0"
cset "name='IIR1 Band4' ,,0"
cset "name='IIR1 Band4' ,,,0"
cset "name='IIR1 Band5' 268435456"
cset "name='IIR1 Band5' 0"
cset "name='IIR1 Band5' ,0"
cset "name='IIR1 Band5' ,,0"
cset "name='IIR1 Band5' ,,,0"
cset "name='IIR1 Enable Band1' 0"
cset "name='IIR1 Enable Band2' 0"
cset "name='IIR1 Enable Band3' 0"
cset "name='IIR1 Enable Band4' 0"
cset "name='IIR1 Enable Band5' 0"
]

View file

@ -0,0 +1,36 @@
# Maintainer: Denis Tolstov <tolstov_den@mail.ru>
pkgname=firmware-xiaomi-rolex
pkgver=0.1
pkgrel=0
_commit="9dd5fa22ee401cca0d3b703b4773b011c186d04e"
pkgdesc="Firmware files for Xiaomi Redmi 4A"
url="https://postmarketos.org"
arch="aarch64"
license="proprietary"
options="!strip !check !archcheck !spdx pmb:cross-native !tracedeps"
_files="wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b06
wcnss.b09 wcnss.b10 wcnss.b11 wcnss.b12 wcnss.mdt
adsp.b00 adsp.b02 adsp.b04 adsp.b06 adsp.b08 adsp.b10
adsp.b12 adsp.b14 adsp.b01 adsp.b03 adsp.b05 adsp.b07
adsp.b09 adsp.b11 adsp.b13 adsp.mdt"
_files_prima="WCNSS_qcom_cfg.ini WCNSS_qcom_wlan_nv.bin WCNSS_wlan_dictionary.dat"
source="$pkgname-$_commit.tar.gz::https://github.com/nrdnandan/vendor_xiaomi_rolex/archive/$_commit.tar.gz"
builddir="$srcdir/vendor_xiaomi_rolex-$_commit"
package() {
# /lib/firmware/postmarketos
for _i in $_files; do
install -D -m644 "$_i" \
"$pkgdir"/lib/firmware/postmarketos/"$_i"
done
# /lib/firmware/postmarketos/wlan/prima
for _i in $_files_prima; do
install -D -m644 wlan/prima/"$_i" \
"$pkgdir"/lib/firmware/postmarketos/wlan/prima/"$_i"
done
}
sha512sums="308a8f7ec1b5d91d14bedfe2dee693386710f6530c0e9e3583b0a18df9fab1905add916fe662abd56e24e63a7541902856fb9fbc1f700d6b368702265fe235e1 firmware-xiaomi-rolex-9dd5fa22ee401cca0d3b703b4773b011c186d04e.tar.gz"

View file

@ -0,0 +1,40 @@
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
index 075ee8a3880..b4531f66a06 100644
--- a/drivers/video/msm/mdss/mdss_fb.c
+++ b/drivers/video/msm/mdss/mdss_fb.c
@@ -868,7 +868,8 @@ static int mdss_fb_probe(struct platform_device *pdev)
mfd->bl_scale = 1024;
mfd->bl_min_lvl = 30;
mfd->ad_bl_level = 0;
- mfd->fb_imgType = MDP_RGBA_8888;
+ // Default framebuffer format.
+ mfd->fb_imgType = MDP_BGRA_8888;
mfd->calib_mode_bl = 0;
if (mfd->panel.type == MIPI_VIDEO_PANEL ||
@@ -2143,6 +2144,25 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
bpp = 4;
break;
+ case MDP_BGRA_8888:
+ fix->type = FB_TYPE_PACKED_PIXELS;
+ 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.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.length = 8;
+ bpp = 4;
+ break;
+
case MDP_YCRYCB_H2V1:
fix->type = FB_TYPE_INTERLEAVED_PLANES;
fix->xpanstep = 2;

View file

@ -0,0 +1,59 @@
# Maintainer: Denis Tolstov <tolstov_den@mail.ru>
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/rolex_defconfig
pkgname=linux-xiaomi-rolex
pkgver=3.18.140
pkgrel=0
pkgdesc="Xiaomi Redmi 4A kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="xiaomi-rolex"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl gcc6"
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_xiaomi_msm8917"
_commit="eb7107087f2bb9dc9c50bb81f31676f155272135"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/Nick89786/$_repository/archive/$_commit.tar.gz
$_config
fix-xorg-mdss-update-fb-info.patch
99_framebuffer.patch
gcc10-extern_YYLOC_global_declaration.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
}
sha512sums="
ba19a01f48370e77bbe0197c554b91b18513955c1b9683fef353aea0a5d6c6ee2ef9b868d38b81bdac2abdb89c42ec7eb24feae67caec81a17ba95068528bd69 linux-xiaomi-rolex-eb7107087f2bb9dc9c50bb81f31676f155272135.tar.gz
2fa9c8edbb96f8f90770191b29c991f99c9b23ec6f1dbfe30641810f6f41cd4d82afd4d57978c7a30797cdf0285e9e732624d02ef0e1e9bcbe32114a45962271 config-xiaomi-rolex.aarch64
a277af28a718f5caf94257005393aa92d62c96110a8ec6368ff62f2e0d871b69c56c4ce00174db637204d53fa63ad3a79b8d6141713dca0878e1f06fe0379caa fix-xorg-mdss-update-fb-info.patch
a6f9899ab97af727e4450201a2edc2bf6fc805d981fa967581b98c5e1ee0b9c005feeeb647b40b220a79ed9a318cf9bbf8f953aab941daf6fea4790a372aae21 99_framebuffer.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,117 @@
From f3ed0c110153e63884e38aa20bc6a352b647b47d Mon Sep 17 00:00:00 2001
From: Ion Agorria <ion@agorria.com>
Date: Thu, 24 Jan 2019 18:52:58 +0100
Subject: [PATCH] mdss: update fb mode at mdss_panelinfo_to_fb_var to fix Xorg
When mdss_panelinfo_to_fb_var is called at
screen unblank it updates the values in fb_info->var,
meanwhile the fb_info->mode and modelist remain with old
values set at registering the fb causing mismatch when
Xorg attempts to set mode.
---
drivers/video/msm/mdss/mdss_fb.c | 25 ++++++++++++++++-------
drivers/video/msm/mdss/mdss_fb.h | 3 +--
drivers/video/msm/mdss/mdss_mdp_overlay.c | 2 +-
3 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
index fbcec438dbc4..3302afc7120a 100644
--- a/drivers/video/msm/mdss/mdss_fb.c
+++ b/drivers/video/msm/mdss/mdss_fb.c
@@ -1851,7 +1851,7 @@ static void mdss_panel_validate_debugfs_info(struct msm_fb_data_type *mfd)
if (is_panel_split(mfd) && pdata->next)
mdss_fb_validate_split(pdata->panel_info.xres,
pdata->next->panel_info.xres, mfd);
- mdss_panelinfo_to_fb_var(panel_info, var);
+ mdss_panelinfo_to_fb_var(mfd);
if (mdss_fb_send_panel_event(mfd, MDSS_EVENT_CHECK_PARAMS,
panel_info))
pr_err("Failed to send panel event CHECK_PARAMS\n");
@@ -1964,7 +1964,7 @@ static int mdss_fb_blank_unblank(struct msm_fb_data_type *mfd)
* programmed in the controller.
* Update this info in the upstream structs.
*/
- mdss_panelinfo_to_fb_var(panel_info, var);
+ mdss_panelinfo_to_fb_var(mfd);
/* Start the work thread to signal idle time */
if (mfd->idle_time)
@@ -2696,7 +2696,7 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
return ret;
}
- mdss_panelinfo_to_fb_var(panel_info, var);
+ mdss_panelinfo_to_fb_var(mfd);
fix->type = panel_info->is_3d_panel;
if (mfd->mdp.fb_stride)
@@ -3408,7 +3408,7 @@ static void mdss_fb_update_resolution(struct msm_fb_data_type *mfd,
}
var->xres_virtual = var->xres;
var->yres_virtual = pinfo->yres * mfd->fb_page;
- mdss_panelinfo_to_fb_var(pinfo, var);
+ mdss_panelinfo_to_fb_var(mfd);
}
int mdss_fb_atomic_commit(struct fb_info *info,
@@ -3630,9 +3630,14 @@ static void mdss_fb_var_to_panelinfo(struct fb_var_screeninfo *var,
pinfo->mipi.dsi_pclk_rate = pinfo->clk_rate;
}
-void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
- struct fb_var_screeninfo *var)
+void mdss_panelinfo_to_fb_var(struct msm_fb_data_type *mfd)
{
+ if (!mfd)
+ return -EINVAL;
+
+ struct mdss_panel_info *pinfo = mfd->panel_info;
+ struct fb_info *fbi = mfd->fbi;
+ struct fb_var_screeninfo *var = &fbi->var;
u32 frame_rate;
var->xres = mdss_fb_get_panel_xres(pinfo);
@@ -3667,7 +3672,13 @@ void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
if (pinfo->physical_height)
var->height = pinfo->physical_height;
- pr_debug("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",
+ //Hack to update current fbi->mode according to fbi->var when var is updated from panel info
+ if (fbi->mode) {
+ printk("Updating mdss fb mode from fb var\n");
+ fb_var_to_videomode(fbi->mode, var);
+ }
+
+ printk("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",
var->xres, var->yres, var->left_margin,
var->right_margin, var->upper_margin,
var->lower_margin);
diff --git a/drivers/video/msm/mdss/mdss_fb.h b/drivers/video/msm/mdss/mdss_fb.h
index 7bc2afd09646..3ea0c6426485 100644
--- a/drivers/video/msm/mdss/mdss_fb.h
+++ b/drivers/video/msm/mdss/mdss_fb.h
@@ -471,7 +471,6 @@ int mdss_fb_async_position_update(struct fb_info *info,
u32 mdss_fb_get_mode_switch(struct msm_fb_data_type *mfd);
void mdss_fb_report_panel_dead(struct msm_fb_data_type *mfd);
-void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
- struct fb_var_screeninfo *var);
+void mdss_panelinfo_to_fb_var(struct msm_fb_data_type *mfd);
void mdss_fb_calc_fps(struct msm_fb_data_type *mfd);
#endif /* MDSS_FB_H */
diff --git a/drivers/video/msm/mdss/mdss_mdp_overlay.c b/drivers/video/msm/mdss/mdss_mdp_overlay.c
index 0a99acba594b..c998d26211d4 100644
--- a/drivers/video/msm/mdss/mdss_mdp_overlay.c
+++ b/drivers/video/msm/mdss/mdss_mdp_overlay.c
@@ -3844,7 +3844,7 @@ int mdss_mdp_dfps_update_params(struct msm_fb_data_type *mfd,
* data, so any further call to get the screen
* info has the updated timings.
*/
- mdss_panelinfo_to_fb_var(&pdata->panel_info, var);
+ mdss_panelinfo_to_fb_var(mfd);
MDSS_XLOG(dfps);
mutex_unlock(&mdp5_data->dfps_lock);
--
2.19.2

View file

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