Commit graph

39 commits

Author SHA1 Message Date
GavinDarkglider
47c07c60ba
[WIP]Lakka 5.x Switch changes..... (#1853)
* Latest 4.3 changes poorly merged

* Build fixes

* Squash?

* Fix ppsspp on switch

* Fix video recording, add base stuff for nvv4l2 decoder/encoder, but leave disabled for now

* Clean up left over files

* Switch: Dont build xpadneo driver, but install configs

* FFMpeg: Add back L4T decoder Patches
2023-06-10 03:16:27 +03:00
CvH
9099377b1d
Merge pull request #5204 from lrusak/systemd-hwdb
systemd: use default hwdb service
2021-08-11 13:11:43 +02:00
mglae
830c72fe53 systemd: fix systemd-machine-id-setup for v247 special case 2021-05-27 19:58:25 +02:00
Lukas Rusak
a5099794ec
systemd: use default hwdb service 2021-03-02 08:15:12 -08:00
Matthias Reichl
8f1344f6fd Move kernel overlays setup to init
When running kernel-overlays-setup as a systemd service we have
a short window where /lib/firmware isn't available.

This causes drm edid override to occasionally fail if the edid file
is requested between switching to sysroot and completion of the
kernel-overlays-setup script.

Setting up firmware and module overlays in init, before switching
to sysroot, closes the gap and also has the benefit that we no longer
need to care about the rather tedious systemd unit ordering.

Signed-off-by: Matthias Reichl <hias@horus.com>
2021-02-08 16:16:17 +01:00
Matthias Reichl
2f9d16a509 systemd: fix kernel-overlays.service ordering
kernel-overlays.service needs to be ordered before the modprobe@
instances, which were introduced in systemd 245, otherwise
modprobe@drm.service can run before /lib/firmware exists and
edid-override will fail.

Fix that by adding modprobe@.service template drop-in to order it
after kernel-overlays.service

Signed-off-by: Matthias Reichl <hias@horus.com>
2020-12-22 20:48:06 +01:00
Matthias Reichl
03b32a6f08 systemd: cleanup hwdb.service
Use systemd-hwdb instead of deprecated udevadm hwdb command
and fix ordering - it should be pulled in by sysinit.target,
not basic.target.

Signed-off-by: Matthias Reichl <hias@horus.com>
2020-09-29 09:51:48 +02:00
Matthias Reichl
3a5b1f118f add RemainAfterExit=yes to our oneshot systemd services
This is required since systemd 245, without it oneshot services
may get started more than once.

Signed-off-by: Matthias Reichl <hias@horus.com>
2020-03-13 18:41:26 +01:00
Matthias Reichl
dad3581441 kernel-overlays: move volatile runtime data to /run
Create the module and firmware symlink trees in /run/kernel-overlays
instead of /var/lib as recommended by FHS 3.0. This also allows us
to drop the After=var.mount ordering in the systemd service.

Signed-off-by: Matthias Reichl <hias@horus.com>
2020-01-10 12:03:23 +01:00
MilhouseVH
af5bf90616 systemd: add /etc/environment and service 2019-12-18 00:49:13 +00:00
MilhouseVH
29479e55d0
Merge pull request #3984 from HiassofT/le10-systemd-storage-deps
systemd: prevent unmounting storage via umount.target
2019-11-29 21:38:28 +00:00
Matthias Reichl
750dd4add2 systemd: enable systemd-timesyncd when using kernel ip configuration
connman's NTP client can't be used if it's not managing the network
interface so use systemd's timesyncd as we already build it.

timesyncd is automatically configured to use the NTP servers provided
by kernel ip config, if they are missing the default fallback NTP
servers (currently the ones from Google) are used.

Users can also provide timesyncd configuration files via
/storage/.config/timesyncd.conf.d/ eg to change the (fallback) servers.

Signed-off-by: Matthias Reichl <hias@horus.com>
2019-11-15 18:54:04 +01:00
Matthias Reichl
1dfbcbd8b4 connman: move host and resolver configuration to separate service
Setup system hostname, /etc/resolv.conf and /etc/hosts in a service
that can be run independently of connman.

The volatile etc files are created in /run/libreelec instead of
/run/connman so they can be modified similarily to standard linux
installations with a writable /etc. Connman can then hook into
that and move resolv.conf management to /run/connman/resolv.conf when
it's started.

If kernel IP configuration is used the resolv info from the kernel
will be used to create resolv.conf. Users can also provide their
own resolv.conf file in /storage/.config/resolv.conf which takes
precedence over ther kernel info. If no resolv.conf info is present
a fallback with use the Google nameservers is created (as before).

Loopback network interface setup has been removed, this is already
set up by systemd.

Signed-off-by: Matthias Reichl <hias@horus.com>
2019-11-15 18:54:04 +01:00
Matthias Reichl
ed4e345f25 systemd: prevent unmounting storage via umount.target
/storage will be unmounted by systemd-shutdown, like /flash.

As the squashfs root has several symlinks to /storage it
should not be unmounted during the normal shutdown process.
This prevents the symlinked files/directories vanishing too early
and also removes the "unmount /storage failed" messages when
netbooting.

Signed-off-by: Matthias Reichl <hias@horus.com>
2019-11-15 17:30:11 +01:00
Ian Leonard
f27caaddc1 systemd: use a cpufreq service to configure cpu governor
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2019-10-28 15:55:22 +00:00
Matthias Reichl
74de7b2aca systemd: prevent unmounting flash via umount.target
add drop-in to set DefaultDependencies=no on /flash mount. This
removes the Conflicts=umount.target and /flash won't be unmounted
by systemd. systemd-shutdown will then later remount it ro and
try to unmount it.

Signed-off-by: Matthias Reichl <hias@horus.com>
2019-09-13 23:44:19 +02:00
MilhouseVH
8653021842 shadow: add usercache-setup and usercache service 2017-12-08 03:31:40 +00:00
Matthias Reichl
ad9e8dc372 Add support for kernel overlays
Core Kernel modules are now installed to
/usr/lib/kernel-overlays/base/lib/modules instead of /usr/lib/modules

Firmware files are installed to
/usr/lib/kernel-overlays/base/lib/firmware instead of /usr/lib/firmware

Packages can choose to install their modules and/or firmwareinto a
different overlay directory than base so they are not automatically enabled.

A new systemd service kernel-overlays, which is run before any modules
are loaded, adds overlays enabled via /storage/.cache/kernel-overlays/*.conf

These conf files must either contain the name of a system overlay,
which will then be searched for in /usr/lib/kernel-overlays/, or an
absolute path starting with '/'.

Overlaying is implemented by symlinking files from the overlays
to /usr/lib/modules and /usr/lib/firmware as not all platforms
support overlayfs.

This overlaying system can also be used by addons to provide optional
kernel modules and/or firmware by storing the absolute path to the addon
directory in the conf file and shipping kernel modules in
<addondir>/lib/modules/<KERNELVER>.

To save space only symlinks for modules matching the currently
running kernel version are created as addons may want to ship
modules for older kernel versions as well to be backward-compatible
to older LibreELEC versions.

Changes since v1:
- fixup kernel-overlays-service: add before kmod-static-nodes.service
  Fix static device nodes for module autoloading not being created.
- fixup kernel-overlays-service: fail if /usr/lib/modules exists
- squash kernel overlays: use get_kernel_overlay_dir in linux/package.mk
- Add support for firmware files via kernel overlays
- config/functions: include kernel overlays in addon installation

Signed-off-by: Matthias Reichl <hias@horus.com>
2017-10-12 20:04:02 +02:00
MilhouseVH
cae8b49942 userconfig: overwrite our sample files 2017-03-23 20:27:21 +00:00
Peter Vicman
b3f49fad47 systemd: machine-id.service is required for systemd-tmpfiles-setup-dev.service
fixes unneeded console messages (mostly for first boot):

[FAILED] Failed to start Create Static Device Nodes in /dev.
See 'systemctl status systemd-tmpfiles-setup-dev.service' for details.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Variable Directory.
[  OK  ] Mounted Temporary Directory.
[  OK  ] Started Setup machine-id.
[  OK           Starting Journal Service...
[  OK  ] Reached target Local File Systems.
        Starting Setup Timezone data...
[  OK  ] Started Setup Timezone data.
2016-10-31 08:46:40 +01:00
Lukas Rusak
40af353132 rebrand: LibreELEC 2016-03-12 01:41:55 +01:00
Stefan Saraev
802a8e7cb5 userconfig: run after systemd-tmpfiles-setup 2015-01-18 18:10:09 +02:00
Stefan Saraev
0821b9008c debugconfig: run after systemd-tmpfiles-setup 2015-01-18 18:07:47 +02:00
Stephan Raue
c787c452ce systemd: move userconfig.service to sysinit.target 2014-11-08 18:45:02 +01:00
Stephan Raue
0d679d52d9 systemd: machine-id.service has no job after local-fs.target 2014-11-08 18:44:58 +01:00
Stefan Saraev
7720ff6f6d userconfig.service: make sure /storage/.config is there
because tmpfiles doesnt work here, as userconfig.service
is ordered before=local-fs.target (?!)

this also reverts 9de09b4507

thanks to @vpeter4
2014-08-12 20:24:05 +03:00
Stefan Saraev
046d192206 systemd: simplify userconfig.service
*.sample will not be force overwritten, but I dont really care
2014-08-04 02:03:41 +02:00
Stefan Saraev
2a9ff007e1 systemd: hwdb: fix udevadm path after systemd 209 2014-02-21 00:17:57 +02:00
Stephan Raue
6bfa5b0ee4 systemd: update to systemd-209, move systemd rootdir dir to /usr
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2014-02-20 19:44:18 +01:00
Stefan Saraev
e0166f1fdb systemd: add hwdb.service 2013-10-22 21:11:22 +03:00
Stefan Saraev
260069cca7 systemd: rework machine-idd service
- always set a *valid* machine-id
- start machine-id.service before journald
2013-10-08 18:40:48 +03:00
Stefan Saraev
baf8b197dc add optional /storage/.cache/debug.openelec to enable debugging 2013-08-30 20:35:24 +03:00
Stephan Raue
59dbdf7192 systemd: rework debugconfig.service
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2013-08-24 22:05:41 +02:00
Stephan Raue
b5a5bff496 systemd: rework userconfig.service
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2013-08-24 22:04:58 +02:00
Stephan Raue
755c10994e systemd: rework debugconfig service
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2013-08-18 14:10:28 +02:00
Stephan Raue
a2b8cac8c8 systemd: start debugconfig.service after local-fs.target
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2013-08-11 04:24:27 +02:00
Stephan Raue
cf90aeee41 systemd: add debug config script and service, add avahi debug options
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2013-08-11 00:25:22 +02:00
Stephan Raue
6c126347ad busybox: port userconfig script setup to systemd
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2013-08-08 04:00:57 +02:00
Stephan Raue
85c9783459 busybox: port machine-id script setup to systemd
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2013-08-08 03:43:08 +02:00