2019-07-20 21:30:08 +00:00
|
|
|
# Reference: <https://postmarketos.org/devicepkg>
|
2018-01-21 15:09:38 +00:00
|
|
|
pkgname=device-nokia-n900
|
2019-07-20 21:30:08 +00:00
|
|
|
pkgver=5
|
2020-03-22 00:21:20 +00:00
|
|
|
pkgrel=8
|
2017-06-08 17:27:02 +00:00
|
|
|
pkgdesc="Nokia N900"
|
2018-06-30 07:00:48 +00:00
|
|
|
url="https://postmarketos.org"
|
2019-02-27 14:09:53 +00:00
|
|
|
arch="armv7"
|
2017-06-08 17:27:02 +00:00
|
|
|
license="MIT"
|
2020-03-22 00:21:20 +00:00
|
|
|
depends="postmarketos-base linux-nokia-n900 uboot-tools kbd kbd-bkeymaps ofono mesa-dri-swrast alsa-utils"
|
2020-01-10 16:37:09 +00:00
|
|
|
makedepends="devicepkg-dev 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
|
2019-11-18 23:15:17 +00:00
|
|
|
$pkgname-xfce4
|
2018-02-26 22:11:44 +00:00
|
|
|
$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
|
2019-07-30 23:25:27 +00:00
|
|
|
keymaps/rx51_ch.map
|
2019-02-27 19:12:06 +00:00
|
|
|
keymaps/rx51_it.map
|
2018-01-29 19:33:32 +00:00
|
|
|
keymaps/40-xkb.conf
|
2017-09-23 01:05:54 +00:00
|
|
|
pointercal
|
2020-03-22 00:21:20 +00:00
|
|
|
asound.state.speakers
|
|
|
|
asound.state.headset
|
2017-10-20 00:07:00 +00:00
|
|
|
weston.ini
|
2019-07-20 21:30:08 +00:00
|
|
|
i3wm/scripts/battery-bq27200
|
|
|
|
i3wm/scripts/ofono
|
|
|
|
i3wm/scripts/calendar
|
|
|
|
i3wm/scripts/wifi
|
2018-11-22 05:45:46 +00:00
|
|
|
i3wm/conky.conf
|
2018-02-20 10:21:03 +00:00
|
|
|
i3wm/i3wm.conf
|
2019-07-20 21:30:08 +00:00
|
|
|
i3wm/i3blocks.conf
|
2018-11-22 05:45:46 +00:00
|
|
|
i3wm/protip_shell.sh
|
2018-08-25 22:17:32 +00:00
|
|
|
xorg.conf
|
2019-04-12 23:00:02 +00:00
|
|
|
10-noroot-suspend
|
2019-07-30 23:25:27 +00:00
|
|
|
10-initfs-keymap.files
|
|
|
|
10-initfs-keymap.sh
|
2020-03-22 00:21:20 +00:00
|
|
|
device-nokia-n900.start
|
2017-08-19 21:40:20 +00:00
|
|
|
"
|
2018-11-07 06:45:58 +00:00
|
|
|
options="!check !archcheck"
|
2017-06-08 17:27:02 +00:00
|
|
|
|
|
|
|
build() {
|
2020-01-10 16:37:09 +00:00
|
|
|
devicepkg_build $startdir $pkgname
|
|
|
|
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
|
2019-07-30 23:25:27 +00:00
|
|
|
loadkeys -b "$srcdir"/rx51_ch.map > "$srcdir"/keymaps/rx51_ch.bmap
|
|
|
|
gzip "$srcdir"/keymaps/rx51_ch.bmap
|
2019-02-27 19:12:06 +00:00
|
|
|
loadkeys -b "$srcdir"/rx51_it.map > "$srcdir"/keymaps/rx51_it.bmap
|
|
|
|
gzip "$srcdir"/keymaps/rx51_it.bmap
|
2017-06-08 17:27:02 +00:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2020-01-10 16:37:09 +00:00
|
|
|
devicepkg_package $startdir $pkgname
|
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 \
|
2020-01-10 16:37:09 +00:00
|
|
|
"$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
|
2020-03-22 00:21:20 +00:00
|
|
|
install -D -m644 "$srcdir"/asound.state.speakers \
|
|
|
|
"$pkgdir"/var/lib/alsa/asound.state.speakers
|
|
|
|
install -D -m644 "$srcdir"/asound.state.headset \
|
|
|
|
"$pkgdir"/var/lib/alsa/asound.state.headset
|
2019-07-30 23:25:27 +00:00
|
|
|
install -Dm644 "$srcdir"/10-initfs-keymap.files \
|
|
|
|
"$pkgdir"/etc/postmarketos-mkinitfs/files/10-initfs-keymap.files
|
|
|
|
install -Dm644 "$srcdir"/10-initfs-keymap.sh \
|
|
|
|
"$pkgdir"/etc/postmarketos-mkinitfs/hooks/10-initfs-keymap.sh
|
2020-03-22 00:21:20 +00:00
|
|
|
install -Dm755 "$srcdir"/$pkgname.start \
|
|
|
|
"$pkgdir"/etc/local.d/$pkgname.start
|
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
|
2019-07-30 23:25:27 +00:00
|
|
|
install -D -m644 "$srcdir"/keymaps/rx51_ch.bmap.gz \
|
|
|
|
"$pkgdir"/usr/share/bkeymaps/ch/rx51_ch.bmap.gz
|
2019-02-27 19:12:06 +00:00
|
|
|
install -D -m644 "$srcdir"/keymaps/rx51_it.bmap.gz \
|
|
|
|
"$pkgdir"/usr/share/bkeymaps/it/rx51_it.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-08-25 22:17:32 +00:00
|
|
|
install -D -m644 "$srcdir"/xorg.conf \
|
|
|
|
"$subpkgdir"/etc/X11/xorg.conf.d/11-n900.conf
|
2018-01-29 19:33:32 +00:00
|
|
|
}
|
|
|
|
|
2018-02-20 10:21:03 +00:00
|
|
|
i3wm() {
|
|
|
|
install_if="$pkgname postmarketos-ui-i3wm"
|
2019-07-20 21:30:08 +00:00
|
|
|
depends="unclutter-xfixes conky feh postmarketos-artwork-wallpapers pm-utils i3blocks"
|
2018-02-20 10:21:03 +00:00
|
|
|
install -D -m644 "$srcdir"/i3wm.conf \
|
|
|
|
"$subpkgdir"/etc/skel/.config/i3/config
|
2019-07-20 21:30:08 +00:00
|
|
|
install -D -m644 "$srcdir"/i3blocks.conf \
|
|
|
|
"$subpkgdir"/etc/skel/.config/i3blocks/config
|
|
|
|
install -D -m755 "$srcdir"/battery-bq27200 \
|
|
|
|
"$subpkgdir"/etc/skel/.config/i3blocks/battery-bq27200
|
|
|
|
install -D -m755 "$srcdir"/ofono \
|
|
|
|
"$subpkgdir"/etc/skel/.config/i3blocks/ofono
|
|
|
|
install -D -m755 "$srcdir"/calendar \
|
|
|
|
"$subpkgdir"/etc/skel/.config/i3blocks/calendar
|
|
|
|
install -D -m755 "$srcdir"/wifi \
|
|
|
|
"$subpkgdir"/etc/skel/.config/i3blocks/wifi
|
2018-11-22 05:45:46 +00:00
|
|
|
install -D -m755 "$srcdir"/protip_shell.sh \
|
|
|
|
"$subpkgdir"/etc/skel/.protip_shell.sh
|
|
|
|
install -D -m644 "$srcdir"/conky.conf \
|
|
|
|
"$subpkgdir"/etc/skel/.config/conky/conky.conf
|
2019-04-12 23:00:02 +00:00
|
|
|
install -D -m440 "$srcdir"/10-noroot-suspend \
|
|
|
|
"$subpkgdir"/etc/sudoers.d/10-noroot-suspend
|
2018-02-20 10:21:03 +00:00
|
|
|
}
|
|
|
|
|
2019-11-18 23:15:17 +00:00
|
|
|
xfce4() {
|
|
|
|
install_if="$pkgname postmarketos-ui-xfce4"
|
|
|
|
install="$subpkgname.post-install"
|
|
|
|
mkdir "$subpkgdir"
|
|
|
|
}
|
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2020-03-10 09:15:23 +00:00
|
|
|
sha512sums="65317422ccbb263dd1eeb92b4a37357769f4e3e6a6f0ef812b1d4ac46fc5f00bef204e257945cca3e31b1123702c7ace0f129dd367849a27b18023b0e87a2d64 deviceinfo
|
2020-03-17 01:46:43 +00:00
|
|
|
01520977509df36248d0e44b3b2c18db0cefeb65e9ed5df96508eb0ed08304458a58ecd2bd21117771fe71e765b5f811c583909cad9a2c210de687a161e7234b 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
|
2020-03-22 00:21:20 +00:00
|
|
|
cd5ff582e935c4d28ba359944b197b5486645451790f59e96d9faa4136bf9010c425bfd3c8e46d4b490b4f36fd3336c1d49dd18bc0e2c5738b81520f356adf20 acpi_handler.sh
|
|
|
|
b3612348af1465c6dc21ce30153fc7e2cce3ae7f9bf9ff34d5a560e173e174275c1701dd7c45337fa56caaadb252b9494bddf997a698d665d3a8c01cde6955c7 acpi.map
|
2019-08-22 00:11:17 +00:00
|
|
|
e440ed7a3070c17e003b86b72dbe6d8194d01b577ca8dd56dd066f216b6dda32bb965c780950f1789a66f7c948290016b048da9f1cf63aba9e11d7e7fd6873ba rx51_us.map
|
2019-07-30 23:25:27 +00:00
|
|
|
dc585e11bf4e06e36c5c62bcc024eaacecc30437d9da5257df14be05e247a2f2bc208874be3058edc6f87cc2877da2ecafd2f627d9b465d4fd24475fc21fdc71 rx51_ch.map
|
2019-02-27 19:12:06 +00:00
|
|
|
082a5166e38296b097e873b0b4aeaf007e594d3bf4470c74e91ee3efedcf28ad25cd55c23dd63e460339898ae08e77e111b0e1092fa5e661db90bb40732103a1 rx51_it.map
|
2018-01-29 19:33:32 +00:00
|
|
|
181187db6d88b872233f594759373f32fd08065ee340b60f0c3ff06396d99f4b1250192d70a054fcc9e51e067f6cc063c62b7d8dfff3427b292f1d0c766db206 40-xkb.conf
|
2017-09-23 01:05:54 +00:00
|
|
|
143c21f0b18a016d37cb44178e9daea09f128a90769b48353c03c3f245cb9b1f7e773b9ccee084973fc78ddd7a18c2642e54888a85bda7c7daecddc9a8c62eff pointercal
|
2020-03-22 00:21:20 +00:00
|
|
|
67acc17a33bc75113300393b4a5bba15319014032407e774d079abf310368e75f4f697dbb4856ba2d2d8ea184b056bb33561f42918de3ee91ab6a77df89a133c asound.state.speakers
|
|
|
|
5b87071834313a389f83d29f86f6e3ea108d0921f17dc918be7a46de7e74c73a4418044ef600a0fbf72c8fad22b7730dcd5bfe3d6d01d76bf01556f8540f0b32 asound.state.headset
|
2018-05-05 14:27:13 +00:00
|
|
|
7f48d1a044f8c02f7b1d11487ec1f83978d9b0ea12529156e7418f82be556d9baee32b70c4d911174e388bb4941dc19519e93e7551d00ffcd825c848665ff096 weston.ini
|
2019-07-20 21:30:08 +00:00
|
|
|
d150c2766f75c0f585380ae5f088896f0c8b03dc39df7195c84fc5dc78e487dbb3d623621652daa46e3b8722690af6c0485834856e0967bc3729f67122d435a0 battery-bq27200
|
|
|
|
82038d38f94cb975a8d38914afca49b64957446bef7490ab684efa1df47ede2ea1c769045789bb9fded673345eea01911fbbf85fdb54c28685cad8022bfaafac ofono
|
|
|
|
d9ef88c714e9fce8822f63b7a9d7fc3e1ed472c8c876b44ba524d44efea322839f13ddd2fa652420608427ecf7279bfaac302c9b67667f32796ca21da332164d calendar
|
|
|
|
9791ea5f3f0d1ad4f74e2bc18af2ceccb4b8df6262f1566c67f1fd292928bfc75504d0deed32d24495a0d58ca52a52a97ae5ecd2efc34688631af04b131867ad wifi
|
2018-11-22 05:45:46 +00:00
|
|
|
16c31bf28b9dcc256821b153de199bd27decc76e4bde63130c1d1556a63cf2cafb64c4d4df42e00690564fce801c5216e8e97e4262a546440fd4bc2e14eaae1c conky.conf
|
2019-07-20 21:30:08 +00:00
|
|
|
7e8a92b828a3cb823b8df0c67ff3cb72d220f2fdc4557a613ad051baaf7e6e3d0865cdfb5eadff7f4b04302ac650bc485863e26f4d54485d5a1c2389ac0793e3 i3wm.conf
|
|
|
|
826a3790b49324c1e61c75b6c0ffc043a2a1d7c13a8c554fb5eae4977af47a1ca93d70ef8c783d712b953b70e18ae58fa4c6a49bf97263398a01a0c4f91ebc8f i3blocks.conf
|
2018-11-22 05:45:46 +00:00
|
|
|
0b80af9fd1f36e6bc06bdfdf48352897234ac7457210649016665da8570a5a64b8a0841b4fbeb64fd7054a5246a64718cf4412f8a53024ce39b28a80984972d8 protip_shell.sh
|
2019-04-12 23:00:02 +00:00
|
|
|
a91f98daa60efa2beb2ff6b405097f92edca5f1bbb9e7675499139be52ca2570712f8f06f9032ef29f636f99c8f8da8b992f746eab6424aac04260c16158bcc2 xorg.conf
|
2019-07-30 23:25:27 +00:00
|
|
|
38ecdf876b5aa9df2e5ea61c7ebb6f9ca871bdf433029808d028d563dfd740232b3dc21dba098a7622453212af1272e2e782be861b4a96a49fd475a618442d45 10-noroot-suspend
|
|
|
|
ae5c4c2452d8da66174d4eef9644796b29b0188ad683a6516be3710e0893db5447583f8b46ec9b76144e030c1ce4d9c316542af25b9369d9f27b8c026f6e0fe1 10-initfs-keymap.files
|
2020-03-22 00:21:20 +00:00
|
|
|
4656d3b3ced0a86e2d6315c89322899f646a689e9cb64609aa8ad5a676b23d93706d8a37f3be6f6b12c6b1e8501b7d26ecafecf27322333850513a6805c61910 10-initfs-keymap.sh
|
|
|
|
e6bbac8de1a198ba716f44ade76606e1e0adcc574156b855ac41be5eb5308389d3277fd89cc34b119fbc33d9801ab9f79a6ff213392596bff40bc17e931c05ef device-nokia-n900.start"
|