From cbbddff3077a77f95d6b983d46ea5db6369c16fc Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Tue, 28 Apr 2020 21:48:35 +0000 Subject: [PATCH 1/8] distro: organize options This breaks up the LibreELEC distro options file into categories: Distro Information - Information about what the distro is called / does User Interface - Settings that affect how the user will interact with the device (passwords, greetings, name of partitions) Buildsystem Settings - Options affecting the distro toolchain OS Configuration - Options about the base OS, regardless of distro purpose Kodi Settings - All the various knobs for configuring Kodi Addon Settings - Distro addon repo and settings addon Additional Programs / Functions - Programs or Support features to complement the distro's purpose Signed-off-by: Ian Leonard --- distributions/LibreELEC/options | 188 ++++++++++++++++++-------------- 1 file changed, 104 insertions(+), 84 deletions(-) diff --git a/distributions/LibreELEC/options b/distributions/LibreELEC/options index 09da4785e7..a1787c9d41 100644 --- a/distributions/LibreELEC/options +++ b/distributions/LibreELEC/options @@ -1,11 +1,4 @@ -# LTO (Link Time Optimization) support - LTO_SUPPORT="yes" - -# GOLD (Google Linker) support - GOLD_SUPPORT="yes" - -# HARDENING (security relevant linker and compiler flags) support - HARDENING_SUPPORT="no" +### DISTRO INFORMATION ### # Name of the Distro to build (full name, without special characters) DISTRONAME="LibreELEC" @@ -13,6 +6,9 @@ # short project description DESCRIPTION="LibreELEC is a fast and user-friendly Kodi Entertainment Center distribution." + +### USER INTERFACE SETTINGS ### + # Welcome Message for e.g. SSH Server (up to 5 Lines) GREETING0="##############################################" GREETING1="# LibreELEC #" @@ -23,9 +19,57 @@ # Root password to integrate in the target system ROOT_PASSWORD="libreelec" +# Partition labels for USB/SD installation media + DISTRO_BOOTLABEL="LIBREELEC" + DISTRO_DISKLABEL="STORAGE" + + +### BUILDSYSTEM SETTINGS #### + +# LTO (Link Time Optimization) support + LTO_SUPPORT="yes" + +# GOLD (Google Linker) support + GOLD_SUPPORT="yes" + +# HARDENING (security relevant linker and compiler flags) support + HARDENING_SUPPORT="no" + +# Default supported get handlers (archive, git, file etc.) + GET_HANDLER_SUPPORT="archive" + + +### OS CONFIGURATION ### + # Install glibc locales to the build (yes / no) GLIBC_LOCALES="yes" +# additional drivers to install: +# for a list of additional drivers see packages/linux-drivers +# Space separated list is supported, +# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" + ADDITIONAL_DRIVERS="RTL8192CU RTL8192DU RTL8192EU RTL8188EU RTL8812AU" + +# Default size of system partition, in MB, eg. 512 + SYSTEM_SIZE=512 + +# Default system partition offset, in sectors, eg. 2048 + SYSTEM_PART_START=8192 + +# build with swap support (yes / no) + SWAP_SUPPORT="yes" + +# swap support enabled per default (yes / no) + SWAP_ENABLED_DEFAULT="no" + +# swapfile size if SWAP_SUPPORT=yes in MB + SWAPFILESIZE="128" + +# debug tty path + DEBUG_TTY="/dev/tty3" + + +### KODI SETTINGS ### # Mediacenter to use (kodi / no) MEDIACENTER="kodi" @@ -64,12 +108,6 @@ # (DVD decryption support in KODI) (yes / no) KODI_DVDCSS_SUPPORT="yes" -# additional drivers to install: -# for a list of additional drivers see packages/linux-drivers -# Space separated list is supported, -# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" - ADDITIONAL_DRIVERS="RTL8192CU RTL8192DU RTL8192EU RTL8188EU RTL8812AU" - # build and install bluetooth support (yes / no) BLUETOOTH_SUPPORT="yes" @@ -100,6 +138,40 @@ # build with Samba Client support (mounting SAMBA shares with KODI) (yes / no) KODI_SAMBA_SUPPORT="yes" + +### KODI ADDONS ### + +# Distribution Specific source location + DISTRO_MIRROR="http://sources.libreelec.tv/mirror" + DISTRO_SRC="http://sources.libreelec.tv/$LIBREELEC_VERSION" + +# Addon Server Url + ADDON_SERVER_URL="https://addons.libreelec.tv" + +# set the default addon project + ADDON_PROJECT="${DEVICE:-$PROJECT}" + +# Settings package name - blank if not required + DISTRO_PKG_SETTINGS="LibreELEC-settings" + DISTRO_PKG_SETTINGS_ID="service.libreelec.settings" + + +### ADDITIONAL PROGRAMS / FUNCTIONS ### + +# Testpackages for development (yes / no) + TESTING="no" + +# Configure debug groups (space delimited key=value pairs, with each value comma-delimited) and default group when DEBUG=yes +# Use ! or - prefix to prevent a dependent package from being built with debug. Add + suffix to build dependenencies with debug. + DEBUG_GROUPS="kodi+=kodi+,kodi-platform+,p8-platform+,!mesa" + DEBUG_GROUP_YES="kodi+" + +# wireless daemon to use (wpa_supplicant/iwd) + WIRELESS_DAEMON="wpa_supplicant" + +# build and install iSCSI support - iscsistart (yes / no) + ISCSI_SUPPORT="yes" + # build with NFS support (mounting nfs shares via the OS) (yes / no) NFS_SUPPORT="yes" @@ -123,6 +195,10 @@ # mediacenter also automount internally drives at boottime via udev (yes / no) UDEVIL="yes" +# Support for partitioning and formating disks in initramfs (yes / no) +# This adds support for parted and mkfs.ext3/4 to initramfs for OEM usage + INITRAMFS_PARTED_SUPPORT="no" + # build and install exFAT fuse support (yes / no) EXFAT="yes" @@ -132,6 +208,15 @@ # build and install hfs filesystem utilities (yes / no) HFSTOOLS="yes" +# build and install nano text editor (yes / no) + NANO_EDITOR="yes" + +# cron support (yes / no) + CRON_SUPPORT="yes" + +# build with installer (yes / no) + INSTALLER_SUPPORT="yes" + # Windowmanager to use (fluxbox / none) WINDOWMANAGER="fluxbox" @@ -143,6 +228,9 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" +# IR remote keymaps supported in default config + IR_REMOTE_KEYMAPS="rc6_mce xbox_360 xbox_one" + # build and install Joystick support (yes / no) JOYSTICK_SUPPORT="yes" @@ -152,78 +240,10 @@ # build and install CEC framework support (yes / no) CEC_FRAMEWORK_SUPPORT="no" -# build and install iSCSI support - iscsistart (yes / no) - ISCSI_SUPPORT="yes" - -# Support for partitioning and formating disks in initramfs (yes / no) -# This adds support for parted and mkfs.ext3/4 to initramfs for OEM usage - INITRAMFS_PARTED_SUPPORT="no" - -# build with swap support (yes / no) - SWAP_SUPPORT="yes" - -# swap support enabled per default (yes / no) - SWAP_ENABLED_DEFAULT="no" - -# swapfile size if SWAP_SUPPORT=yes in MB - SWAPFILESIZE="128" +# OEM packages for OEM's (yes / no) + OEM_SUPPORT="no" # additional packages to install: # Space separated list is supported, # e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2" ADDITIONAL_PACKAGES="" - -# build with installer (yes / no) - INSTALLER_SUPPORT="yes" - -# Testpackages for development (yes / no) - TESTING="no" - -# OEM packages for OEM's (yes / no) - OEM_SUPPORT="no" - -# build and install nano text editor (yes / no) - NANO_EDITOR="yes" - -# cron support (yes / no) - CRON_SUPPORT="yes" - -# Distribution Specific source location - DISTRO_MIRROR="http://sources.libreelec.tv/mirror" - DISTRO_SRC="http://sources.libreelec.tv/$LIBREELEC_VERSION" - -# Addon Server Url - ADDON_SERVER_URL="https://addons.libreelec.tv" - -# set the default addon project - ADDON_PROJECT="${DEVICE:-$PROJECT}" - -# Default size of system partition, in MB, eg. 512 - SYSTEM_SIZE=512 -# Default system partition offset, in sectors, eg. 2048 - SYSTEM_PART_START=8192 - -# Configure debug groups (space delimited key=value pairs, with each value comma-delimited) and default group when DEBUG=yes -# Use ! or - prefix to prevent a dependent package from being built with debug. Add + suffix to build dependenencies with debug. - DEBUG_GROUPS="kodi+=kodi+,kodi-platform+,p8-platform+,!mesa" - DEBUG_GROUP_YES="kodi+" - -# Default supported get handlers (archive, git, file etc.) - GET_HANDLER_SUPPORT="archive" - -# Partition labels for USB/SD installation media - DISTRO_BOOTLABEL="LIBREELEC" - DISTRO_DISKLABEL="STORAGE" - -# Settings package name - blank if not required - DISTRO_PKG_SETTINGS="LibreELEC-settings" - DISTRO_PKG_SETTINGS_ID="service.libreelec.settings" - -# IR remote keymaps supported in default config - IR_REMOTE_KEYMAPS="rc6_mce xbox_360 xbox_one" - -# debug tty path - DEBUG_TTY="/dev/tty3" - -# wireless daemon to use (wpa_supplicant/iwd) - WIRELESS_DAEMON="wpa_supplicant" From 40f54775243102f9b9680b25cc8e9fff70a0a7c8 Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Wed, 29 Apr 2020 00:11:03 +0000 Subject: [PATCH 2/8] show_config: use increment operator Signed-off-by: Ian Leonard --- config/show_config | 174 ++++++++++++++++++++++----------------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/config/show_config b/config/show_config index 6e500f3fd6..d63e46941a 100644 --- a/config/show_config +++ b/config/show_config @@ -1,162 +1,162 @@ show_config() { # load graphic configuration - get_graphicdrivers + get_graphicdrivers dashes="===========================" - config_message="$config_message\n $dashes$dashes$dashes" - config_message="$config_message\n Configuration for $DISTRONAME ($([ "$OFFICIAL" = "yes" ] && echo "official" || echo "community"))" - config_message="$config_message\n $dashes$dashes$dashes" + config_message="\n $dashes$dashes$dashes" + config_message+="\n Configuration for $DISTRONAME ($([ "$OFFICIAL" = "yes" ] && echo "official" || echo "community"))" + config_message+="\n $dashes$dashes$dashes" # Build options - config_message="$config_message\n\n Buildoptions:" - config_message="$config_message\n $dashes$dashes" + config_message+="\n\n Buildoptions:" + config_message+="\n $dashes$dashes" - config_message="$config_message\n - CPU (ARCH):\t\t\t\t $TARGET_CPU ($TARGET_ARCH)" - config_message="$config_message\n - FLOAT:\t\t\t\t $TARGET_FLOAT" - config_message="$config_message\n - FPU:\t\t\t\t\t $TARGET_FPU" - config_message="$config_message\n - CPU features:\t\t\t $TARGET_FEATURES" - config_message="$config_message\n - LTO (Link Time Optimization) support: $LTO_SUPPORT" - config_message="$config_message\n - GOLD (Google Linker) Support:\t $GOLD_SUPPORT" - config_message="$config_message\n - LLVM support:\t\t\t $LLVM_SUPPORT" - config_message="$config_message\n - DEBUG:\t\t\t\t ${DEBUG:-no}" + config_message+="\n - CPU (ARCH):\t\t\t\t $TARGET_CPU ($TARGET_ARCH)" + config_message+="\n - FLOAT:\t\t\t\t $TARGET_FLOAT" + config_message+="\n - FPU:\t\t\t\t\t $TARGET_FPU" + config_message+="\n - CPU features:\t\t\t $TARGET_FEATURES" + config_message+="\n - LTO (Link Time Optimization) support: $LTO_SUPPORT" + config_message+="\n - GOLD (Google Linker) Support:\t $GOLD_SUPPORT" + config_message+="\n - LLVM support:\t\t\t $LLVM_SUPPORT" + config_message+="\n - DEBUG:\t\t\t\t ${DEBUG:-no}" - # config_message="$config_message\n - CFLAGS:\t $TARGET_CFLAGS" - # config_message="$config_message\n - LDFLAGS:\t $TARGET_LDFLAGS" + # config_message+="\n - CFLAGS:\t $TARGET_CFLAGS" + # config_message+="\n - LDFLAGS:\t $TARGET_LDFLAGS" # Graphic configuration - config_message="$config_message\n\n Graphic configuration:" - config_message="$config_message\n $dashes$dashes" + config_message+="\n\n Graphic configuration:" + config_message+="\n $dashes$dashes" if [ "$DISPLAYSERVER" = "x11" ] ; then - config_message="$config_message\n - Xorg Graphic Drivers:\t\t $GRAPHIC_DRIVERS" - config_message="$config_message\n - XORG Composite support:\t\t $COMPOSITE_SUPPORT" - config_message="$config_message\n - WindowManager:\t\t\t $WINDOWMANAGER" + config_message+="\n - Xorg Graphic Drivers:\t\t $GRAPHIC_DRIVERS" + config_message+="\n - XORG Composite support:\t\t $COMPOSITE_SUPPORT" + config_message+="\n - WindowManager:\t\t\t $WINDOWMANAGER" fi - config_message="$config_message\n - OpenGL (GLX) support (provider):\t $OPENGL_SUPPORT ($OPENGL)" - config_message="$config_message\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)" + config_message+="\n - OpenGL (GLX) support (provider):\t $OPENGL_SUPPORT ($OPENGL)" + config_message+="\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)" # Hardware decoder support config_message="$config_message\n\n Hardware decoder configuration:" config_message="$config_message\n $dashes$dashes" - config_message="$config_message\n - Kodi Player driver:\t\t\t $KODIPLAYER_DRIVER" - config_message="$config_message\n - VAAPI Support:\t\t\t $VAAPI_SUPPORT" - config_message="$config_message\n - VDPAU Support:\t\t\t $VDPAU_SUPPORT" + config_message+="\n - Kodi Player driver:\t\t\t $KODIPLAYER_DRIVER" + config_message+="\n - VAAPI Support:\t\t\t $VAAPI_SUPPORT" + config_message+="\n - VDPAU Support:\t\t\t $VDPAU_SUPPORT" # Input device configuration - config_message="$config_message\n\n Input device configuration:" - config_message="$config_message\n $dashes$dashes" + config_message+="\n\n Input device configuration:" + config_message+="\n $dashes$dashes" - config_message="$config_message\n - Remote support:\t\t\t $REMOTE_SUPPORT" - config_message="$config_message\n - CEC Adapter support:\t\t\t $CEC_SUPPORT" - config_message="$config_message\n - CEC Framework support:\t\t $CEC_FRAMEWORK_SUPPORT" - config_message="$config_message\n - Kodi Joystick support:\t\t $JOYSTICK_SUPPORT" + config_message+="\n - Remote support:\t\t\t $REMOTE_SUPPORT" + config_message+="\n - CEC Adapter support:\t\t\t $CEC_SUPPORT" + config_message+="\n - CEC Framework support:\t\t $CEC_FRAMEWORK_SUPPORT" + config_message+="\n - Kodi Joystick support:\t\t $JOYSTICK_SUPPORT" # Misc. hardware configuration - config_message="$config_message\n\n Misc. hardware configuration:" - config_message="$config_message\n $dashes$dashes" + config_message+="\n\n Misc. hardware configuration:" + config_message+="\n $dashes$dashes" - config_message="$config_message\n - ALSA support:\t\t\t $ALSA_SUPPORT" - config_message="$config_message\n - Pulseaudio support:\t\t\t $PULSEAUDIO_SUPPORT" - config_message="$config_message\n - Bluetooth support:\t\t\t $BLUETOOTH_SUPPORT" + config_message+="\n - ALSA support:\t\t\t $ALSA_SUPPORT" + config_message+="\n - Pulseaudio support:\t\t\t $PULSEAUDIO_SUPPORT" + config_message+="\n - Bluetooth support:\t\t\t $BLUETOOTH_SUPPORT" for config_driver in $ADDITIONAL_DRIVERS; do - config_message="$config_message\n - Include driver:\t\t\t $config_driver" + config_message+="\n - Include driver:\t\t\t $config_driver" done if [ "$DRIVER_ADDONS_SUPPORT" = "yes" ]; then for config_driver_addons in $DRIVER_ADDONS; do - config_message="$config_message\n - Include driver add-ons:\t\t $config_driver_addons" + config_message+="\n - Include driver add-ons:\t\t $config_driver_addons" done fi for config_firmware in $FIRMWARE; do - config_message="$config_message\n - Include firmware:\t\t\t $config_firmware" + config_message+="\n - Include firmware:\t\t\t $config_firmware" done # Network service configuration - config_message="$config_message\n\n Network service configuration:" - config_message="$config_message\n $dashes$dashes" + config_message+="\n\n Network service configuration:" + config_message+="\n $dashes$dashes" - config_message="$config_message\n - Avahi (Zeroconf) support:\t\t $AVAHI_DAEMON" - config_message="$config_message\n - NFS mounting support:\t\t $NFS_SUPPORT" - config_message="$config_message\n - SAMBA mounting support:\t\t $SAMBA_SUPPORT" - config_message="$config_message\n - SAMBA server support:\t\t $SAMBA_SERVER" - config_message="$config_message\n - SFTP server support:\t\t\t $SFTP_SERVER" - config_message="$config_message\n - OpenVPN support:\t\t\t $OPENVPN_SUPPORT" - config_message="$config_message\n - WireGuard support:\t\t\t $WIREGUARD_SUPPORT" + config_message+="\n - Avahi (Zeroconf) support:\t\t $AVAHI_DAEMON" + config_message+="\n - NFS mounting support:\t\t $NFS_SUPPORT" + config_message+="\n - SAMBA mounting support:\t\t $SAMBA_SUPPORT" + config_message+="\n - SAMBA server support:\t\t $SAMBA_SERVER" + config_message+="\n - SFTP server support:\t\t\t $SFTP_SERVER" + config_message+="\n - OpenVPN support:\t\t\t $OPENVPN_SUPPORT" + config_message+="\n - WireGuard support:\t\t\t $WIREGUARD_SUPPORT" # OS configuration - config_message="$config_message\n\n OS configuration:" - config_message="$config_message\n $dashes$dashes" + config_message+="\n\n OS configuration:" + config_message+="\n $dashes$dashes" - config_message="$config_message\n - OEM Support:\t\t\t\t $OEM_SUPPORT" - config_message="$config_message\n - Default ROOT Password:\t\t $ROOT_PASSWORD" - config_message="$config_message\n - Bootloader:\t\t\t\t $BOOTLOADER" - config_message="$config_message\n - UDevil support:\t\t\t $UDEVIL" - config_message="$config_message\n - Installer support:\t\t\t $INSTALLER_SUPPORT" + config_message+="\n - OEM Support:\t\t\t\t $OEM_SUPPORT" + config_message+="\n - Default ROOT Password:\t\t $ROOT_PASSWORD" + config_message+="\n - Bootloader:\t\t\t\t $BOOTLOADER" + config_message+="\n - UDevil support:\t\t\t $UDEVIL" + config_message+="\n - Installer support:\t\t\t $INSTALLER_SUPPORT" for config_package in $ADDITIONAL_PACKAGES; do - config_message="$config_message\n - Include package:\t\t\t $config_package" + config_message+="\n - Include package:\t\t\t $config_package" done # Misc. Filesystems - config_message="$config_message\n\n Misc. Filesystems:" - config_message="$config_message\n $dashes$dashes" + config_message+="\n\n Misc. Filesystems:" + config_message+="\n $dashes$dashes" - config_message="$config_message\n - Swap Support:\t\t\t $SWAP_SUPPORT" + config_message+="\n - Swap Support:\t\t\t $SWAP_SUPPORT" if [ "$SWAP_SUPPORT" = "yes" ]; then - config_message="$config_message\n - Swapfile default size:\t\t $SWAPFILESIZE" + config_message+="\n - Swapfile default size:\t\t $SWAPFILESIZE" fi - config_message="$config_message\n - exFAT Support (via Fuse):\t\t $EXFAT" - config_message="$config_message\n - NTFS Support (via Fuse):\t\t $NTFS3G" - config_message="$config_message\n - Install HFS Tools:\t\t\t $HFSTOOLS" + config_message+="\n - exFAT Support (via Fuse):\t\t $EXFAT" + config_message+="\n - NTFS Support (via Fuse):\t\t $NTFS3G" + config_message+="\n - Install HFS Tools:\t\t\t $HFSTOOLS" # Kodi configuration if [ ! "$MEDIACENTER" = "no" ]; then - config_message="$config_message\n\n Kodi configuration:" - config_message="$config_message\n $dashes$dashes" + config_message+="\n\n Kodi configuration:" + config_message+="\n $dashes$dashes" - config_message="$config_message\n - Kodi version:\t\t\t $MEDIACENTER" - config_message="$config_message\n - Kodi Blu-Ray support:\t\t $KODI_BLURAY_SUPPORT" + config_message+="\n - Kodi version:\t\t\t $MEDIACENTER" + config_message+="\n - Kodi Blu-Ray support:\t\t $KODI_BLURAY_SUPPORT" if [ "$KODI_BLURAY_SUPPORT" = "yes" ] ; then - config_message="$config_message\n - Bluray BD+ support:\t\t $BLURAY_BDPLUS_SUPPORT" - config_message="$config_message\n - Bluray AACS support:\t\t $BLURAY_AACS_SUPPORT" + config_message+="\n - Bluray BD+ support:\t\t $BLURAY_BDPLUS_SUPPORT" + config_message+="\n - Bluray AACS support:\t\t $BLURAY_AACS_SUPPORT" fi - config_message="$config_message\n - Kodi DVDCSS support:\t\t\t $KODI_DVDCSS_SUPPORT" - config_message="$config_message\n - Kodi Airplay support:\t\t $KODI_AIRPLAY_SUPPORT" - config_message="$config_message\n - Kodi Airtunes support:\t\t $KODI_AIRTUNES_SUPPORT" - config_message="$config_message\n - Kodi NFS support:\t\t\t $KODI_NFS_SUPPORT" - config_message="$config_message\n - Kodi MySQL support:\t\t\t $KODI_MYSQL_SUPPORT" - config_message="$config_message\n - Kodi Optical Drive support:\t\t $KODI_OPTICAL_SUPPORT" - config_message="$config_message\n - Kodi SAMBA client support:\t\t $KODI_SAMBA_SUPPORT" - config_message="$config_message\n - Kodi UPNP support:\t\t\t $KODI_UPNP_SUPPORT" - config_message="$config_message\n - Kodi Webserver support:\t\t $KODI_WEBSERVER_SUPPORT" + config_message+="\n - Kodi DVDCSS support:\t\t\t $KODI_DVDCSS_SUPPORT" + config_message+="\n - Kodi Airplay support:\t\t $KODI_AIRPLAY_SUPPORT" + config_message+="\n - Kodi Airtunes support:\t\t $KODI_AIRTUNES_SUPPORT" + config_message+="\n - Kodi NFS support:\t\t\t $KODI_NFS_SUPPORT" + config_message+="\n - Kodi MySQL support:\t\t\t $KODI_MYSQL_SUPPORT" + config_message+="\n - Kodi Optical Drive support:\t\t $KODI_OPTICAL_SUPPORT" + config_message+="\n - Kodi SAMBA client support:\t\t $KODI_SAMBA_SUPPORT" + config_message+="\n - Kodi UPNP support:\t\t\t $KODI_UPNP_SUPPORT" + config_message+="\n - Kodi Webserver support:\t\t $KODI_WEBSERVER_SUPPORT" for config_skin in $SKINS; do - config_message="$config_message\n - Include Skin:\t\t\t $config_skin" + config_message+="\n - Include Skin:\t\t\t $config_skin" done - config_message="$config_message\n - Default Skin:\t\t\t $SKIN_DEFAULT" - config_message="$config_message\n - Include extra fonts:\t\t\t $KODI_EXTRA_FONTS" + config_message+="\n - Default Skin:\t\t\t $SKIN_DEFAULT" + config_message+="\n - Include extra fonts:\t\t\t $KODI_EXTRA_FONTS" fi if [ "$(type -t show_distro_config)" = "function" ]; then show_distro_config fi - config_message="$config_message\n" - config_message="$config_message\n $dashes$dashes$dashes" - config_message="$config_message\n End Configuration for $DISTRONAME" - config_message="$config_message\n $dashes$dashes$dashes" - config_message="$config_message\n\n\n" + config_message+="\n" + config_message+="\n $dashes$dashes$dashes" + config_message+="\n End Configuration for $DISTRONAME" + config_message+="\n $dashes$dashes$dashes" + config_message+="\n\n\n" echo -e "$config_message" } From 9a426d5da9d27e92723ed5645afcfbd46181515a Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Mon, 11 May 2020 06:32:39 +0000 Subject: [PATCH 3/8] config/show_config: migrate kodi config to distro specific config/functions file Signed-off-by: Ian Leonard --- config/show_config | 29 ------------------------ distributions/LibreELEC/config/functions | 28 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 29 deletions(-) create mode 100644 distributions/LibreELEC/config/functions diff --git a/config/show_config b/config/show_config index d63e46941a..e3bfd170f9 100644 --- a/config/show_config +++ b/config/show_config @@ -119,35 +119,6 @@ show_config() { config_message+="\n - NTFS Support (via Fuse):\t\t $NTFS3G" config_message+="\n - Install HFS Tools:\t\t\t $HFSTOOLS" - # Kodi configuration - if [ ! "$MEDIACENTER" = "no" ]; then - config_message+="\n\n Kodi configuration:" - config_message+="\n $dashes$dashes" - - config_message+="\n - Kodi version:\t\t\t $MEDIACENTER" - config_message+="\n - Kodi Blu-Ray support:\t\t $KODI_BLURAY_SUPPORT" - if [ "$KODI_BLURAY_SUPPORT" = "yes" ] ; then - config_message+="\n - Bluray BD+ support:\t\t $BLURAY_BDPLUS_SUPPORT" - config_message+="\n - Bluray AACS support:\t\t $BLURAY_AACS_SUPPORT" - fi - config_message+="\n - Kodi DVDCSS support:\t\t\t $KODI_DVDCSS_SUPPORT" - config_message+="\n - Kodi Airplay support:\t\t $KODI_AIRPLAY_SUPPORT" - config_message+="\n - Kodi Airtunes support:\t\t $KODI_AIRTUNES_SUPPORT" - config_message+="\n - Kodi NFS support:\t\t\t $KODI_NFS_SUPPORT" - config_message+="\n - Kodi MySQL support:\t\t\t $KODI_MYSQL_SUPPORT" - config_message+="\n - Kodi Optical Drive support:\t\t $KODI_OPTICAL_SUPPORT" - config_message+="\n - Kodi SAMBA client support:\t\t $KODI_SAMBA_SUPPORT" - config_message+="\n - Kodi UPNP support:\t\t\t $KODI_UPNP_SUPPORT" - config_message+="\n - Kodi Webserver support:\t\t $KODI_WEBSERVER_SUPPORT" - - for config_skin in $SKINS; do - config_message+="\n - Include Skin:\t\t\t $config_skin" - done - - config_message+="\n - Default Skin:\t\t\t $SKIN_DEFAULT" - config_message+="\n - Include extra fonts:\t\t\t $KODI_EXTRA_FONTS" - fi - if [ "$(type -t show_distro_config)" = "function" ]; then show_distro_config fi diff --git a/distributions/LibreELEC/config/functions b/distributions/LibreELEC/config/functions new file mode 100644 index 0000000000..fdaaf7d0d6 --- /dev/null +++ b/distributions/LibreELEC/config/functions @@ -0,0 +1,28 @@ +show_distro_config() { + # Kodi configuration + config_message+="\n\n Kodi configuration:" + config_message+="\n $dashes$dashes" + + config_message+="\n - Kodi version:\t\t\t $MEDIACENTER" + config_message+="\n - Kodi Blu-Ray support:\t\t $KODI_BLURAY_SUPPORT" + if [ "$KODI_BLURAY_SUPPORT" = "yes" ] ; then + config_message+="\n - Bluray BD+ support:\t\t $BLURAY_BDPLUS_SUPPORT" + config_message+="\n - Bluray AACS support:\t\t $BLURAY_AACS_SUPPORT" + fi + config_message+="\n - Kodi DVDCSS support:\t\t\t $KODI_DVDCSS_SUPPORT" + config_message+="\n - Kodi Airplay support:\t\t $KODI_AIRPLAY_SUPPORT" + config_message+="\n - Kodi Airtunes support:\t\t $KODI_AIRTUNES_SUPPORT" + config_message+="\n - Kodi NFS support:\t\t\t $KODI_NFS_SUPPORT" + config_message+="\n - Kodi MySQL support:\t\t\t $KODI_MYSQL_SUPPORT" + config_message+="\n - Kodi Optical Drive support:\t\t $KODI_OPTICAL_SUPPORT" + config_message+="\n - Kodi SAMBA client support:\t\t $KODI_SAMBA_SUPPORT" + config_message+="\n - Kodi UPNP support:\t\t\t $KODI_UPNP_SUPPORT" + config_message+="\n - Kodi Webserver support:\t\t $KODI_WEBSERVER_SUPPORT" + + for config_skin in $SKINS; do + config_message+="\n - Include Skin:\t\t\t $config_skin" + done + + config_message+="\n - Default Skin:\t\t\t $SKIN_DEFAULT" + config_message+="\n - Include extra fonts:\t\t\t $KODI_EXTRA_FONTS" +} From e9862ccd6c81aa6a6e511df1cd046041a35ba637 Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Mon, 11 May 2020 14:20:57 +0000 Subject: [PATCH 4/8] show_config: move more of show_config kodi specific to distro version Split Kodi configuration messages into hardware / software sections. Hardware is how other software is being built to accomodate Kodi needs (ie what provides video accel). Software is the configure options to Kodi. Kodi version just outputs the velue of $MEDIACENTER, which will always be "kodi". Change to who the "upstream" is for the version of Kodi we're using is instead. Signed-off-by: Ian Leonard --- config/show_config | 17 -------------- distributions/LibreELEC/config/functions | 30 +++++++++++++++++++----- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/config/show_config b/config/show_config index e3bfd170f9..4bc7b3f20d 100644 --- a/config/show_config +++ b/config/show_config @@ -36,26 +36,9 @@ show_config() { fi config_message+="\n - OpenGL (GLX) support (provider):\t $OPENGL_SUPPORT ($OPENGL)" config_message+="\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)" - - # Hardware decoder support - - config_message="$config_message\n\n Hardware decoder configuration:" - config_message="$config_message\n $dashes$dashes" - - config_message+="\n - Kodi Player driver:\t\t\t $KODIPLAYER_DRIVER" config_message+="\n - VAAPI Support:\t\t\t $VAAPI_SUPPORT" config_message+="\n - VDPAU Support:\t\t\t $VDPAU_SUPPORT" - # Input device configuration - - config_message+="\n\n Input device configuration:" - config_message+="\n $dashes$dashes" - - config_message+="\n - Remote support:\t\t\t $REMOTE_SUPPORT" - config_message+="\n - CEC Adapter support:\t\t\t $CEC_SUPPORT" - config_message+="\n - CEC Framework support:\t\t $CEC_FRAMEWORK_SUPPORT" - config_message+="\n - Kodi Joystick support:\t\t $JOYSTICK_SUPPORT" - # Misc. hardware configuration config_message+="\n\n Misc. hardware configuration:" diff --git a/distributions/LibreELEC/config/functions b/distributions/LibreELEC/config/functions index fdaaf7d0d6..d6eab73b72 100644 --- a/distributions/LibreELEC/config/functions +++ b/distributions/LibreELEC/config/functions @@ -1,13 +1,31 @@ show_distro_config() { - # Kodi configuration - config_message+="\n\n Kodi configuration:" + # Hardware decoder support + + config_message+="\n\n Kodi Hardware configuration:" config_message+="\n $dashes$dashes" - config_message+="\n - Kodi version:\t\t\t $MEDIACENTER" - config_message+="\n - Kodi Blu-Ray support:\t\t $KODI_BLURAY_SUPPORT" + config_message+="\n - Video Acceleration provider:\t\t $KODIPLAYER_DRIVER" + + # Input device configuration + +# config_message+="\n\n Input device configuration:" +# config_message+="\n $dashes$dashes" + + config_message+="\n - Remote support:\t\t\t $REMOTE_SUPPORT" + config_message+="\n - CEC Adapter support:\t\t\t $CEC_SUPPORT" + config_message+="\n - CEC Framework support:\t\t $CEC_FRAMEWORK_SUPPORT" + config_message+="\n - Kodi Joystick support:\t\t $JOYSTICK_SUPPORT" + + # Kodi configuration + + config_message+="\n\n Kodi Software configuration:" + config_message+="\n $dashes$dashes" + + config_message+="\n - Kodi Vendor:\t\t\t\t $KODI_VENDOR" + config_message+="\n - Kodi Blu-ray support:\t\t $KODI_BLURAY_SUPPORT" if [ "$KODI_BLURAY_SUPPORT" = "yes" ] ; then - config_message+="\n - Bluray BD+ support:\t\t $BLURAY_BDPLUS_SUPPORT" - config_message+="\n - Bluray AACS support:\t\t $BLURAY_AACS_SUPPORT" + config_message+="\n - Blu-ray BD+ support:\t\t $BLURAY_BDPLUS_SUPPORT" + config_message+="\n - Blu-ray AACS support:\t\t $BLURAY_AACS_SUPPORT" fi config_message+="\n - Kodi DVDCSS support:\t\t\t $KODI_DVDCSS_SUPPORT" config_message+="\n - Kodi Airplay support:\t\t $KODI_AIRPLAY_SUPPORT" From 0ea91f8079173299ae6ae08631de2cf165a26b5c Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Mon, 11 May 2020 15:35:42 +0000 Subject: [PATCH 5/8] config/show_config: reorder output Order is roughly: How is the buildsystem for the image set up What hardware support is being added What filesystems will be supported What Network services are available Who is providing the graphics and their setup How does it boot / login Distribution configuration Signed-off-by: Ian Leonard --- config/show_config | 61 ++++++++++++------------ distributions/LibreELEC/config/functions | 3 -- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/config/show_config b/config/show_config index 4bc7b3f20d..f97a2bb6ac 100644 --- a/config/show_config +++ b/config/show_config @@ -9,7 +9,7 @@ show_config() { # Build options - config_message+="\n\n Buildoptions:" + config_message+="\n\n Buildsystem configuration:" config_message+="\n $dashes$dashes" config_message+="\n - CPU (ARCH):\t\t\t\t $TARGET_CPU ($TARGET_ARCH)" @@ -24,21 +24,6 @@ show_config() { # config_message+="\n - CFLAGS:\t $TARGET_CFLAGS" # config_message+="\n - LDFLAGS:\t $TARGET_LDFLAGS" - # Graphic configuration - - config_message+="\n\n Graphic configuration:" - config_message+="\n $dashes$dashes" - - if [ "$DISPLAYSERVER" = "x11" ] ; then - config_message+="\n - Xorg Graphic Drivers:\t\t $GRAPHIC_DRIVERS" - config_message+="\n - XORG Composite support:\t\t $COMPOSITE_SUPPORT" - config_message+="\n - WindowManager:\t\t\t $WINDOWMANAGER" - fi - config_message+="\n - OpenGL (GLX) support (provider):\t $OPENGL_SUPPORT ($OPENGL)" - config_message+="\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)" - config_message+="\n - VAAPI Support:\t\t\t $VAAPI_SUPPORT" - config_message+="\n - VDPAU Support:\t\t\t $VDPAU_SUPPORT" - # Misc. hardware configuration config_message+="\n\n Misc. hardware configuration:" @@ -62,6 +47,19 @@ show_config() { config_message+="\n - Include firmware:\t\t\t $config_firmware" done + # Misc. Filesystems + + config_message+="\n\n Misc. Filesystems:" + config_message+="\n $dashes$dashes" + + config_message+="\n - Swap Support:\t\t\t $SWAP_SUPPORT" + if [ "$SWAP_SUPPORT" = "yes" ]; then + config_message+="\n - Swapfile default size:\t\t $SWAPFILESIZE" + fi + config_message+="\n - exFAT Support (via Fuse):\t\t $EXFAT" + config_message+="\n - NTFS Support (via Fuse):\t\t $NTFS3G" + config_message+="\n - Install HFS Tools:\t\t\t $HFSTOOLS" + # Network service configuration config_message+="\n\n Network service configuration:" @@ -75,6 +73,21 @@ show_config() { config_message+="\n - OpenVPN support:\t\t\t $OPENVPN_SUPPORT" config_message+="\n - WireGuard support:\t\t\t $WIREGUARD_SUPPORT" + # Graphic configuration + + config_message+="\n\n Graphic configuration:" + config_message+="\n $dashes$dashes" + + if [ "$DISPLAYSERVER" = "x11" ] ; then + config_message+="\n - Xorg Graphic Drivers:\t\t $GRAPHIC_DRIVERS" + config_message+="\n - XORG Composite support:\t\t $COMPOSITE_SUPPORT" + config_message+="\n - WindowManager:\t\t\t $WINDOWMANAGER" + fi + config_message+="\n - OpenGL (GLX) support (provider):\t $OPENGL_SUPPORT ($OPENGL)" + config_message+="\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)" + config_message+="\n - VAAPI Support:\t\t\t $VAAPI_SUPPORT" + config_message+="\n - VDPAU Support:\t\t\t $VDPAU_SUPPORT" + # OS configuration config_message+="\n\n OS configuration:" @@ -89,25 +102,13 @@ show_config() { config_message+="\n - Include package:\t\t\t $config_package" done - # Misc. Filesystems - - config_message+="\n\n Misc. Filesystems:" - config_message+="\n $dashes$dashes" - - config_message+="\n - Swap Support:\t\t\t $SWAP_SUPPORT" - if [ "$SWAP_SUPPORT" = "yes" ]; then - config_message+="\n - Swapfile default size:\t\t $SWAPFILESIZE" - fi - config_message+="\n - exFAT Support (via Fuse):\t\t $EXFAT" - config_message+="\n - NTFS Support (via Fuse):\t\t $NTFS3G" - config_message+="\n - Install HFS Tools:\t\t\t $HFSTOOLS" + # Distribution specific configuration if [ "$(type -t show_distro_config)" = "function" ]; then show_distro_config fi - config_message+="\n" - config_message+="\n $dashes$dashes$dashes" + config_message+="\n\n $dashes$dashes$dashes" config_message+="\n End Configuration for $DISTRONAME" config_message+="\n $dashes$dashes$dashes" config_message+="\n\n\n" diff --git a/distributions/LibreELEC/config/functions b/distributions/LibreELEC/config/functions index d6eab73b72..c3f6c61dbc 100644 --- a/distributions/LibreELEC/config/functions +++ b/distributions/LibreELEC/config/functions @@ -8,9 +8,6 @@ show_distro_config() { # Input device configuration -# config_message+="\n\n Input device configuration:" -# config_message+="\n $dashes$dashes" - config_message+="\n - Remote support:\t\t\t $REMOTE_SUPPORT" config_message+="\n - CEC Adapter support:\t\t\t $CEC_SUPPORT" config_message+="\n - CEC Framework support:\t\t $CEC_FRAMEWORK_SUPPORT" From f7ed0e72f222374051593c84901826719eaa7c9c Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Mon, 11 May 2020 16:17:43 +0000 Subject: [PATCH 6/8] config/show_config: allow direct execution FUNCNAME[0] is a bash builtin that corresponds to the name of the currently executing function. Functions called in bare scripts are in the main() function. Bare scripts being sourced are in the source() function. Signed-off-by: Ian Leonard --- config/show_config | 8 ++++++++ 1 file changed, 8 insertions(+) mode change 100644 => 100755 config/show_config diff --git a/config/show_config b/config/show_config old mode 100644 new mode 100755 index f97a2bb6ac..48d17afa7a --- a/config/show_config +++ b/config/show_config @@ -1,3 +1,5 @@ +#!/bin/bash + show_config() { # load graphic configuration get_graphicdrivers @@ -115,3 +117,9 @@ show_config() { echo -e "$config_message" } + + +if [ "${FUNCNAME[0]}" = "main" ]; then + . config/options "" + show_config +fi From 44cb449b38872ee43f79b73931889a9e17bedbee Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Sat, 23 May 2020 20:33:14 +0000 Subject: [PATCH 7/8] show_config: add DISTRO/show_config as function source and use it Signed-off-by: Ian Leonard --- config/show_config | 6 ++++++ distributions/LibreELEC/{config/functions => show_config} | 0 2 files changed, 6 insertions(+) rename distributions/LibreELEC/{config/functions => show_config} (100%) diff --git a/config/show_config b/config/show_config index 48d17afa7a..1c17769dba 100755 --- a/config/show_config +++ b/config/show_config @@ -105,7 +105,13 @@ show_config() { done # Distribution specific configuration + # show_distro_config() should be included in one of: + # $DISTRO/config/functions + # $DISTRO/show_config + if [ -f distributions/${DISTRO}/show_config ]; then + . distributions/${DISTRO}/show_config + fi if [ "$(type -t show_distro_config)" = "function" ]; then show_distro_config fi diff --git a/distributions/LibreELEC/config/functions b/distributions/LibreELEC/show_config similarity index 100% rename from distributions/LibreELEC/config/functions rename to distributions/LibreELEC/show_config From 4c95a9f1b0eca677d965f1d7c3986dfd9ae314f6 Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Wed, 3 Jun 2020 17:48:57 +0000 Subject: [PATCH 8/8] show_config: show global compiler / linker flags used in build Signed-off-by: Ian Leonard --- config/show_config | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/show_config b/config/show_config index 1c17769dba..baa4e50726 100755 --- a/config/show_config +++ b/config/show_config @@ -22,9 +22,8 @@ show_config() { config_message+="\n - GOLD (Google Linker) Support:\t $GOLD_SUPPORT" config_message+="\n - LLVM support:\t\t\t $LLVM_SUPPORT" config_message+="\n - DEBUG:\t\t\t\t ${DEBUG:-no}" - - # config_message+="\n - CFLAGS:\t $TARGET_CFLAGS" - # config_message+="\n - LDFLAGS:\t $TARGET_LDFLAGS" + config_message+="\n - CFLAGS:\t $TARGET_CFLAGS" + config_message+="\n - LDFLAGS:\t $TARGET_LDFLAGS" # Misc. hardware configuration