The ancient approach of symlinking /var/log to /storage/log doesn't
play nice with systemd as it doesn't setup proper dependencies and
unmounting /storage during shutdown may fail because systemd doesn't
know that it's needed for /var/log.
Use a conditional bind mount instead so systemd can automatically
create proper dependencies and unmount filesystems in the correct order.
Also store the persistent logfiles on /storage in a .cache/log
directory instead of log to avoid confusing users - users can access
logfiles via /var/log.
Note: we can't use tmpfiles.d to create the .cache/log directory on
/storage because that would run after local-fs.target but we need
the .log directory before that so it has to be done via a one-shot
service.
Signed-off-by: Matthias Reichl <hias@horus.com>
Copying SYSTEM to RAM eats up precious memory that'd be better used
for kernel filesystem cache and other things and can takes quite some
time on slower storage devices like SD cards.
Instead of having two options to define a minimum RAM size (below
which SYSTEM won't be copied) and the "noram" option (which disables
copying completely) reverse the logic and use a single "toram" option
which users can set on kernel command line if they want SYSTEM copied
to RAM.
Signed-off-by: Matthias Reichl <hias@horus.com>
In some systems, xpad times out during suspend:
[ 4470.773651] xpad 2-1.5:1.6: timed out waiting for output URB to complete, killing
[ 4475.892774] xpad 2-1.5:1.4: timed out waiting for output URB to complete, killing
[ 4481.011717] xpad 2-1.5:1.2: timed out waiting for output URB to complete, killing
[ 4486.130707] xpad 2-1.5:1.0: timed out waiting for output URB to complete, killing
[ 4486.288630] PM: suspend devices took 20.880 seconds
This causes suspend to take a long time to complete. Unloading/reloading
the module during suspend/wakeup successfully works around this issue.
This allows us to use the default debug-shell.service provided
by systemd and cut down on custom made services. This will also
always provide a debug shell as there is no reason we shouldn't
have access to one.
Also swaps the necessary variable check in busybox/init to acoomodate OPENELEC_ARCH
may or may not exist, while LIBREELEC_ARCH will be assumed to exist.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
For multi-cluster CPUs (e.g. Amlogic S912) there is a separate
policy for each CPU cluster. Add a case in init script to cover
setting up_threshold for all clusters.
This changes the order of the script to be:
Necssary bring up tasks
Setting variables to control rest of system intialization
Sourcing shared functions
Setting script functions
Doing the work of bringing the system up
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Packages referencing variables defined in setup_toolchain such as CC, CXX,
AR, CFLAGS, LDFLAGS, HOST_CC etc. etc. must only reference these variables in
pre_build()/pre_configure()/pre_make() etc. functions, as the variables will not
be available when the package is sourced, but will be available after the call
to setup_toolchain() from scripts/build.