nokia-sparkler: new device (MR 3768)

Initial port using msm8916-mainline kernel
This commit is contained in:
Affe Null 2022-12-26 14:05:00 +01:00 committed by Luca Weiss
parent 3695a9246a
commit a722471215
No known key found for this signature in database
GPG key ID: 72D843B89D4DD756
5 changed files with 157 additions and 0 deletions

View file

@ -0,0 +1 @@
/lib/firmware/nokia,sparkler-gc9307-hlt-28-panel.bin

View file

@ -0,0 +1,58 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-nokia-sparkler
pkgdesc="Nokia 8000 4G"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="GPL-2.0-only"
arch="armv7"
options="!check !archcheck"
depends="
linux-postmarketos-qcom-msm8916
mkbootimg
postmarketos-base
soc-qcom-msm8909
soc-qcom-msm8916-rproc
"
_pmb_select="soc-qcom-msm8916-rproc"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
makedepends="devicepkg-dev mipi-dbi-cmd"
_panel="nokia,sparkler-gc9307-hlt-28-panel"
source="
$_panel.txt
00-nokia-sparkler-display.files
deviceinfo
"
build() {
devicepkg_build $startdir $pkgname
mkdir -p "$builddir"
mipi-dbi-cmd "$builddir"/"$_panel".bin \
"$srcdir"/"$_panel".txt
}
package() {
devicepkg_package $startdir $pkgname
# Package display init sequence
install -Dm644 "$builddir"/"$_panel".bin -t \
"$pkgdir"/lib/firmware/
install -Dm644 "$srcdir"/00-nokia-sparkler-display.files -t \
"$pkgdir"/etc/postmarketos-mkinitfs/files/
}
nonfree_firmware() {
pkgdesc="GPU/WiFi/BT/Modem/Video firmware"
depends="
firmware-qcom-adreno-a300
msm-firmware-loader
firmware-nokia-sparkler-venus
firmware-nokia-sparkler-wcnss-nv
"
mkdir "$subpkgdir"
}
sha512sums="
721d740ff8dbbbafff4bc734228a82bd57d76177b9bf417d660ecb181a72a998319ddbde77d0efc5e875d2256596578212e3e0bfb85c2e77e5bbf6d0e88d9fa4 nokia,sparkler-gc9307-hlt-28-panel.txt
89b3dd5bf1dd5e85bf66bfb6dba56e2a8e919fe3aa7dc369c18c9e56f7e0ae88319186551412497a601081b904c12dd07ebed4f39fd4a4ba6199fb8af9c90f40 00-nokia-sparkler-display.files
6279651bed23b7f5b1b129cb5aa96389432426a7d9119e80665e497df353a77201335eaa53cb14923bb3cf0b98a2f33f1c884076162459f3d62fd1c9760d2f96 deviceinfo
"

View file

@ -0,0 +1,37 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Nokia 8000 4G"
deviceinfo_manufacturer="Nokia"
deviceinfo_codename="nokia-sparkler"
deviceinfo_year="2020"
deviceinfo_dtb="qcom-msm8909-nokia-sparkler"
deviceinfo_append_dtb="true"
deviceinfo_arch="armv7"
deviceinfo_modules_initfs="pm8916-lbc pm8916-bms-vm panel-mipi-dbi"
deviceinfo_swap_size_recommended="512"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="true"
deviceinfo_external_storage="true"
deviceinfo_screen_width="240"
deviceinfo_screen_height="320"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="earlycon console=ttyMSM0,115200"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="2048"
deviceinfo_header_version="0"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x02700000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x02500000"
deviceinfo_flash_sparse="true"

View file

@ -0,0 +1,26 @@
# Based on arch/arm64/boot/dts/qcom/spi-panel-gc9307-hlt-28-qvga-cmd.dtsi from
# the downstream kernel, which is:
# Copyright (c) 2017, 2020, The Linux Foundation. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 and
# only version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
command 0x11 # exit sleep mode
delay 120
command 0xfe
command 0xef
command 0x13
command 0x38
command 0x20
command 0x36 0x00
command 0x3a 0x05
command 0x35 0x00
command 0x89 0x0b
command 0xeb 0x02
command 0x29 # display on

View file

@ -0,0 +1,35 @@
pkgname=firmware-nokia-sparkler
pkgver=20.00.17.01
pkgrel=0
pkgdesc="Firmware for Nokia 8000 4G"
url="https://storage.abscue.de/private/zImage/$pkgname-$pkgver"
arch="armv7"
license="custom"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
subpackages="$pkgname-venus:venus_package $pkgname-wcnss-nv:wcnss_nv_package"
source="$url/$pkgname.tar.gz"
_fwsrc="$srcdir/firmware-nokia-sparkler"
_fwdir="/lib/firmware/postmarketos"
package() {
mkdir -p "$pkgdir"
}
venus_package() {
pkgdesc="Nokia 8000 4G video encoder/decoder firmware"
# venus.mbn already exists and doesn't differ from the file produced
# by pil-squasher
install -Dm644 "$_fwsrc"/venus.mbn -t "$subpkgdir/$_fwdir"/qcom/venus-3.0/
}
wcnss_nv_package() {
pkgdesc="Nokia 8000 4G WiFi/BT firmware configuration"
install -Dm644 "$_fwsrc"/wlan/prima/WCNSS_qcom_wlan_nv.bin -t \
"$subpkgdir/$_fwdir"/wlan/prima/
}
sha512sums="
550af8ef37f2c2a3fec5a7fded1dc11f066391195eadcbc32ff19e063f4ae0c529ff5a1191ade1a57545f681e1bdf5fc1c6214061aab7a5b5d37fef7608a59b4 firmware-nokia-sparkler.tar.gz
"