Normally locale addon must be installed but users don't know that. Simplify this with adding default C.UTF-8 locale in image. Users can still install addon to use some other locale.
fixes Python3 error
UnicodeEncodeError: 'ascii' codec can't encode characters in position 40-41: ordinal not in range(128)
like
https://github.com/croneter/PlexKodiConnect/issues/1447https://forum.libreelec.tv/thread/23116-pvr-recorder-unsuppored-locale/?postID=147453
from Kodi Python
before
sys.getdefaultencoding(): utf-8
sys.getfilesystemencoding(): ascii
after
sys.getdefaultencoding(): utf-8
sys.getfilesystemencoding(): utf-8
from SSH console
before
# locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
after
# locale
LANG=C.UTF-8
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=
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>
The getedid script supports the "create" and "delete" options like
the x86 version.
It makes use of the "dump-active-edids", "create-edid-cpio" and
"update-bootloader-edid" scripts and can be used as is on other
DRM platforms as well as it doesn't contain any RPi specific code.
Signed-off-by: Matthias Reichl <hias@horus.com>
The script supports two operations:
"set" enables initramfs cpio in config.txt and adds edid and video
override kernel options for the specified connectors to cmdline.txt
"delete" removes edid.cpio initramfs loading in config.txt and
removes all edid override and video options from cmdline.txt
Signed-off-by: Matthias Reichl <hias@horus.com>
The script dumps all edids of currently active connectors to
.config/firmware/edid as edid-CONNECTORNAME.bin
When run with the "-q" option informative messages are disabled
and only the active connectors are returned so the output can
be easily used by other scripts.
Signed-off-by: Matthias Reichl <hias@horus.com>
This script simply creates /flash/edid.cpio with the contents from
.config/firmware/edid
Compared to the x86 specific getedid script this works on all platforms
as it doesn't contain any platform specific code. Eventually getedid
should be refactored make use of this helper script, too.
Signed-off-by: Matthias Reichl <hias@horus.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>
From the help, pivot_root is intended for use with initrd on Linux 2.4.
Initramfs and Linux >=2.6 is supposed to use switch_root instead.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
- add package including official scrollback patch
- add patch to fix color allocation and (missing) locale
- add st-256color to ncurses and busybox profile
libreelec-target-generator replaces the logic previously used
in the initramfs init script and dynamically redirects default.target
if needed.
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>