samsung-a3lte: new device (Samsung Galaxy A3 - SM-A300F) (MR 1433)

SM-A300F is pretty much identical to SM-A300FU (note the U),
but it needs different firmware for some reason.
This commit is contained in:
Nikita Travkin 2020-07-21 18:44:57 +05:00 committed by Bart Ribbers
parent 460c8de69d
commit dea5488d93
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
5 changed files with 165 additions and 0 deletions

View file

@ -0,0 +1,64 @@
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Nikita Travkin <nikitos.tr@gmail.com>
# Maintainer: Minecrell <minecrell@minecrell.net>
pkgname=device-samsung-a3lte
pkgdesc="Samsung Galaxy A3 (SM-A300F)"
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 rootston.ini"
subpackages="
$pkgname-kernel-mainline:kernel_mainline
$pkgname-kernel-mainline-modem:kernel_mainline_modem
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-nonfree-firmware-modem:nonfree_firmware_modem
$pkgname-phosh
"
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
}
kernel_mainline_modem() {
pkgdesc="Close to mainline kernel (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-samsung-a3lte-venus firmware-samsung-a3lte-wcnss"
mkdir "$subpkgdir"
}
nonfree_firmware_modem() {
pkgdesc="Modem firmware"
depends="firmware-samsung-a3lte-modem"
install_if="$pkgname-nonfree-firmware $pkgname-kernel-mainline-modem"
mkdir "$subpkgdir"
}
phosh() {
install_if="$pkgname postmarketos-ui-phosh"
install -Dm644 "$srcdir"/rootston.ini \
"$subpkgdir"/etc/phosh/rootston.ini
}
sha512sums="6f6b53fce933f25793aeca747411b32c31244fd149e971d640b3330913d9d443532b2b4c1138f58f13a46dda2d3854503256a0212cddac28b1f17df9c6d7c519 deviceinfo
ee4263607eee2d12bd796d19606de35005f0a1ae4b8ff86e4556f2233c533b62d651dabe558081b5ff768a6b8158f34dd9b74b3dcece159e55d635b1d807928b modprobe.conf
f3667b914bb955be9e97db31dc7ed4a7c5d0c369be9549d587bb7208e270590c0c3fa36a0dd997d6f8305c5c9afb3b906423af6ca8724e806f995e61226cfc83 rootston.ini"

View file

@ -0,0 +1,39 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Galaxy A3 (SM-A300F)"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-a3lte"
deviceinfo_year="2014"
# Eventually this should be replaced with a special DTB for a3lte.
# However, the differences are minimal, so for now a3u-eur works fine.
deviceinfo_dtb_mainline="qcom/msm8916-samsung-a3u-eur"
deviceinfo_dtb_mainline_modem="qcom/msm8916-samsung-a3u-eur-modem"
deviceinfo_append_dtb="true"
deviceinfo_modules_initfs=""
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="540"
deviceinfo_screen_height="960"
deviceinfo_getty="ttyMSM0;115200"
# MSM DRM cannot take over the framebuffer from the bootloader at the moment
deviceinfo_no_framebuffer="true"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="earlycon console=ttyMSM0,115200 PMOS_NO_OUTPUT_REDIRECT"
deviceinfo_generate_bootimg="true"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00080000"
deviceinfo_flash_offset_ramdisk="0x02000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_sparse="true"

View file

@ -0,0 +1,20 @@
#
# There is a weird probe issue if both MSM DRM and the panel driver are built
# as modules: When MSM DRM is loaded it registers the DSI bus for the panel.
# At this point the panel is not loaded yet, so the kernel sends an uevent
# to userspace to load the necessary panel module.
#
# This causes some delay until the panel module is loaded, so MSM DRM fails to
# probe temporarily and returns -EPROBE_DEFER (to request probing again later).
# Unfortunately this will also unregister the DSI bus for the panel, and the
# kernel will not try probing MSM DRM + panel again until some other (slow)
# driver loads after MSM DRM.
#
# Usually WCNSS (WiFi/BT) fits that criteria, allowing the display to work.
# But this does not work if the user decides to exclude proprietary firmware.
#
# To avoid this problem we add an explicit soft dependency for MSM DRM
# on the panel module, so modprobe loads the panel module first and MSM DRM
# will immediately find the panel it is looking for.
#
softdep msm pre: panel-samsung-s6e88a0-ams452ef01

View file

@ -0,0 +1,5 @@
[cursor:seat0]
map-to-output:DSI-1
[output:DSI-1]
scale = 1

View file

@ -0,0 +1,37 @@
pkgname=firmware-samsung-a3lte
pkgver=1
pkgrel=0
pkgdesc="Firmware for Samsung Galaxy A3 (SM-A300F)"
url="https://rizzotherat.gitlab.io/firmware/"
subpackages="$pkgname-modem $pkgname-venus $pkgname-wcnss"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck"
source="https://pepethekingprawn.gitlab.io/firmware/SM-A300F.tar.xz"
_fwdir="/lib/firmware/postmarketos"
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
modem() {
pkgdesc="Samsung Galaxy A3 (SM-A300F) modem firmware"
install -Dm644 "$srcdir"/mba.mbn -t "$subpkgdir/$_fwdir"
install -Dm644 "$srcdir"/modem.* -t "$subpkgdir/$_fwdir"
}
venus() {
pkgdesc="Samsung Galaxy A3 (SM-A300F) video firmware"
install -Dm644 "$srcdir"/venus.* -t "$subpkgdir/$_fwdir"/qcom/venus-1.8
}
wcnss() {
pkgdesc="Samsung Galaxy A3 (SM-A300F) WiFi/BT firmware"
cd "$srcdir"
install -Dm644 wcnss.* -t "$subpkgdir/$_fwdir"
install -Dm644 WCNSS_* -t "$subpkgdir/$_fwdir"/wlan/prima
}
sha512sums="7aeeeca56f629589a02434f6e24ac141139d1080fae369864450917fb3ad2bc8a64803201e9771ff932bf79a379207772b975fc4c184561338e87213093380df SM-A300F.tar.xz"