For the SYSTEM copy to /dev always use /dev/SYSTEM as target name
to not deal with fancy path or filenames.
Thanks HiassofT for clearing it up for me why that is best.
As far as i can tell all the rest of init is fine with BOOT_IMAGE and
SYSTEM_IMAGE having slashes in there.
Just toram was broken.
This stops LE's update checker from accepting OE images as system
updates. The checker may be disabled if someone wants to do this.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
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>
The filesystem options are set to match what systemd is using when
it would create the /run tmpfs, see src/core/mount-setup.c in
systemd source code.
Signed-off-by: Matthias Reichl <hias@horus.com>
usleep is used by init's functions to create quarter and half second
progress reports. Not worth diving into for what was a 1.2kb savings.
This reverts commit 9e055544be.
Restoring system settings expects a filename of 14 characters followed
by .tar ($DATESTAMP.tar from the backup file the addon creates).
Change to glob onto whatever *.tar file gets put into /storage/.restore/
at the busybox init and system restore level. The addon still creates
and expects the $DATESTAMP.tar file, so users will need to use this
feature by ssh or other method.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Support for modules in initramfs was removed more than half a year
ago but I forgot to remove the now useless load_modules function in
init.
Signed-off-by: Matthias Reichl <hias@horus.com>
Using the soft timeout option for NFS mounts is a really bad idea
and the nfs(5) manpage explicitly warns about it's issues:
NB: A so-called "soft" timeout can cause silent data
corruption in certain cases. As such, use the soft op‐
tion only when client responsiveness is more important
than data integrity. Using NFS over TCP or increasing
the value of the retrans option may mitigate some of the
risks of using the soft option.
So don't enable it by default, anyone who feels keen to take the
risk can specify it manually on kernel command line.
Signed-off-by: Matthias Reichl <hias@horus.com>
to have a full set of binaries in the init process as early as possible
it now mounts the squashfs direct after mounting /flash.
there is also a hook /flash/post-sysroot.sh for custom scripting.
i will use this e.g. for lvm2 and cryptsetup in the init process,
because they are very big and i dont like them in initramfs.
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>
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>