2018-01-21 15:09:38 +00:00
|
|
|
pkgname=device-nokia-n900
|
2018-02-20 10:21:03 +00:00
|
|
|
pkgver=2
|
2018-04-15 21:33:41 +00:00
|
|
|
pkgrel=6
|
2017-06-08 17:27:02 +00:00
|
|
|
pkgdesc="Nokia N900"
|
|
|
|
url="https://github.com/postmarketOS"
|
|
|
|
arch="noarch"
|
|
|
|
license="MIT"
|
2018-02-26 22:11:44 +00:00
|
|
|
depends="postmarketos-base linux-postmarketos-stable uboot-tools kbd kbd-bkeymaps ofono mesa-dri-swrast"
|
2017-08-19 21:40:20 +00:00
|
|
|
makedepends="uboot-tools kbd kbd-bkeymaps"
|
[RX51] Add support for physical events w/ acpid
This adds a way to handle physical events like keypad slide switch,
screen lock, camera lid, and others. This uses acpid from busybox (I was
wrong about the real acpid package), and anl acpi.map file to map events
to 'scripts'. The scripts are symlinked to /etc/acpi/handler.sh,
automatically by the new post-install script, where
they are handled based on which script was called. This allows for
easily adding whatever is necessary for #178.
If this PR is merged, I will create a new wiki page detailing how others
can use this framework on other devices.
There's an issue with Busybox's acpid, where it is unable to detect new
devices added after the daemon loads. This is the case on the N900,
where openrc starts acpid well before the kernel is done modprobing
drivers (e.g. gpio_keys), so it's necessary to restart the acpid daemon
after some time to 'load' the new devices.
2017-07-19 04:43:27 +00:00
|
|
|
install="$pkgname.post-install"
|
2018-02-26 22:11:44 +00:00
|
|
|
subpackages="
|
|
|
|
$pkgname-weston
|
|
|
|
$pkgname-x11
|
|
|
|
$pkgname-i3wm
|
|
|
|
$pkgname-nonfree-firmware:nonfree_firmware
|
|
|
|
"
|
2017-08-19 21:40:20 +00:00
|
|
|
source="
|
|
|
|
deviceinfo
|
|
|
|
uboot-script.cmd
|
|
|
|
backlight-enable.sh
|
2017-09-13 19:20:46 +00:00
|
|
|
udev/90-touchscreen-dev.rules
|
|
|
|
udev/10-nokia-modem.rules
|
2017-08-19 21:40:20 +00:00
|
|
|
acpi_handler.sh
|
|
|
|
acpi.map
|
|
|
|
keymaps/rx51_us.map
|
2018-03-10 13:08:33 +00:00
|
|
|
keymaps/rx51_ch-de.map
|
2018-01-29 19:33:32 +00:00
|
|
|
keymaps/40-xkb.conf
|
2017-09-23 01:05:54 +00:00
|
|
|
pointercal
|
2017-10-07 16:19:19 +00:00
|
|
|
asound.state
|
2017-10-20 00:07:00 +00:00
|
|
|
weston.ini
|
2018-02-20 10:21:03 +00:00
|
|
|
i3wm/i3wm.conf
|
|
|
|
i3wm/i3status.conf
|
2017-08-19 21:40:20 +00:00
|
|
|
"
|
2017-06-08 17:27:02 +00:00
|
|
|
options="!check"
|
|
|
|
|
|
|
|
build() {
|
2017-06-09 23:38:46 +00:00
|
|
|
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n postmarketos -d "$srcdir/uboot-script.cmd" "$srcdir/boot.scr"
|
2017-08-19 21:40:20 +00:00
|
|
|
mkdir "$srcdir"/keymaps
|
|
|
|
loadkeys -b "$srcdir"/rx51_us.map > "$srcdir"/keymaps/rx51_us.bmap
|
|
|
|
gzip "$srcdir"/keymaps/rx51_us.bmap
|
2018-03-10 13:08:33 +00:00
|
|
|
loadkeys -b "$srcdir"/rx51_ch-de.map > "$srcdir"/keymaps/rx51_ch-de.bmap
|
|
|
|
gzip "$srcdir"/keymaps/rx51_ch-de.bmap
|
2017-06-08 17:27:02 +00:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
install -D -m644 "$srcdir"/deviceinfo \
|
|
|
|
"$pkgdir"/etc/deviceinfo
|
2017-06-10 09:43:24 +00:00
|
|
|
install -D -m644 "$srcdir"/boot.scr \
|
|
|
|
"$pkgdir"/boot/boot.scr
|
2017-06-10 16:43:33 +00:00
|
|
|
install -D -m644 "$srcdir"/backlight-enable.sh \
|
|
|
|
"$pkgdir"/etc/postmarketos-mkinitfs/hooks/00-${pkgname}-backlight.sh
|
2017-09-23 01:05:54 +00:00
|
|
|
install -D -m644 "$srcdir"/pointercal \
|
|
|
|
"$pkgdir"/etc/pointercal
|
2017-10-07 16:19:19 +00:00
|
|
|
install -D -m644 "$srcdir"/asound.state \
|
|
|
|
"$pkgdir"/var/lib/alsa/asound.state
|
2017-09-13 19:20:46 +00:00
|
|
|
|
|
|
|
# Udev rules
|
2017-07-15 17:59:33 +00:00
|
|
|
install -D -m644 "$srcdir"/90-touchscreen-dev.rules \
|
|
|
|
"$pkgdir"/etc/udev/rules.d/90-touchscreen-dev.rules
|
2017-09-13 19:20:46 +00:00
|
|
|
install -D -m644 "$srcdir"/10-nokia-modem.rules \
|
|
|
|
"$pkgdir"/etc/udev/rules.d/10-nokia-modem.rules
|
|
|
|
|
|
|
|
# ACPI
|
|
|
|
mkdir "$pkgdir"/etc/acpi
|
2017-10-20 00:07:00 +00:00
|
|
|
install -D -m755 "$srcdir"/acpi_handler.sh \
|
|
|
|
"$pkgdir"/etc/acpi/handler.sh
|
|
|
|
install -D -m644 "$srcdir"/acpi.map \
|
|
|
|
"$pkgdir"/etc/acpi.map
|
2017-09-13 19:20:46 +00:00
|
|
|
|
|
|
|
# Keymap
|
2017-10-20 00:07:00 +00:00
|
|
|
install -D -m644 "$srcdir"/keymaps/rx51_us.bmap.gz \
|
|
|
|
"$pkgdir"/usr/share/bkeymaps/us/rx51_us.bmap.gz
|
2018-03-10 13:08:33 +00:00
|
|
|
install -D -m644 "$srcdir"/keymaps/rx51_ch-de.bmap.gz \
|
|
|
|
"$pkgdir"/usr/share/bkeymaps/ch/rx51_ch-de.bmap.gz
|
2017-06-08 17:27:02 +00:00
|
|
|
}
|
|
|
|
|
2017-10-20 00:07:00 +00:00
|
|
|
weston() {
|
|
|
|
install_if="$pkgname weston"
|
|
|
|
install -Dm644 "$srcdir"/weston.ini \
|
|
|
|
"$subpkgdir"/etc/xdg/weston/weston.ini
|
|
|
|
}
|
|
|
|
|
2018-01-29 19:33:32 +00:00
|
|
|
x11() {
|
|
|
|
install_if="$pkgname xorg-server"
|
|
|
|
install -D -m644 "$srcdir"/40-xkb.conf \
|
|
|
|
"$subpkgdir"/etc/X11/xorg.conf.d/40-xkb.conf
|
|
|
|
}
|
|
|
|
|
2018-02-20 10:21:03 +00:00
|
|
|
i3wm() {
|
|
|
|
install_if="$pkgname postmarketos-ui-i3wm"
|
|
|
|
install -D -m644 "$srcdir"/i3wm.conf \
|
|
|
|
"$subpkgdir"/etc/skel/.config/i3/config
|
|
|
|
install -D -m644 "$srcdir"/i3status.conf \
|
|
|
|
"$subpkgdir"/etc/skel/.config/i3/i3status.conf
|
|
|
|
}
|
|
|
|
|
2018-02-26 22:11:44 +00:00
|
|
|
nonfree_firmware() {
|
|
|
|
pkgdesc="Wifi firmware"
|
2018-04-15 21:33:41 +00:00
|
|
|
depends="linux-firmware-ti-connectivity"
|
2018-02-26 22:11:44 +00:00
|
|
|
mkdir "$subpkgdir"
|
|
|
|
}
|
|
|
|
|
2018-03-10 13:08:33 +00:00
|
|
|
sha512sums="9b38f17e8f68768a8efc51b0cf4585dc3c01a69913013b9fbc52c8a758b53d2d74540bf0d3e7a7936fc3ae355fd802df938854c28e63966d90962385ddc8b8a9 deviceinfo
|
2017-11-03 23:56:56 +00:00
|
|
|
8f5b68b86f5345698114a2d70fd174699e5729f6c157659e4e57bef1dcab8c1209c13b30df6f5c2e8f31fee077039ffbc7817ca201f0745467b693e7550eaf6b uboot-script.cmd
|
2017-07-15 17:59:33 +00:00
|
|
|
3d55e34b95791636e44a5f41754f3d0de039dbba41f7a556d43a95c9e64afcfa930046b4b96b40020b6f196096ffba93514682927e32fa4488686fdd19c6da5a backlight-enable.sh
|
2018-02-01 21:47:12 +00:00
|
|
|
c6012aef28b096141b924fced226ec99fb93eb53b69c064a8887d8fecdf8dc08a3ba3db399e18d88374c6ef4c59013a30699c7e4d76e5cb771040582573a0527 90-touchscreen-dev.rules
|
2017-09-27 17:18:09 +00:00
|
|
|
9e72035c88632d12895534e5aa5746f2c130c7dcdafa8702748d62b71ed0e1b5911b6e1f07f9b9e39b6072bbb662f66aead585baa1dcacb7d8c8953ca89b6762 10-nokia-modem.rules
|
[RX51] Add support for physical events w/ acpid
This adds a way to handle physical events like keypad slide switch,
screen lock, camera lid, and others. This uses acpid from busybox (I was
wrong about the real acpid package), and anl acpi.map file to map events
to 'scripts'. The scripts are symlinked to /etc/acpi/handler.sh,
automatically by the new post-install script, where
they are handled based on which script was called. This allows for
easily adding whatever is necessary for #178.
If this PR is merged, I will create a new wiki page detailing how others
can use this framework on other devices.
There's an issue with Busybox's acpid, where it is unable to detect new
devices added after the daemon loads. This is the case on the N900,
where openrc starts acpid well before the kernel is done modprobing
drivers (e.g. gpio_keys), so it's necessary to restart the acpid daemon
after some time to 'load' the new devices.
2017-07-19 04:43:27 +00:00
|
|
|
df5dcae9a32d04ba2fed8b4dbb8722f8d56d063a288dfbaeca37806bdbb8ba4de639b392859b9f24040a1032456d5dcd754f51314e3ab66515b91ae1e03c93a7 acpi_handler.sh
|
|
|
|
7761aec6e6e219245b006e7bdc1d19812e9c5915cf3e64bb3dd46bb4b5570c1715650b53a1fc1007cb814076b5d81be0a66ba7ebf06d9a1fa4e364725c3ee633 acpi.map
|
2017-08-19 21:40:20 +00:00
|
|
|
c9ff8b5968fe94007e1139db5ae76f3ee6c214356bff297b9672276c6adb332ba2342b6ca54cf7992d6556f3c68a13ef49ae5e61abe86154935514034170e228 rx51_us.map
|
2018-03-10 13:08:33 +00:00
|
|
|
dc585e11bf4e06e36c5c62bcc024eaacecc30437d9da5257df14be05e247a2f2bc208874be3058edc6f87cc2877da2ecafd2f627d9b465d4fd24475fc21fdc71 rx51_ch-de.map
|
2018-01-29 19:33:32 +00:00
|
|
|
181187db6d88b872233f594759373f32fd08065ee340b60f0c3ff06396d99f4b1250192d70a054fcc9e51e067f6cc063c62b7d8dfff3427b292f1d0c766db206 40-xkb.conf
|
2017-09-23 01:05:54 +00:00
|
|
|
143c21f0b18a016d37cb44178e9daea09f128a90769b48353c03c3f245cb9b1f7e773b9ccee084973fc78ddd7a18c2642e54888a85bda7c7daecddc9a8c62eff pointercal
|
2017-10-07 16:19:19 +00:00
|
|
|
e023df91295fe7e410e163747d17e5b92fe3c022ff076e286778b8334368f885603b8fda65671e4a7328766da7b2552ea4df1b1399df23e504a41a6655771142 asound.state
|
2017-10-20 00:07:00 +00:00
|
|
|
e7749ce65de8e90b64f728f6ff695d4199cfcac31f0a7def19c46cd3cd6fba623b03202036ab99bdaec8611bfe7c787259f6f6ef7316f208a2b2fe9a7d01d22f weston.ini
|
2018-02-20 10:21:03 +00:00
|
|
|
bd140c57259f8788c1db49e0b85d17868d837fa094f8d3bb3dc5114b4c6ad5c184b718ceb60b920cefe6f42162477c9753d7784494b7787202c6ba57b49d5005 i3wm.conf
|
2018-03-05 21:18:13 +00:00
|
|
|
ea70ed51ed55ff307a6562985c8919d3e57c8bf6a4f6ab9fe5329477f0409da9424ca5c8371fb497ecfc5438c106d967f8258054725e4eb84e4a49e7f95f5dcd i3status.conf"
|