Compare commits
7 Commits
dev-sane
...
wip-system
Author | SHA1 | Date | |
---|---|---|---|
2e1bd5f0c6 | |||
![]() |
c683350b9f | ||
![]() |
2d9a96f646 | ||
![]() |
026c1b6f3b | ||
![]() |
8a231905a4 | ||
1551aabbc0 | |||
a036d1e9a1 |
@@ -15,6 +15,8 @@ If a change only affects particular applications, they are listed in parentheses
|
||||
- misc: Unify build system (!23 & !29, thanks @Jarrah & @vladimir.stoyakin)
|
||||
- misc: Ensure stable file order during builds (!24, thanks @devrtz)
|
||||
- fix: Prevent logging internal LVGL errors to stdout
|
||||
- misc: Make scdoc a native dependency to enable cross-compilation (!30, thanks @uninsane)
|
||||
- fix: Use usleep to release CPU when possible (!31, thanks @uninsane)
|
||||
|
||||
## 3.2.0 (2024-06-03)
|
||||
|
||||
|
38
buffyboard/buffyboard.service.in
Normal file
38
buffyboard/buffyboard.service.in
Normal file
@@ -0,0 +1,38 @@
|
||||
[Unit]
|
||||
Documentation=https://gitlab.postmarketos.org/postmarketOS/buffybox
|
||||
|
||||
[Service]
|
||||
ExecStart=@bindir@/buffyboard
|
||||
Restart=on-failure
|
||||
|
||||
# Allow access to input devices, framebuffer, tty
|
||||
DevicePolicy=closed
|
||||
DeviceAllow=/dev/uinput rw
|
||||
DeviceAllow=char-fb rw
|
||||
DeviceAllow=char-input rw
|
||||
DeviceAllow=char-tty rw
|
||||
# udev requires some limited networking
|
||||
RestrictAddressFamilies=AF_NETLINK
|
||||
|
||||
# Hardening
|
||||
CapabilityBoundingSet=
|
||||
NoNewPrivileges=true
|
||||
RestrictSUIDSGID=true
|
||||
PrivateMounts=true
|
||||
PrivateTmp=true
|
||||
PrivateUsers=true
|
||||
ProtectClock=true
|
||||
ProtectControlGroups=true
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectSystem=strict
|
||||
RemoveIPC=true
|
||||
LockPersonality=true
|
||||
MemoryDenyWriteExecute=true
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service
|
||||
SystemCallFilter=~@privileged
|
||||
SystemCallFilter=~@resources
|
@@ -284,7 +284,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
/* Periodically run timer / task handler */
|
||||
while(1) {
|
||||
lv_timer_periodic_handler();
|
||||
uint32_t time_till_next = lv_timer_handler();
|
||||
usleep(time_till_next * 1000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@@ -24,3 +24,13 @@ executable('buffyboard',
|
||||
|
||||
install_data('buffyboard.conf', install_dir: get_option('sysconfdir'))
|
||||
|
||||
|
||||
configure_file(
|
||||
input : 'buffyboard.service.in',
|
||||
output : 'buffyboard.service',
|
||||
install : true,
|
||||
install_dir : get_option('libdir') / 'systemd/system',
|
||||
configuration : {
|
||||
'bindir' : get_option('prefix') / get_option('bindir'),
|
||||
},
|
||||
)
|
||||
|
@@ -11,7 +11,7 @@ deplibinput = dependency('libinput')
|
||||
deplibudev = dependency('libudev')
|
||||
|
||||
if get_option('man')
|
||||
depscdoc = dependency('scdoc')
|
||||
depscdoc = dependency('scdoc', native: true)
|
||||
endif
|
||||
|
||||
common_include_dirs = include_directories('.')
|
||||
|
@@ -591,7 +591,8 @@ int main(int argc, char *argv[]) {
|
||||
uint32_t timeout = conf_opts.general.timeout * 1000; /* ms */
|
||||
while(1) {
|
||||
if (!timeout || lv_disp_get_inactive_time(NULL) < timeout) {
|
||||
lv_timer_periodic_handler();
|
||||
uint32_t time_till_next = lv_timer_handler();
|
||||
usleep(time_till_next * 1000);
|
||||
} else if (timeout) {
|
||||
shutdown();
|
||||
}
|
||||
|
Reference in New Issue
Block a user