realme-x3: new device (Realme X3) (MR 5839)
Signed-off-by: Patriot-06 <mbmc172@gmail.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
/lib/firmware/qcom/a630_sqe.fw
|
||||
/lib/firmware/qcom/a640_gmu.bin
|
||||
/lib/firmware/qcom/sm8150/realme/x3/a640_zap.mbn
|
||||
@@ -0,0 +1,20 @@
|
||||
-- PipeWire's S24LE default audio format is broken in the kernel driver
|
||||
table.insert(alsa_monitor.rules,
|
||||
{
|
||||
matches = {
|
||||
{
|
||||
{ "node.name", "matches", "alsa_output.*.HiFi*__sink" },
|
||||
},
|
||||
{
|
||||
{ "node.name", "matches", "alsa_input.*.HiFi*__source" },
|
||||
},
|
||||
},
|
||||
apply_properties = {
|
||||
["audio.format"] = "S16LE",
|
||||
["audio.rate"] = 48000,
|
||||
["api.alsa.period-size"] = 4096,
|
||||
["api.alsa.period-num"] = 6,
|
||||
["api.alsa.headroom"] = 512,
|
||||
},
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,86 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
# Maintainer: Patriot-06 <mbmc172@gmail.com>
|
||||
|
||||
pkgname=device-realme-x3
|
||||
pkgdesc="Realme X3"
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
postmarketos-base
|
||||
mkbootimg
|
||||
linux-realme-x3
|
||||
mesa-vulkan-freedreno
|
||||
swclock-offset
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
alsa-ucm-conf/HiFi.conf
|
||||
alsa-ucm-conf/x3.conf
|
||||
deviceinfo
|
||||
30-gpu-firmware.files
|
||||
51-qcom-sm8150.lua
|
||||
modules-initfs
|
||||
"
|
||||
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-alsa_ucm_conf
|
||||
$pkgname-wireplumber
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Firmware for GPU, Touchscreen, Audio, Bluetooth, WiFi, etc."
|
||||
depends="
|
||||
firmware-realme-x3
|
||||
msm-modem
|
||||
pd-mapper
|
||||
pd-mapper-openrc
|
||||
tqftpserv
|
||||
tqftpserv-openrc
|
||||
bootmac
|
||||
alsa-utils
|
||||
"
|
||||
install="$subpkgname.post-install"
|
||||
mkdir "$subpkgdir"
|
||||
|
||||
install -Dm644 "$srcdir/30-gpu-firmware.files" \
|
||||
"$subpkgdir/usr/share/mkinitfs/files/30-gpu-firmware.files"
|
||||
}
|
||||
|
||||
alsa_ucm_conf() {
|
||||
install -Dm644 "$srcdir/HiFi.conf" \
|
||||
"$subpkgdir/usr/share/alsa/ucm2/Realme/x3/HiFi.conf"
|
||||
|
||||
install -Dm644 "$srcdir/x3.conf" \
|
||||
"$subpkgdir/usr/share/alsa/ucm2/Realme/x3/x3.conf"
|
||||
|
||||
mkdir -p "$subpkgdir/usr/share/alsa/ucm2/conf.d/sdm845"
|
||||
ln -s ../../Realme/x3/x3.conf \
|
||||
"$subpkgdir/usr/share/alsa/ucm2/conf.d/sdm845/Realme X3.conf"
|
||||
}
|
||||
|
||||
wireplumber() {
|
||||
install -Dm644 "$srcdir/51-qcom-sm8150.lua" \
|
||||
-t "$subpkgdir/usr/share/wireplumber/main.lua.d"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
da5509da4b7f0dbf5e2c95375b334a750cef620f8ea77c17c8dde611134bdf474b4e10723f6d656b42843a727e395d352dd0578f1317fcbdf623f4533273fb49 HiFi.conf
|
||||
28d8dadac648f007d6e554684200bb1c0fb699a472e8459802691bbbadd67458626969d3d418ae145b94bedb3e83d73e8403206c0b4b509a6d3c541b6b733a7a x3.conf
|
||||
acf570712aa2a4135661d1c8933be76924f1ff9962db94e072a9dfb694fea040aa91d8f03241742d193ea229091323348c3b82408ffddb168e8b54695353b4b4 deviceinfo
|
||||
281ddbbd0cc49f54debed63d4531b5b3154b7c1ff9b5482d4b5b8cf655ddb9972f2a21b889db0bde5b9607dd298c9ed9b61c9772f1d0544a5e103da73d4dcf4f 30-gpu-firmware.files
|
||||
d97601fd5bd36c5710c9a122e400cdd0aecf37df7088bfef4490aef2356f15533cdf70e47e3a270cd77d5384ac1fcdc9c6ea46e314c3b88db26bfc8d86fdadce 51-qcom-sm8150.lua
|
||||
dbf6f3280cda66914be3215d771105b2994fc2e76c69d461c63ddbb914fe7882432a4d8c8a2590288c660ae4a834c2ddf0f7282a87c87c965631574db38c5a1c modules-initfs
|
||||
"
|
||||
@@ -0,0 +1,86 @@
|
||||
# Use case configuration for Realme X3
|
||||
# Author: Patriot-06 <mbmc172@gmail.com>
|
||||
#
|
||||
# Playback Devices
|
||||
# - Internal Speakers : TFA987x driver : MultiMedia1 <-> QUAT_MI2S_RX
|
||||
#
|
||||
# Capture Devices
|
||||
# - Internal Bottom Mic : WCD934x driver : MultiMedia2 <-> SLIMBUS_0_TX (AIF1_CAP, ADC1, TX6)
|
||||
# - Internal Top Mic : WCD934x driver : MultiMedia2 <-> SLIMBUS_0_TX (AIF1_CAP, ADC3, TX5)
|
||||
|
||||
SectionVerb {
|
||||
EnableSequence [
|
||||
# Speaker
|
||||
cset "name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 1"
|
||||
|
||||
# Bottom Mic
|
||||
cset "name='ADC1 Volume' 8"
|
||||
cset "name='AIF1_CAP Mixer SLIM TX6' 1"
|
||||
cset "name='CDC_IF TX6 MUX' DEC6"
|
||||
|
||||
# Top Mic
|
||||
cset "name='ADC3 Volume' 8"
|
||||
cset "name='AIF1_CAP Mixer SLIM TX5' 1"
|
||||
cset "name='CDC_IF TX5 MUX' DEC5"
|
||||
cset "name='AMIC4_5 SEL' AMIC4"
|
||||
|
||||
cset "name='MultiMedia2 Mixer SLIMBUS_0_TX' 1"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
# Speaker
|
||||
cset "name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 0"
|
||||
|
||||
# Bottom Mic
|
||||
cset "name='ADC1 Volume' 0"
|
||||
cset "name='AIF1_CAP Mixer SLIM TX6' 0"
|
||||
cset "name='CDC_IF TX6 MUX' ZERO"
|
||||
|
||||
# Top Mic
|
||||
cset "name='ADC3 Volume' 0"
|
||||
cset "name='AIF1_CAP Mixer SLIM TX5' 0"
|
||||
cset "name='CDC_IF TX5 MUX' ZERO"
|
||||
cset "name='AMIC4_5 SEL' ZERO"
|
||||
|
||||
cset "name='MultiMedia2 Mixer SLIMBUS_0_TX' 0"
|
||||
]
|
||||
|
||||
Value {
|
||||
TQ "HiFi"
|
||||
}
|
||||
}
|
||||
|
||||
SectionDevice."Speaker" {
|
||||
Comment "Internal Speaker"
|
||||
|
||||
Value {
|
||||
PlaybackPriority 200
|
||||
PlaybackPCM "hw:${CardId},0" # MultiMedia1
|
||||
}
|
||||
}
|
||||
|
||||
SectionDevice."Mic" {
|
||||
Comment "Internal Microphones"
|
||||
|
||||
EnableSequence [
|
||||
cset "name='ADC MUX6' AMIC"
|
||||
cset "name='ADC MUX5' AMIC"
|
||||
cset "name='AMIC MUX6' ADC1"
|
||||
cset "name='AMIC MUX5' ADC3"
|
||||
cset "name='ADC1 Volume' 8"
|
||||
cset "name='ADC3 Volume' 8"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cset "name='AMIC MUX6' ZERO"
|
||||
cset "name='AMIC MUX5' ZERO"
|
||||
cset "name='ADC1 Volume' 0"
|
||||
cset "name='ADC3 Volume' 0"
|
||||
]
|
||||
|
||||
Value {
|
||||
CapturePriority 200
|
||||
CapturePCM "hw:${CardId},1" # MultiMedia2
|
||||
PlaybackChannels 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
# Use case configuration for Realme X3
|
||||
|
||||
Syntax 3
|
||||
|
||||
SectionUseCase."HiFi" {
|
||||
File "/Realme/x3/HiFi.conf"
|
||||
Comment "HiFi quality Music."
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
rc-update add tqftpserv boot
|
||||
rc-update add pd-mapper boot
|
||||
@@ -0,0 +1,40 @@
|
||||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Realme X3"
|
||||
deviceinfo_manufacturer="Realme"
|
||||
deviceinfo_codename="realme-x3"
|
||||
deviceinfo_year="2020"
|
||||
deviceinfo_dtb="qcom/sm8150-realme-x3"
|
||||
deviceinfo_append_dtb="true"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="false"
|
||||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="2400"
|
||||
deviceinfo_gpu_accelerated="true"
|
||||
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_header_version="0"
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_sparse="true"
|
||||
deviceinfo_flash_pagesize="4096"
|
||||
deviceinfo_kernel_cmdline="console=tty0"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
deviceinfo_flash_offset_dtb="0x01f00000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00000000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_fastboot_partition_system="userdata"
|
||||
deviceinfo_rootfs_image_sector_size="4096"
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
msm
|
||||
nt36xxx_spi_ts
|
||||
@@ -0,0 +1,50 @@
|
||||
# Maintainer: Patriot-06 <mbmc172@gmail.com>
|
||||
|
||||
pkgname=firmware-realme-x3
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware for Realme X3"
|
||||
url="https://github.com/sm8150-linux-mainline/firmware-realme-x3"
|
||||
arch="aarch64"
|
||||
license="proprietary"
|
||||
options="!check !strip !archcheck !tracedeps pmb:cross-native"
|
||||
_commit="b8e5f8b3ccc739545d1efccf9fc4a41656b9f188"
|
||||
source="https://github.com/sm8150-linux-mainline/firmware-realme-x3/archive/$_commit/x3-firmware-$_commit.tar.gz"
|
||||
builddir="$srcdir/firmware-realme-x3-$_commit"
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"
|
||||
|
||||
pkgdesc="Firmware files for Realme X3"
|
||||
|
||||
install -Dm644 "$builddir"/a630_sqe.fw -t \
|
||||
"$pkgdir/lib/firmware/qcom/"
|
||||
install -Dm644 "$builddir"/a640_gmu.bin -t \
|
||||
"$pkgdir/lib/firmware/qcom/"
|
||||
install -Dm644 "$builddir"/a640_zap.mbn -t \
|
||||
"$pkgdir/lib/firmware/qcom/sm8150/realme/x3/"
|
||||
install -Dm644 "$builddir"/adsp* -t \
|
||||
"$pkgdir/lib/firmware/qcom/sm8150/realme/x3/"
|
||||
install -Dm644 "$builddir"/cdsp* -t \
|
||||
"$pkgdir/lib/firmware/qcom/sm8150/realme/x3/"
|
||||
install -Dm644 "$builddir"/modem* -t \
|
||||
"$pkgdir/lib/firmware/qcom/sm8150/realme/x3/"
|
||||
install -Dm644 "$builddir"/venus.* -t \
|
||||
"$pkgdir/lib/firmware/qcom/sm8150/realme/x3/"
|
||||
install -Dm644 "$builddir"/firmware-5.bin -t \
|
||||
"$pkgdir/lib/firmware/ath10k/WCN3990/hw1.0/"
|
||||
install -Dm644 "$builddir"/board-2.bin -t \
|
||||
"$pkgdir/lib/firmware/ath10k/WCN3990/hw1.0/"
|
||||
install -Dm644 "$builddir"/wlanmdsp.mbn -t \
|
||||
"$pkgdir/lib/firmware/qcom/sm8150/realme/x3/"
|
||||
install -Dm644 "$builddir"/crbtfw01.tlv -t \
|
||||
"$pkgdir/lib/firmware/qca/"
|
||||
install -Dm644 "$builddir"/crnv01.bin -t \
|
||||
"$pkgdir/lib/firmware/qca/"
|
||||
install -Dm644 "$builddir"/novatek_nt36672c_fw.bin -t \
|
||||
"$pkgdir/lib/firmware/novatek/"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ec5b34609524482bc175f8452a0581dabbfb1bcdf02539d2fc6a6535543efa97b5fdc642ff0f969105ef212a963ce58487cb93857c27026b6bb20c3dd55469ba x3-firmware-b8e5f8b3ccc739545d1efccf9fc4a41656b9f188.tar.gz
|
||||
"
|
||||
@@ -0,0 +1,64 @@
|
||||
# Maintainer: Patriot-06 <mbmc172@gmail.com>
|
||||
# Kernel config based on: arch/arm/configs/sm8150.config
|
||||
|
||||
pkgname=linux-realme-x3
|
||||
pkgver=6.12_rc7
|
||||
pkgrel=0
|
||||
pkgdesc="Mainline Kernel fork for Realme X3"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="realme-x3"
|
||||
url="https://github.com/sm8150-linux-mainline/linux"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps
|
||||
pmb:cross-native
|
||||
pmb:kconfigcheck-nftables
|
||||
"
|
||||
makedepends="bash bc bison findutils flex installkernel openssl-dev perl zstd python3"
|
||||
|
||||
# Source
|
||||
_repository="linux"
|
||||
_commit="91911e069acbb9d38e5dcc633d454f7b1ff9bc4b"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/sm8150-linux-mainline/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
_outdir="out"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
cp "$srcdir/config-$_flavor.$arch" .config
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"/boot
|
||||
|
||||
install -Dm644 "$builddir/arch/$_carch/boot/Image.gz" \
|
||||
"$pkgdir/boot/vmlinuz"
|
||||
|
||||
make modules_install dtbs_install \
|
||||
ARCH="$_carch" \
|
||||
INSTALL_PATH="$pkgdir"/boot/ \
|
||||
INSTALL_MOD_PATH="$pkgdir" \
|
||||
INSTALL_MOD_STRIP=1 \
|
||||
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
|
||||
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
|
||||
|
||||
install -D "$builddir"/include/config/kernel.release \
|
||||
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
|
||||
}
|
||||
|
||||
|
||||
|
||||
sha512sums="
|
||||
0adb5b750da3cad2b95654e57f887691d8e2d63f79e350d9640fc3a6012c4b631b342934b119fc24fb3eb954ac6e3545c050b83c5db433f7bcdcd3fb54c6eadb linux-realme-x3-91911e069acbb9d38e5dcc633d454f7b1ff9bc4b.tar.gz
|
||||
4f7252d717139f581f1b87fbc0ff634470c91cd1dfd60bc07a7532f025d13c171053bb4446c707472594dfba39d33473f751b4a741381ed94d5b673321a642ae config-realme-x3.aarch64
|
||||
"
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user