Skip to content
Snippets Groups Projects

Add basic support for Nokia N9

Closed Imported Administrator requested to merge pavelmachek:n9-3 into master
22 files
+ 51488
0
Compare changes
  • Side-by-side
  • Inline
Files
22
+ 45
0
pkgname=device-nokia-n9
pkgver=1
pkgrel=0
pkgdesc="Nokia N9"
url="https://github.com/postmarketOS"
arch="noarch"
license="MIT"
depends="linux-nokia-n9 linux-firmware ofono watchdog-kick evtest"
makedepends=""
install=""
subpackages="$pkgname-weston:weston"
source="
deviceinfo
initfs-hook.sh
RM-696_Pyrenees_SMD_V1_6.raw
weston.ini
$install
"
options="!check"
build() {
return 0
}
package() {
install -D -m644 "$srcdir"/deviceinfo \
"$pkgdir"/etc/deviceinfo
install -D -m644 "$srcdir"/initfs-hook.sh \
"$pkgdir"/etc/postmarketos-mkinitfs/hooks/00-${pkgname}.sh
#Atmel TS
install -D -m644 "$srcdir"/RM-696_Pyrenees_SMD_V1_6.raw \
    • Author Owner

      Created by: ollieparanoid

      Could you package the firmware in its own package in the firmware folder (e.g firmware-atmel-ts, ideally with a more exact name of the screen)?

      If it's proprietary, please don't ship it with the package (even if it is just a small file), but download it from somewhere on the web - just look at how it's done in the other firmware packages.

      I'm just curious why the file gets renamed to maxtouch.cfg btw, has this any special meaning?

      Finally we put postmarketOS firmware into /lib/firmware/postmarketos, so it never conflicts with the linux-firmware package from Alpine. Our firmware loading script looks in that path, too.

      By * postmarketOS Bot on 2017-12-28T19:57:34

      Edited by Ghost User
    • Author Owner

      Created by: filippz

      Well, this is a strange one. The "firmware" is in fact configuration file that can be dumped from running hw by using https://github.com/atmel-maxtouch/mxt-app, or simply c/p over from previous versions etc. The thing is that is simply has to be called maxtouch.cfg (kernel drivers can't be told the file name by using dts property or something like that) and since we expect using N950 that has the same TS controller but slightly different screen orientation that has to be matched by TS controller we also need a bit different (just 2 bytes) maxtouch.cfg for it but it must be named the same. I'm targeting for using the same kernel package for N950 by means of subpackages so the names in the package should be more meaningful that maxtouch.cfg (ie RM-696_Pyrenees_SMD_V1_6.raw)

      By * postmarketOS Bot on 2017-12-29T06:43:05

      Edited by Ghost User
    • Author Owner

      Created by: ollieparanoid

      Would it make sense to rewrite the driver to get the config file from somewhere in /etc/ then?

      I think you don't even need a subpackage - you could make one device-... package for the N9 and one for the N950, and let each one ship their own config file, but depend on the same kernel package.

      By * postmarketOS Bot on 2017-12-29T14:58:03

      Edited by Ghost User
    • Author Owner

      Created by: filippz

      There was a discussion at LKML where Atmel guys were trying to push some changes but the whole thing stalled when maintainers requested to rewrite driver to use regmap - the discussion wasn't productive after that (keywords: proprietary, custom, NDA, ...) One idea in there was to use DT entry instead of special file - which would be great for our usercase, but I'm reluctant to bring this up on LKML once more :)

      Actually, putting maxtouch.cfg in device- package seems to be a good idea. Maybe we can do that once we decide to introduce support for N950 (CC @pavelmachek)

      By * postmarketOS Bot on 2017-12-29T17:23:07

      Edited by Ghost User
Please register or sign in to reply
"$pkgdir"/lib/firmware/maxtouch.cfg
}
weston() {
install_if="$pkgname weston"
install -Dm644 "$srcdir"/weston.ini \
"$subpkgdir"/etc/xdg/weston/weston.ini
}
sha512sums="3e86685058e994e845caba44f3d35240fa7f1add29543e51413aeeac88bcdacdfca836ac0c691f50febdaa0c9539dc38d8f45316f2c8b1378f2bc8f9d1600653 deviceinfo
16a5191237335c619ac4864e080089e8a5924a319dcac5c283fc6b8ae924e474149096c169f90986bead5be6c7b536a2c2542a3dec89eae55fad06bbce4ae6d1 initfs-hook.sh
70f911147017f4dec3521816a3ce719d65a1b119ac1773d6c7edc7116925eafc3731bd2a198f790351f798726a7ba6476dff447d498c51d22e9366e2b591f9c6 RM-696_Pyrenees_SMD_V1_6.raw
df0fe900693e5f176076c59f5379e56aaa96c3df16a4120448f15b71f530170730b43e5fe32733c40c118a00ca3581043231a062a8a1eb0a930bfbfbb6c52a47 weston.ini"
Loading