c64f29713f
Replace the old downstream port with a new aarch64 port running the linux-postmarketos-qcom-msm8916 close-to-mainline(TM) kernel. Most of the functionality is working: - USB Network - Storage (eMMC, SD card) - Display, brightness control - Touchscreen, buttons - IMU (accelerometer+gyroscope) - Notification LED - Sound (Speaker, Headphones, Microphones) - WiFi, Bluetooth - Modem (SMS, voice calls, mobile data) Coming soon (hopefully): Battery/Charging, USB-OTG (not working yet) There are many variants of the device, so more changes to handle differences between them may be needed in the future. For now, the only relevant difference is the required modem firmware: - wt88047 (global variant) - wt86047 (China variant) ... have different kind of modems and they do not seem to work with the firmware of the other one. The way this is handled in this device package is that there is a separate kernel variant for both of them. All other required firmware can be shared, and therefore there is no differentiation needed when using the kernel variant without modem. I renamed "wingtech-wt88047" to "xiaomi-wt88047". My reasoning for that is the following: - Wingtech is the ODM (original design manufacturer), they designed the hardware and (probably) manufactured it. But postmarketOS port applies to the combination of both hardware and firmware, and the firmware was at least partially provided by Xiaomi. - wt88047 looks lonely with the "wingtech" vendor, when all other Xiaomi devices use "xiaomi", even though many from them were probably also designed by Wingtech. - We don't use the ODM hardware name for other devices either, e.g. "wileyfox-crackling" would be "longcheer-l8150" with the same approach. I think the port is better visible as "xiaomi-wt88047" (too bad Xiaomi seemingly did not have a proper codename for this device...)
72 lines
2.5 KiB
Text
72 lines
2.5 KiB
Text
# Reference: <https://postmarketos.org/devicepkg>
|
|
pkgname=device-xiaomi-wt88047
|
|
pkgdesc="Xiaomi Redmi 2"
|
|
pkgver=1
|
|
pkgrel=0
|
|
url="https://postmarketos.org"
|
|
license="MIT"
|
|
arch="aarch64"
|
|
options="!check !archcheck"
|
|
depends="postmarketos-base mkbootimg soc-qcom-msm8916"
|
|
makedepends="devicepkg-dev"
|
|
source="deviceinfo modprobe.conf"
|
|
subpackages="
|
|
$pkgname-kernel-mainline:kernel_mainline
|
|
$pkgname-kernel-mainline-modem-wt86047:kernel_mainline_modem_wt86047
|
|
$pkgname-kernel-mainline-modem-wt88047:kernel_mainline_modem_wt88047
|
|
$pkgname-nonfree-firmware:nonfree_firmware
|
|
$pkgname-nonfree-firmware-modem-wt86047:nonfree_firmware_modem_wt86047
|
|
$pkgname-nonfree-firmware-modem-wt88047:nonfree_firmware_modem_wt88047
|
|
"
|
|
|
|
build() {
|
|
devicepkg_build $startdir $pkgname
|
|
}
|
|
|
|
package() {
|
|
devicepkg_package $startdir $pkgname
|
|
}
|
|
|
|
kernel_mainline() {
|
|
pkgdesc="Close to mainline kernel (no modem, audio routed directly)"
|
|
depends="linux-postmarketos-qcom-msm8916"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
# wt86047 (Chinese variant) and wt88047 (global variant) need different
|
|
# modem firmware, otherwise they are pretty much the same.
|
|
|
|
kernel_mainline_modem_wt86047() {
|
|
pkgdesc="Close to mainline kernel (wt86047 (China), non-free modem, audio routed through ADSP)"
|
|
depends="linux-postmarketos-qcom-msm8916 soc-qcom-msm8916-modem"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_mainline_modem_wt88047() {
|
|
pkgdesc="Close to mainline kernel (wt88047 (global), non-free modem, audio routed through ADSP)"
|
|
depends="linux-postmarketos-qcom-msm8916 soc-qcom-msm8916-modem"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
nonfree_firmware() {
|
|
pkgdesc="GPU/WiFi/BT/Video(/Modem) firmware"
|
|
depends="linux-firmware-qcom firmware-qcom-msm8916-wcnss firmware-xiaomi-wt88047-wcnss-nv"
|
|
mkdir "$subpkgdir"
|
|
}
|
|
|
|
nonfree_firmware_modem_wt86047() {
|
|
pkgdesc="Modem firmware (WT86047)"
|
|
depends="firmware-xiaomi-wt86047-modem"
|
|
install_if="$pkgname-nonfree-firmware $pkgname-kernel-mainline-modem-wt86047"
|
|
mkdir "$subpkgdir"
|
|
}
|
|
|
|
nonfree_firmware_modem_wt88047() {
|
|
pkgdesc="Modem firmware (WT88047)"
|
|
depends="firmware-xiaomi-wt88047-modem"
|
|
install_if="$pkgname-nonfree-firmware $pkgname-kernel-mainline-modem-wt88047"
|
|
mkdir "$subpkgdir"
|
|
}
|
|
|
|
sha512sums="17bf542a3446ef35515bf9bca2849ae5cb95306caef7c8c57101c8d0ea40ba2baf71767f0e652876519a439cacad0d877fac8d40373cae5d1b014a0383896a57 deviceinfo
|
|
df15ed95ee31ac2e565d21056493d9c7b264491f5d446bafe6684ae80750d408a0de7370d31323c75d50eee5ac0f97010c198d3c28285898d7762b822ef7181f modprobe.conf"
|