Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmaports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
postmarketOS
pmaports
Commits
4f3ed7f7
Verified
Commit
4f3ed7f7
authored
3 years ago
by
Johannes Marbach
Committed by
Clayton Craft
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
main/osk-sdl: add fde-unlock script (MR 2687)
parent
816937b1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.ci/shellcheck.sh
+1
-0
1 addition, 0 deletions
.ci/shellcheck.sh
main/osk-sdl/APKBUILD
+14
-2
14 additions, 2 deletions
main/osk-sdl/APKBUILD
main/osk-sdl/osk-sdl.files
+1
-0
1 addition, 0 deletions
main/osk-sdl/osk-sdl.files
main/osk-sdl/unlock.sh
+55
-0
55 additions, 0 deletions
main/osk-sdl/unlock.sh
with
71 additions
and
2 deletions
.ci/shellcheck.sh
+
1
−
0
View file @
4f3ed7f7
...
...
@@ -16,6 +16,7 @@ fi
# Shell: shellcheck
sh_files
=
"
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh
./main/osk-sdl/unlock.sh
./main/postmarketos-base/rootfs-usr-lib-firmwareload.sh
./main/postmarketos-installkernel/installkernel-pmos
./main/postmarketos-mkinitfs/init.sh
...
...
This diff is collapsed.
Click to expand it.
main/osk-sdl/APKBUILD
+
14
−
2
View file @
4f3ed7f7
...
...
@@ -5,7 +5,7 @@
# https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10712
pkgname
=
osk-sdl
pkgver
=
0.66
pkgrel
=
0
pkgrel
=
1
pkgdesc
=
"Onscreen keyboard for unlocking LUKS devices"
url
=
"https://gitlab.com/postmarketOS/osk-sdl"
arch
=
"all"
...
...
@@ -25,7 +25,11 @@ makedepends="
sdl2-dev
sdl2_ttf-dev
"
source
=
"https://gitlab.com/postmarketOS/osk-sdl/-/archive/
$pkgver
/osk-sdl-
$pkgver
.tar.gz"
source
=
"
https://gitlab.com/postmarketOS/osk-sdl/-/archive/
$pkgver
/osk-sdl-
$pkgver
.tar.gz
osk-sdl.files
unlock.sh
"
options
=
"!strip !check"
# No tests
subpackages
=
"
$pkgname
-doc"
provides
=
"postmarketos-fde-unlocker"
...
...
@@ -39,12 +43,20 @@ build() {
package
()
{
DESTDIR
=
"
$pkgdir
"
meson
install
--no-rebuild
-C
build
install
-Dm755
"
$srcdir
"
/unlock.sh
\
"
$pkgdir
"
/bin/fde-unlock
# needed to trigger initfs rebuild:
touch
osk-sdl
install
-Dm644
osk-sdl
\
"
$pkgdir
"
/usr/share/postmarketos-mkinitfs-triggers/osk-sdl
install
-Dm644
"
$srcdir
"
/osk-sdl.files
\
"
$pkgdir
"
/etc/postmarketos-mkinitfs/files/30-osk-sdl.files
}
sha512sums
=
"
e4bc5bf6c6faa536a66c48451b88dd9228f2ff2f82e23963607a111df83a48296158b0408b1889c93d3cfe31e48c089f7be68bb5b7c06b01bd43970a824babdb osk-sdl-0.66.tar.gz
e1017bc0667756b82527d88f47a77e2f5a44e0769b5ccdea0c6c1f86bd3d0a1df9d9f5bbb224888748cfef5edc3375036a25099eb02c963302f155c3b2e8fefd osk-sdl.files
5e2de0da40f3b409cb01c388ab61e8072db30789af6f8a7fec817699dcb928b8aec25288fb1e59403e99769dec032f1b446bcc5f761d9a6504e238fa205281fd unlock.sh
"
This diff is collapsed.
Click to expand it.
main/osk-sdl/osk-sdl.files
0 → 100644
+
1
−
0
View file @
4f3ed7f7
/bin/fde-unlock
This diff is collapsed.
Click to expand it.
main/osk-sdl/unlock.sh
0 → 100644
+
55
−
0
View file @
4f3ed7f7
#!/bin/sh
# shellcheck disable=SC1091
partition
=
$1
.
/etc/deviceinfo
# $1: SDL_VIDEODRIVER value (e.g. 'kmsdrm', 'directfb')
run_osk_sdl
()
{
unset
ETNA_MESA_DEBUG
unset
SDL_VIDEODRIVER
unset
DFBARGS
unset
TSLIB_TSDEVICE
unset
OSK_EXTRA_ARGS
case
"
$1
"
in
"kmsdrm"
)
# Set up SDL and Mesa env to use kmsdrm backend
export
SDL_VIDEODRIVER
=
"kmsdrm"
# needed for librem 5
export
ETNA_MESA_DEBUG
=
"no_supertile"
;;
"directfb"
)
# Set up directfb and tslib
# Note: linux_input module is disabled since it will try to take over
# the touchscreen device from tslib (e.g. on the N900)
# Note: ps2mouse module is disabled because it causes
# jerky/inconsistent touch input on some devices
export
DFBARGS
=
"system=fbdev,no-cursor,disable-module=linux_input,disable-module=ps2mouse"
export
SDL_VIDEODRIVER
=
"directfb"
# SDL/directfb tries to use gles even though it's not
# actually available, so disable it in osk-sdl
export
OSK_EXTRA_ARGS
=
"--no-gles"
# shellcheck disable=SC2154
if
[
-n
"
$deviceinfo_dev_touchscreen
"
]
;
then
export
TSLIB_TSDEVICE
=
"
$deviceinfo_dev_touchscreen
"
fi
;;
esac
# osk-sdl needs evdev for input and doesn't launch without it, so
# make sure the module isn't missed
modprobe evdev
osk-sdl
$OSK_EXTRA_ARGS
-n
root
-d
"
$partition
"
-c
/etc/osk.conf
\
-o
/boot/osk.conf
-v
>
/osk-sdl.log 2>&1
}
# shellcheck disable=SC2154
if
[
-n
"
$deviceinfo_mesa_driver
"
]
;
then
# try to run osk-sdl with kmsdrm driver, then fallback to
# directfb if that fails
if
!
run_osk_sdl
"kmsdrm"
;
then
run_osk_sdl
"directfb"
fi
else
run_osk_sdl
"directfb"
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment