Merge pull request #9987 from chewitt/leiot
distributions: add support for the LEIoT distro and accomodate its needs in the buildsystem
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@DISTRONAME@_@PROJECT@",
|
"name": "@DISTRONAME@_@PROJECT@",
|
||||||
"version": "@LIBREELEC_VERSION@",
|
"version": "@DISTRO_VERSION@",
|
||||||
"release_date": "@RELEASE_DATE@",
|
"release_date": "@RELEASE_DATE@",
|
||||||
"kernel": "@KERNEL_VERSION@",
|
"kernel": "@KERNEL_VERSION@",
|
||||||
"description": "@DESCRIPTION@",
|
"description": "@DESCRIPTION@",
|
||||||
|
@ -16,9 +16,9 @@ set -e
|
|||||||
[ -z "${HOST_NAME}" ] && export HOST_NAME="$($LOCAL_CC -dumpmachine)"
|
[ -z "${HOST_NAME}" ] && export HOST_NAME="$($LOCAL_CC -dumpmachine)"
|
||||||
TARGET_NAME=$TARGET_GCC_ARCH-libreelec-linux-gnu${TARGET_ABI}
|
TARGET_NAME=$TARGET_GCC_ARCH-libreelec-linux-gnu${TARGET_ABI}
|
||||||
|
|
||||||
BUILD=${BUILD_ROOT}/${BUILD_BASE}.${DISTRONAME}-${DEVICE:-$PROJECT}.${TARGET_ARCH}-${LIBREELEC_VERSION}
|
BUILD=${BUILD_ROOT}/${BUILD_BASE}.${DISTRONAME}-${DEVICE:-$PROJECT}.${TARGET_ARCH}-${DISTRO_VERSION}
|
||||||
if [ "${LIBREELEC_VERSION}" = "devel" ] ; then
|
if [ "${DISTRO_VERSION}" = "devel" ] ; then
|
||||||
BUILD=${BUILD_ROOT}/${BUILD_BASE}.${DISTRONAME}-${DEVICE:-$PROJECT}.${TARGET_ARCH}-${OS_VERSION}-${LIBREELEC_VERSION}
|
BUILD=${BUILD_ROOT}/${BUILD_BASE}.${DISTRONAME}-${DEVICE:-$PROJECT}.${TARGET_ARCH}-${OS_VERSION}-${DISTRO_VERSION}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$BUILD_SUFFIX" ]; then
|
if [ -n "$BUILD_SUFFIX" ]; then
|
||||||
|
BIN
distributions/LEIoT/LEIoT.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
distributions/LEIoT/LEIoT_40x40.png
Normal file
After Width: | Height: | Size: 919 B |
1
distributions/LEIoT/kernel_options
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
distributions/LibreELEC/kernel_options
|
272
distributions/LEIoT/options
Normal file
@ -0,0 +1,272 @@
|
|||||||
|
### DISTRO INFORMATION ###
|
||||||
|
|
||||||
|
# Distro name (full name, without special characters)
|
||||||
|
DISTRONAME="LEIoT"
|
||||||
|
|
||||||
|
# Short distro description
|
||||||
|
DESCRIPTION="LibreELEC for IoT (LEIoT) is a simple appliance OS for containers."
|
||||||
|
|
||||||
|
# Distribution Source location
|
||||||
|
DISTRO_MIRROR="https://src.leiot.org/mirror"
|
||||||
|
DISTRO_SRC="https://src.leiot.org/$DISTRO_VERSION"
|
||||||
|
|
||||||
|
# Distribution Home URL
|
||||||
|
DISTRO_HOME_URL="https://leiot.org"
|
||||||
|
|
||||||
|
# Welcome Message for SSH Server (up to 5 Lines)
|
||||||
|
GREETING0="##############################################"
|
||||||
|
GREETING1="# LEIoT #"
|
||||||
|
GREETING2="# https://leiot.org #"
|
||||||
|
GREETING3="##############################################"
|
||||||
|
GREETING4=""
|
||||||
|
|
||||||
|
# Root password to integrate in the target system
|
||||||
|
ROOT_PASSWORD="libreelec"
|
||||||
|
|
||||||
|
# Partition labels for USB/SD installation media
|
||||||
|
DISTRO_BOOTLABEL="LEIOT"
|
||||||
|
DISTRO_DISKLABEL="STORAGE"
|
||||||
|
|
||||||
|
|
||||||
|
### BUILDSYSTEM SETTINGS ####
|
||||||
|
|
||||||
|
# LTO (Link Time Optimization) support
|
||||||
|
LTO_SUPPORT="yes"
|
||||||
|
|
||||||
|
# GOLD (Google Linker) support
|
||||||
|
GOLD_SUPPORT="yes"
|
||||||
|
|
||||||
|
# MOLD (Modern Linker) support
|
||||||
|
MOLD_SUPPORT="no"
|
||||||
|
|
||||||
|
# default linker (bfd / gold / mold)
|
||||||
|
DEFAULT_LINKER="gold"
|
||||||
|
|
||||||
|
# HARDENING (security relevant linker and compiler flags) support
|
||||||
|
HARDENING_SUPPORT="no"
|
||||||
|
|
||||||
|
# Default supported get handlers (archive, git, file etc.)
|
||||||
|
GET_HANDLER_SUPPORT="archive"
|
||||||
|
|
||||||
|
# use local ccache on build host, if available, for early package
|
||||||
|
# builds before ccache has been built
|
||||||
|
LOCAL_CCACHE_SUPPORT="yes"
|
||||||
|
|
||||||
|
### OS CONFIGURATION ###
|
||||||
|
|
||||||
|
# Install glibc locales to the build (yes / no)
|
||||||
|
GLIBC_LOCALES="yes"
|
||||||
|
|
||||||
|
# Install arm-mem package on ARM32 (yes / no)
|
||||||
|
if [ "${TARGET_ARCH}" = "arm" ]; then
|
||||||
|
ARM_MEM_SUPPORT="yes"
|
||||||
|
else
|
||||||
|
ARM_MEM_SUPPORT="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 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=""
|
||||||
|
|
||||||
|
# Default size of system partition, in MB, eg. 512
|
||||||
|
SYSTEM_SIZE=1024
|
||||||
|
|
||||||
|
# Default system partition offset, in sectors, eg. 2048
|
||||||
|
SYSTEM_PART_START=8192
|
||||||
|
|
||||||
|
# Size of storage partition, in MB. Must be >=32
|
||||||
|
STORAGE_SIZE=32
|
||||||
|
|
||||||
|
# build with swap support (yes / no)
|
||||||
|
SWAP_SUPPORT="yes"
|
||||||
|
|
||||||
|
# swap support enabled per default (yes / no)
|
||||||
|
SWAP_ENABLED_DEFAULT="yes"
|
||||||
|
|
||||||
|
# swapfile size if SWAP_SUPPORT=yes in MB
|
||||||
|
SWAPFILESIZE="2048"
|
||||||
|
|
||||||
|
# debug tty path
|
||||||
|
DEBUG_TTY="/dev/tty3"
|
||||||
|
|
||||||
|
# local console login prompt (yes / no)
|
||||||
|
LOCAL_LOGIN="yes"
|
||||||
|
|
||||||
|
# Enable SSH on boot (yes / no)
|
||||||
|
SSH_ENABLED_DEFAULT="yes"
|
||||||
|
|
||||||
|
### KODI SETTINGS ###
|
||||||
|
# Mediacenter to use (kodi / no)
|
||||||
|
MEDIACENTER="no"
|
||||||
|
|
||||||
|
# Skins to install (Estuary)
|
||||||
|
# Space separated list is supported,
|
||||||
|
# e.g. SKINS="Estuary"
|
||||||
|
SKINS=""
|
||||||
|
|
||||||
|
# Default Skin (Estuary)
|
||||||
|
SKIN_DEFAULT=""
|
||||||
|
|
||||||
|
# install extra subtitle Fonts for KODI (yes / no)
|
||||||
|
KODI_EXTRA_FONTS="no"
|
||||||
|
|
||||||
|
# build and install PulseAudio support (yes / no)
|
||||||
|
PULSEAUDIO_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install pipewire support (yes / no)
|
||||||
|
PIPEWIRE_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install eSpeak-NG support (yes / no)
|
||||||
|
ESPEAK_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install with BluRay support (yes / no)
|
||||||
|
KODI_BLURAY_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install with BD+ support
|
||||||
|
# (BD+ decryption support in KODI) (yes / no)
|
||||||
|
BLURAY_BDPLUS_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install with AACS support
|
||||||
|
# (BD decryption support in KODI) (yes / no)
|
||||||
|
BLURAY_AACS_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install with DVDCSS support
|
||||||
|
# (DVD decryption support in KODI) (yes / no)
|
||||||
|
KODI_DVDCSS_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install bluetooth support (yes / no)
|
||||||
|
BLUETOOTH_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install with KODI webfrontend (yes / no)
|
||||||
|
KODI_WEBSERVER_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install Avahi (Zeroconf) daemon (yes / no)
|
||||||
|
AVAHI_DAEMON="yes"
|
||||||
|
|
||||||
|
# build with UPnP support (yes / no)
|
||||||
|
KODI_UPNP_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build with MySQL support (mariadb / none)
|
||||||
|
KODI_MYSQL_SUPPORT="mariadb"
|
||||||
|
|
||||||
|
# build Kodi with optical drive support (yes / no)
|
||||||
|
KODI_OPTICAL_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build with AirPlay support (stream videos from iDevices to KODI) (yes / no)
|
||||||
|
KODI_AIRPLAY_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build with AirTunes support (stream music from iDevices to KODI) (yes / no)
|
||||||
|
KODI_AIRTUNES_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build with libnfs support (mounting nfs shares with KODI) (yes / no)
|
||||||
|
KODI_NFS_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build with Samba Client support (mounting SAMBA shares with KODI) (yes / no)
|
||||||
|
KODI_SAMBA_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build kodi with alsa support (yes/no)
|
||||||
|
KODI_ALSA_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build kodi with pulseaudio support (yes/no)
|
||||||
|
KODI_PULSEAUDIO_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build kodi with pipewire support (yes/no)
|
||||||
|
KODI_PIPEWIRE_SUPPORT="no"
|
||||||
|
|
||||||
|
### KODI ADDONS ###
|
||||||
|
|
||||||
|
# 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=""
|
||||||
|
DISTRO_PKG_SETTINGS_ID=""
|
||||||
|
|
||||||
|
|
||||||
|
### 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=""
|
||||||
|
DEBUG_GROUP_YES=""
|
||||||
|
|
||||||
|
# build and install iSCSI support - iscsistart (yes / no)
|
||||||
|
ISCSI_SUPPORT="no"
|
||||||
|
|
||||||
|
# build with NFS support (mounting nfs shares via the OS) (yes / no)
|
||||||
|
NFS_SUPPORT="no"
|
||||||
|
|
||||||
|
# build with Samba Client support (mounting samba shares via the OS) (yes / no)
|
||||||
|
SAMBA_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install Samba Server (yes / no)
|
||||||
|
SAMBA_SERVER="no"
|
||||||
|
|
||||||
|
# build and install SFTP Server (yes / no)
|
||||||
|
SFTP_SERVER="yes"
|
||||||
|
|
||||||
|
# build and install OpenVPN support (yes / no)
|
||||||
|
OPENVPN_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build and install WireGuard support (yes / no)
|
||||||
|
WIREGUARD_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build and install diskmounter support (udevil)
|
||||||
|
# this service provide auto mounting support for external drives in the
|
||||||
|
# mediacenter also automount internally drives at boottime via udev (yes / no)
|
||||||
|
UDEVIL="yes"
|
||||||
|
|
||||||
|
# Support for partitioning and formatting 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 nano text editor (yes / no)
|
||||||
|
NANO_EDITOR="yes"
|
||||||
|
|
||||||
|
# cron support (yes / no)
|
||||||
|
CRON_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build with installer (yes / no)
|
||||||
|
INSTALLER_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build and install remote support (yes / no)
|
||||||
|
REMOTE_SUPPORT="no"
|
||||||
|
|
||||||
|
# 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="no"
|
||||||
|
|
||||||
|
# build and install CEC adapter support (yes / no)
|
||||||
|
CEC_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install CEC framework support (yes / no)
|
||||||
|
CEC_FRAMEWORK_SUPPORT="no"
|
||||||
|
|
||||||
|
# OEM packages for OEM's (yes / no)
|
||||||
|
OEM_SUPPORT="no"
|
||||||
|
|
||||||
|
# build and install ALSA Audio support (yes / no)
|
||||||
|
ALSA_SUPPORT="no"
|
||||||
|
|
||||||
|
# additional packages to install:
|
||||||
|
# Space separated list is supported,
|
||||||
|
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
|
||||||
|
ADDITIONAL_PACKAGES="avahi curl docker htop Python3"
|
||||||
|
|
||||||
|
# build and install driver addons (yes / no)
|
||||||
|
DRIVER_ADDONS_SUPPORT="no"
|
||||||
|
|
||||||
|
# driver addons to install:
|
||||||
|
# for a list of additional drivers see packages/linux-driver-addons
|
||||||
|
# Space separated list is supported,
|
||||||
|
DRIVER_ADDONS=""
|
3
distributions/LEIoT/show_config
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
show_distro_config() {
|
||||||
|
: no-op
|
||||||
|
}
|
BIN
distributions/LEIoT/splash/splash-1080.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
distributions/LEIoT/splash/splash-1200.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
distributions/LEIoT/splash/splash-2160.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
distributions/LEIoT/splash/splash-720.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
distributions/LEIoT/splash/splash-768.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
5
distributions/LEIoT/version
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# VERSION: set full version, use "devel" for development version
|
||||||
|
DISTRO_VERSION="devel"
|
||||||
|
|
||||||
|
# OS_VERSION: OS Version
|
||||||
|
OS_VERSION="13.0"
|
@ -1,15 +1,19 @@
|
|||||||
### DISTRO INFORMATION ###
|
### DISTRO INFORMATION ###
|
||||||
|
|
||||||
# Name of the Distro to build (full name, without special characters)
|
# Distro name (full name, without special characters)
|
||||||
DISTRONAME="LibreELEC"
|
DISTRONAME="LibreELEC"
|
||||||
|
|
||||||
# short project description
|
# Short distro description
|
||||||
DESCRIPTION="LibreELEC is a fast and user-friendly Kodi Entertainment Center distribution."
|
DESCRIPTION="LibreELEC is a fast and user-friendly Kodi Entertainment Center distribution."
|
||||||
|
|
||||||
|
# Distribution Source location
|
||||||
|
DISTRO_MIRROR="https://sources.libreelec.tv/mirror"
|
||||||
|
DISTRO_SRC="https://sources.libreelec.tv/$DISTRO_VERSION"
|
||||||
|
|
||||||
### USER INTERFACE SETTINGS ###
|
# Distribution Home URL
|
||||||
|
DISTRO_HOME_URL="https://libreelec.tv"
|
||||||
|
|
||||||
# Welcome Message for e.g. SSH Server (up to 5 Lines)
|
# Welcome Message for SSH Server (up to 5 Lines)
|
||||||
GREETING0="##############################################"
|
GREETING0="##############################################"
|
||||||
GREETING1="# LibreELEC #"
|
GREETING1="# LibreELEC #"
|
||||||
GREETING2="# https://libreelec.tv #"
|
GREETING2="# https://libreelec.tv #"
|
||||||
@ -90,6 +94,9 @@
|
|||||||
# local console login prompt (yes / no)
|
# local console login prompt (yes / no)
|
||||||
LOCAL_LOGIN="no"
|
LOCAL_LOGIN="no"
|
||||||
|
|
||||||
|
# Enable SSH on boot (yes / no)
|
||||||
|
SSH_ENABLED_DEFAULT="no"
|
||||||
|
|
||||||
### KODI SETTINGS ###
|
### KODI SETTINGS ###
|
||||||
# Mediacenter to use (kodi / no)
|
# Mediacenter to use (kodi / no)
|
||||||
MEDIACENTER="kodi"
|
MEDIACENTER="kodi"
|
||||||
@ -170,10 +177,6 @@
|
|||||||
|
|
||||||
### KODI ADDONS ###
|
### 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
|
||||||
ADDON_SERVER_URL="https://addons.libreelec.tv"
|
ADDON_SERVER_URL="https://addons.libreelec.tv"
|
||||||
|
|
||||||
@ -259,3 +262,11 @@
|
|||||||
# Space separated list is supported,
|
# Space separated list is supported,
|
||||||
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
|
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
|
||||||
ADDITIONAL_PACKAGES=""
|
ADDITIONAL_PACKAGES=""
|
||||||
|
|
||||||
|
# build and install driver addons (yes / no)
|
||||||
|
DRIVER_ADDONS_SUPPORT="no"
|
||||||
|
|
||||||
|
# driver addons to install:
|
||||||
|
# for a list of additional drivers see packages/linux-driver-addons
|
||||||
|
# Space separated list is supported,
|
||||||
|
DRIVER_ADDONS="crazycat digital_devices dvb-latest"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# VERSION: set full version, use "devel" for development version
|
# VERSION: set full version, use "devel" for development version
|
||||||
LIBREELEC_VERSION="devel"
|
DISTRO_VERSION="devel"
|
||||||
|
|
||||||
# OS_VERSION: OS Version
|
# OS_VERSION: OS Version
|
||||||
OS_VERSION="13.0"
|
OS_VERSION="13.0"
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
# Copyright (C) 2025-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
|
PKG_NAME="docker-compose"
|
||||||
|
PKG_VERSION="2.35.1"
|
||||||
|
PKG_LICENSE="Apache-2.0"
|
||||||
|
PKG_SITE="https://github.com/docker/compose"
|
||||||
|
PKG_LONGDESC="Define and run multi-container applications with Docker."
|
||||||
|
PKG_TOOLCHAIN="manual"
|
||||||
|
|
||||||
|
case ${ARCH} in
|
||||||
|
x86_64)
|
||||||
|
PKG_URL="${PKG_SITE}/releases/download/v${PKG_VERSION}/docker-compose-linux-x86_64"
|
||||||
|
PKG_SHA256="7bdb2ce2916e5dd0354e5d129892bf96fdcdb1a9ab8eed69b9173e131db4c230"
|
||||||
|
;;
|
||||||
|
aarch64)
|
||||||
|
PKG_URL="${PKG_SITE}/releases/download/v${PKG_VERSION}/docker-compose-linux-aarch64"
|
||||||
|
PKG_SHA256="a91e930a076b91e6c69f11d1dbe3c06729ae765fb9dbb3f97cb808e784647399"
|
||||||
|
;;
|
||||||
|
arm)
|
||||||
|
PKG_URL="${PKG_SITE}/releases/download/v${PKG_VERSION}/docker-compose-linux-armv7"
|
||||||
|
PKG_SHA256="50aba1c8fe1eb8efefede3dab9e6c2226ba756a5ffa5cf4f4f5baadaee9a7455"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
PKG_SOURCE_NAME="docker-compose-linux-${ARCH}-${PKG_VERSION}"
|
||||||
|
|
||||||
|
unpack() {
|
||||||
|
mkdir -p ${PKG_BUILD}
|
||||||
|
cp -P ${SOURCES}/${PKG_NAME}/${PKG_SOURCE_NAME} ${PKG_BUILD}/docker-compose
|
||||||
|
chmod +x ${PKG_BUILD}/docker-compose
|
||||||
|
}
|
2
packages/addons/service/docker/config/docker.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
DOCKER_DAEMON_OPTS="--data-root=/storage/docker"
|
||||||
|
DOCKER_STORAGE_OPTS="--storage-driver=overlay2"
|
161
packages/addons/service/docker/lib/dockermon.py
Executable file
@ -0,0 +1,161 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
"""docker monitor using docker /events HTTP streaming API"""
|
||||||
|
"""https://github.com/CyberInt/dockermon"""
|
||||||
|
|
||||||
|
from contextlib import closing
|
||||||
|
from functools import partial
|
||||||
|
from socket import socket, AF_UNIX, timeout
|
||||||
|
from subprocess import Popen, PIPE
|
||||||
|
from sys import stdout, version_info
|
||||||
|
import json
|
||||||
|
import shlex
|
||||||
|
|
||||||
|
if version_info[:2] < (3, 0):
|
||||||
|
from httplib import OK as HTTP_OK
|
||||||
|
from urlparse import urlparse
|
||||||
|
else:
|
||||||
|
from http.client import OK as HTTP_OK
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
|
__version__ = '0.2.2'
|
||||||
|
# buffer size must be 256 or lower otherwise events won't show in realtime
|
||||||
|
bufsize = 256
|
||||||
|
default_sock_url = 'ipc:///var/run/docker.sock'
|
||||||
|
|
||||||
|
|
||||||
|
class DockermonError(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def read_http_header(sock):
|
||||||
|
"""Read HTTP header from socket, return header and rest of data."""
|
||||||
|
buf = []
|
||||||
|
hdr_end = '\r\n\r\n'
|
||||||
|
|
||||||
|
while True:
|
||||||
|
buf.append(sock.recv(bufsize).decode('utf-8'))
|
||||||
|
data = ''.join(buf)
|
||||||
|
i = data.find(hdr_end)
|
||||||
|
if i == -1:
|
||||||
|
continue
|
||||||
|
return data[:i], data[i + len(hdr_end):]
|
||||||
|
|
||||||
|
|
||||||
|
def header_status(header):
|
||||||
|
"""Parse HTTP status line, return status (int) and reason."""
|
||||||
|
status_line = header[:header.find('\r')]
|
||||||
|
# 'HTTP/1.1 200 OK' -> (200, 'OK')
|
||||||
|
fields = status_line.split(None, 2)
|
||||||
|
return int(fields[1]), fields[2]
|
||||||
|
|
||||||
|
|
||||||
|
def connect(url):
|
||||||
|
"""Connect to UNIX or TCP socket.
|
||||||
|
|
||||||
|
url can be either tcp://<host>:port or ipc://<path>
|
||||||
|
"""
|
||||||
|
url = urlparse(url)
|
||||||
|
if url.scheme == 'tcp':
|
||||||
|
sock = socket()
|
||||||
|
netloc = tuple(url.netloc.rsplit(':', 1))
|
||||||
|
hostname = socket.gethostname()
|
||||||
|
elif url.scheme == 'ipc':
|
||||||
|
sock = socket(AF_UNIX)
|
||||||
|
netloc = url.path
|
||||||
|
hostname = 'localhost'
|
||||||
|
else:
|
||||||
|
raise ValueError('unknown socket type: %s' % url.scheme)
|
||||||
|
|
||||||
|
sock.connect(netloc)
|
||||||
|
return sock, hostname
|
||||||
|
|
||||||
|
|
||||||
|
def watch(callback, url=default_sock_url, run=None):
|
||||||
|
"""Watch docker events. Will call callback with each new event (dict).
|
||||||
|
|
||||||
|
url can be either tcp://<host>:port or ipc://<path>
|
||||||
|
"""
|
||||||
|
sock, hostname = connect(url)
|
||||||
|
if run:
|
||||||
|
sock.settimeout(1.5)
|
||||||
|
request = 'GET /events HTTP/1.1\nHost: %s\n\n' % hostname
|
||||||
|
request = request.encode('utf-8')
|
||||||
|
|
||||||
|
with closing(sock):
|
||||||
|
sock.sendall(request)
|
||||||
|
header, payload = read_http_header(sock)
|
||||||
|
status, reason = header_status(header)
|
||||||
|
if status != HTTP_OK:
|
||||||
|
raise DockermonError('bad HTTP status: %s %s' % (status, reason))
|
||||||
|
|
||||||
|
# Messages are \r\n<size in hex><JSON payload>\r\n
|
||||||
|
buf = [payload]
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
chunk = sock.recv(bufsize)
|
||||||
|
except timeout:
|
||||||
|
if run():
|
||||||
|
continue
|
||||||
|
if run and not run():
|
||||||
|
raise DockermonError('stopped')
|
||||||
|
if not chunk:
|
||||||
|
raise EOFError('socket closed')
|
||||||
|
buf.append(chunk.decode('utf-8'))
|
||||||
|
data = ''.join(buf)
|
||||||
|
i = data.find('\r\n')
|
||||||
|
if i == -1:
|
||||||
|
continue
|
||||||
|
|
||||||
|
size = int(data[:i], 16)
|
||||||
|
start = i + 2 # Skip initial \r\n
|
||||||
|
|
||||||
|
if len(data) < start + size + 2:
|
||||||
|
continue
|
||||||
|
payload = data[start:start+size]
|
||||||
|
callback(json.loads(payload))
|
||||||
|
buf = [data[start+size+2:]] # Skip \r\n suffix
|
||||||
|
|
||||||
|
|
||||||
|
def print_callback(msg):
|
||||||
|
"""Print callback, prints message to stdout as JSON in one line."""
|
||||||
|
json.dump(msg, stdout)
|
||||||
|
stdout.write('\n')
|
||||||
|
stdout.flush()
|
||||||
|
|
||||||
|
|
||||||
|
def prog_callback(prog, msg):
|
||||||
|
"""Program callback, calls prog with message in stdin"""
|
||||||
|
pipe = Popen(prog, stdin=PIPE)
|
||||||
|
data = json.dumps(msg)
|
||||||
|
pipe.stdin.write(data.encode('utf-8'))
|
||||||
|
pipe.stdin.close()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
|
parser = ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument('--prog', default=None,
|
||||||
|
help='program to call (e.g. "jq --unbuffered .")')
|
||||||
|
parser.add_argument(
|
||||||
|
'--socket-url', default=default_sock_url,
|
||||||
|
help='socket url (ipc:///path/to/sock or tcp:///host:port)')
|
||||||
|
parser.add_argument(
|
||||||
|
'--version', help='print version and exit',
|
||||||
|
action='store_true', default=False)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
if args.version:
|
||||||
|
print('dockermon %s' % __version__)
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
|
if args.prog:
|
||||||
|
prog = shlex.split(args.prog)
|
||||||
|
callback = partial(prog_callback, prog)
|
||||||
|
else:
|
||||||
|
callback = print_callback
|
||||||
|
|
||||||
|
try:
|
||||||
|
watch(callback, args.socket_url)
|
||||||
|
except (KeyboardInterrupt, EOFError):
|
||||||
|
pass
|
@ -6,7 +6,7 @@ PKG_REV="1"
|
|||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="ASL"
|
PKG_LICENSE="ASL"
|
||||||
PKG_SITE="http://www.docker.com/"
|
PKG_SITE="http://www.docker.com/"
|
||||||
PKG_DEPENDS_TARGET="cli containerd ctop moby runc tini"
|
PKG_DEPENDS_TARGET="cli containerd ctop docker-compose moby runc tini"
|
||||||
PKG_SECTION="service/system"
|
PKG_SECTION="service/system"
|
||||||
PKG_SHORTDESC="Docker is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere."
|
PKG_SHORTDESC="Docker is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere."
|
||||||
PKG_LONGDESC="Docker containers can encapsulate any payload, and will run consistently on and between virtually any server. The same container that a developer builds and tests on a laptop will run at scale, in production*, on VMs, bare-metal servers, OpenStack clusters, public instances, or combinations of the above."
|
PKG_LONGDESC="Docker containers can encapsulate any payload, and will run consistently on and between virtually any server. The same container that a developer builds and tests on a laptop will run at scale, in production*, on VMs, bare-metal servers, OpenStack clusters, public instances, or combinations of the above."
|
||||||
@ -43,3 +43,40 @@ addon() {
|
|||||||
post_install_addon() {
|
post_install_addon() {
|
||||||
sed -e "s/@DISTRO_PKG_SETTINGS_ID@/${DISTRO_PKG_SETTINGS_ID}/g" -i "${INSTALL}/default.py"
|
sed -e "s/@DISTRO_PKG_SETTINGS_ID@/${DISTRO_PKG_SETTINGS_ID}/g" -i "${INSTALL}/default.py"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post_makeinstall_target() {
|
||||||
|
mkdir -p ${INSTALL}/etc
|
||||||
|
# docker.conf
|
||||||
|
cp -P ${PKG_DIR}/config/docker.conf ${INSTALL}/etc
|
||||||
|
|
||||||
|
mkdir -p ${INSTALL}/usr/bin
|
||||||
|
# dockermon.py
|
||||||
|
cp -P ${PKG_DIR}/lib/dockermon.py ${INSTALL}/usr/bin/dockermon
|
||||||
|
|
||||||
|
# cli
|
||||||
|
cp -P $(get_build_dir cli)/bin/docker ${INSTALL}/usr/bin
|
||||||
|
|
||||||
|
# moby
|
||||||
|
cp -P $(get_build_dir moby)/bin/dockerd ${INSTALL}/usr/bin
|
||||||
|
cp -P $(get_build_dir moby)/bin/docker-proxy ${INSTALL}/usr/bin/docker-proxy
|
||||||
|
|
||||||
|
# containerd
|
||||||
|
cp -P $(get_build_dir containerd)/bin/containerd ${INSTALL}/usr/bin/containerd
|
||||||
|
cp -P $(get_build_dir containerd)/bin/containerd-shim-runc-v2 ${INSTALL}/usr/bin/containerd-shim-runc-v2
|
||||||
|
|
||||||
|
# ctop
|
||||||
|
cp -P $(get_build_dir ctop)/bin/ctop ${INSTALL}/usr/bin/ctop
|
||||||
|
|
||||||
|
# docker-compose
|
||||||
|
cp -P $(get_build_dir docker-compose)/docker-compose ${INSTALL}/usr/bin/docker-compose
|
||||||
|
|
||||||
|
# runc
|
||||||
|
cp -P $(get_build_dir runc)/bin/runc ${INSTALL}/usr/bin/runc
|
||||||
|
|
||||||
|
# tini
|
||||||
|
cp -P $(get_build_dir tini)/.${TARGET_NAME}/tini-static ${INSTALL}/usr/bin/docker-init
|
||||||
|
}
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
enable_service docker.service
|
||||||
|
}
|
||||||
|
23
packages/addons/service/docker/system.d/docker.service
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Docker Application Container Engine
|
||||||
|
Documentation=https://docs.docker.com
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
EnvironmentFile=-/etc/docker.conf
|
||||||
|
ExecStart=/usr/bin/dockerd --exec-opt native.cgroupdriver=systemd \
|
||||||
|
--log-driver=journald \
|
||||||
|
--group=root \
|
||||||
|
$DOCKER_DAEMON_OPTS \
|
||||||
|
$DOCKER_STORAGE_OPTS
|
||||||
|
ExecReload=/bin/kill -s HUP $MAINPID
|
||||||
|
TasksMax=8192
|
||||||
|
LimitNOFILE=1048576
|
||||||
|
LimitNPROC=1048576
|
||||||
|
LimitCORE=infinity
|
||||||
|
TimeoutStartSec=0
|
||||||
|
Restart=on-abnormal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -0,0 +1,4 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
# Copyright (C) 2025-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
|
d /storage/docker 0755 root root - -
|
@ -7,7 +7,7 @@
|
|||||||
oe_setup_addon service.snapclient
|
oe_setup_addon service.snapclient
|
||||||
|
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
case "$LIBREELEC_ARCH" in
|
case "$DISTRO_ARCH" in
|
||||||
RPi*.arm)
|
RPi*.arm)
|
||||||
if [ "$sc_a" == "true" ]; then
|
if [ "$sc_a" == "true" ]; then
|
||||||
ALSA="/proc/asound/ALSA"
|
ALSA="/proc/asound/ALSA"
|
||||||
|
@ -13,7 +13,7 @@ vars = re.findall(r"^[a-zA-Z0-9_]+=.*$", contents, flags=re.MULTILINE)
|
|||||||
reader = csv.reader(vars, delimiter="=")
|
reader = csv.reader(vars, delimiter="=")
|
||||||
osrelease = dict(reader)
|
osrelease = dict(reader)
|
||||||
|
|
||||||
if osrelease['LIBREELEC_ARCH'] == 'x11.x86_64' or osrelease['LIBREELEC_ARCH'] == 'Generic-legacy.x86_64':
|
if osrelease['DISTRO_ARCH'] == 'x11.x86_64' or osrelease['DISTRO_ARCH'] == 'Generic-legacy.x86_64':
|
||||||
yes = xbmcgui.Dialog().yesno('System Tools', 'This is a console-only addon.[CR][CR]Open a terminal window?',nolabel='No',yeslabel='Yes')
|
yes = xbmcgui.Dialog().yesno('System Tools', 'This is a console-only addon.[CR][CR]Open a terminal window?',nolabel='No',yeslabel='Yes')
|
||||||
if yes:
|
if yes:
|
||||||
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;cd;exec st -e sh -l"], shell=False, close_fds=True)
|
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;cd;exec st -e sh -l"], shell=False, close_fds=True)
|
||||||
|
@ -14,7 +14,7 @@ PKG_LONGDESC="A collection of utilities to handle ELF objects."
|
|||||||
PKG_TOOLCHAIN="autotools"
|
PKG_TOOLCHAIN="autotools"
|
||||||
PKG_BUILD_FLAGS="+pic -cfg-libs -cfg-libs:host"
|
PKG_BUILD_FLAGS="+pic -cfg-libs -cfg-libs:host"
|
||||||
|
|
||||||
if [ "${LIBREELEC_VERSION}" = "devel" ]; then
|
if [ "${DISTRO_VERSION}" = "devel" ]; then
|
||||||
PKG_PROGRAMS="--enable-programs --program-prefix="
|
PKG_PROGRAMS="--enable-programs --program-prefix="
|
||||||
PKG_PROGRAMS_LIST="readelf"
|
PKG_PROGRAMS_LIST="readelf"
|
||||||
else
|
else
|
||||||
|
@ -54,7 +54,7 @@ while getopts ":hc" opt; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
SYSTEM_ARCH="${LIBREELEC_ARCH#*.}"
|
SYSTEM_ARCH="${DISTRO_ARCH#*.}"
|
||||||
|
|
||||||
# If running in SAFE mode, send FAILED logs
|
# If running in SAFE mode, send FAILED logs
|
||||||
if [ "$(cat "/storage/.config/boot.status" 2>/dev/null)" = "SAFE" ]; then
|
if [ "$(cat "/storage/.config/boot.status" 2>/dev/null)" = "SAFE" ]; then
|
||||||
@ -81,7 +81,7 @@ fi
|
|||||||
echo "Firmware Boot Mode: BIOS"
|
echo "Firmware Boot Mode: BIOS"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "${LIBREELEC_PROJECT}" = "RPi" ]; then
|
if [ "${DISTRO_PROJECT}" = "RPi" ]; then
|
||||||
echo "RPi Hardware Revision: $(vcgencmd otp_dump | grep 30: | cut -d: -f2)"
|
echo "RPi Hardware Revision: $(vcgencmd otp_dump | grep 30: | cut -d: -f2)"
|
||||||
echo "RPi $(vcgencmd get_throttled)"
|
echo "RPi $(vcgencmd get_throttled)"
|
||||||
fi
|
fi
|
||||||
@ -92,7 +92,7 @@ fi
|
|||||||
|
|
||||||
kmsprint | cat_data "kmsprint"
|
kmsprint | cat_data "kmsprint"
|
||||||
|
|
||||||
if [ "${LIBREELEC_PROJECT}" = "RPi" ]; then
|
if [ "${DISTRO_PROJECT}" = "RPi" ]; then
|
||||||
vcgencmd bootloader_version | cat_data "Bootloader version"
|
vcgencmd bootloader_version | cat_data "Bootloader version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -55,5 +55,8 @@ post_makeinstall_target() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
if [ "${SSH_ENABLED_DEFAULT}" = "yes" ]; then
|
||||||
|
sed -e "\|^Condition.*|d" -i ${INSTALL}/usr/lib/systemd/system/sshd.service
|
||||||
|
fi
|
||||||
enable_service sshd.service
|
enable_service sshd.service
|
||||||
}
|
}
|
||||||
|
@ -261,7 +261,7 @@ mount_sysroot() {
|
|||||||
get_project_arch() {
|
get_project_arch() {
|
||||||
if [ -f ${1}/etc/os-release ]; then
|
if [ -f ${1}/etc/os-release ]; then
|
||||||
. ${1}/etc/os-release
|
. ${1}/etc/os-release
|
||||||
echo "${LIBREELEC_ARCH}"
|
echo "${DISTRO_ARCH}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=LEDfix Service
|
Description=LEDfix Service
|
||||||
After=network-online.target graphical.target
|
After=network-online.target
|
||||||
Requires=graphical.target
|
|
||||||
Wants=kodi.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
@ -11,4 +9,4 @@ RemainAfterExit=yes
|
|||||||
StartLimitInterval=0
|
StartLimitInterval=0
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=kodi.target
|
WantedBy=multi-user.target
|
||||||
|
@ -35,7 +35,7 @@ create_multi_keymap() {
|
|||||||
post_makeinstall_target() {
|
post_makeinstall_target() {
|
||||||
local f keymap
|
local f keymap
|
||||||
|
|
||||||
if [ ! "${LIBREELEC_VERSION}" == "devel" ]; then
|
if [ ! "${DISTRO_VERSION}" == "devel" ]; then
|
||||||
rm ${INSTALL}/usr/bin/v4l2-compliance
|
rm ${INSTALL}/usr/bin/v4l2-compliance
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -281,9 +281,9 @@ EOF
|
|||||||
|
|
||||||
cat << EOF > $TMPDIR/part1/EFI/BOOT/grub.cfg
|
cat << EOF > $TMPDIR/part1/EFI/BOOT/grub.cfg
|
||||||
set timeout="0"
|
set timeout="0"
|
||||||
set default="LibreELEC"
|
set default="@DISTRONAME@"
|
||||||
|
|
||||||
menuentry "LibreELEC" {
|
menuentry "@DISTRONAME@" {
|
||||||
search --set -f /KERNEL
|
search --set -f /KERNEL
|
||||||
linux /KERNEL boot=UUID=$UUID_SYSTEM disk=UUID=$UUID_STORAGE quiet
|
linux /KERNEL boot=UUID=$UUID_SYSTEM disk=UUID=$UUID_STORAGE quiet
|
||||||
}
|
}
|
||||||
|
@ -25,35 +25,35 @@ mkimage_bootini(){
|
|||||||
|
|
||||||
mkimage_uEnv(){
|
mkimage_uEnv(){
|
||||||
echo "image: creating uEnv.ini"
|
echo "image: creating uEnv.ini"
|
||||||
cat << EOF > "${LE_TMP}/uEnv.ini"
|
cat << EOF > "${IMG_TMP}/uEnv.ini"
|
||||||
dtb_name=/amlogic/${DTB}
|
dtb_name=/amlogic/${DTB}
|
||||||
bootargs=boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
bootargs=boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
||||||
EOF
|
EOF
|
||||||
mcopy -s "${LE_TMP}/uEnv.ini" ::
|
mcopy -s "${IMG_TMP}/uEnv.ini" ::
|
||||||
}
|
}
|
||||||
|
|
||||||
mkimage_extlinux(){
|
mkimage_extlinux(){
|
||||||
echo "image: copying exlinux.conf"
|
echo "image: copying exlinux.conf"
|
||||||
mkdir -p "${LE_TMP}/extlinux"
|
mkdir -p "${IMG_TMP}/extlinux"
|
||||||
cat << EOF > "${LE_TMP}/extlinux/extlinux.conf"
|
cat << EOF > "${IMG_TMP}/extlinux/extlinux.conf"
|
||||||
LABEL ${DISTRO}
|
LABEL ${DISTRO}
|
||||||
LINUX /${KERNEL_NAME}
|
LINUX /${KERNEL_NAME}
|
||||||
FDT /amlogic/${DTB}
|
FDT /amlogic/${DTB}
|
||||||
APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} quiet ${EXTRA_CMDLINE}
|
APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} quiet ${EXTRA_CMDLINE}
|
||||||
EOF
|
EOF
|
||||||
mcopy -s -o "${LE_TMP}/extlinux" ::
|
mcopy -s -o "${IMG_TMP}/extlinux" ::
|
||||||
}
|
}
|
||||||
|
|
||||||
mkimage_extlinux_fdtdir(){
|
mkimage_extlinux_fdtdir(){
|
||||||
echo "image: copying exlinux.conf"
|
echo "image: copying exlinux.conf"
|
||||||
mkdir -p "${LE_TMP}/extlinux"
|
mkdir -p "${IMG_TMP}/extlinux"
|
||||||
cat << EOF > "${LE_TMP}/extlinux/extlinux.conf"
|
cat << EOF > "${IMG_TMP}/extlinux/extlinux.conf"
|
||||||
LABEL ${DISTRO}
|
LABEL ${DISTRO}
|
||||||
LINUX /${KERNEL_NAME}
|
LINUX /${KERNEL_NAME}
|
||||||
FDTDIR /
|
FDTDIR /
|
||||||
APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} quiet ${EXTRA_CMDLINE}
|
APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} quiet ${EXTRA_CMDLINE}
|
||||||
EOF
|
EOF
|
||||||
mcopy -s -o "${LE_TMP}/extlinux" ::
|
mcopy -s -o "${IMG_TMP}/extlinux" ::
|
||||||
}
|
}
|
||||||
|
|
||||||
mkimage_dtb(){
|
mkimage_dtb(){
|
||||||
|
@ -66,14 +66,6 @@
|
|||||||
# e.g. ADDITIONAL_DRIVERS+=" DRIVER1 DRIVER2"
|
# e.g. ADDITIONAL_DRIVERS+=" DRIVER1 DRIVER2"
|
||||||
ADDITIONAL_DRIVERS+=""
|
ADDITIONAL_DRIVERS+=""
|
||||||
|
|
||||||
# build and install driver addons (yes / no)
|
|
||||||
DRIVER_ADDONS_SUPPORT="no"
|
|
||||||
|
|
||||||
# driver addons to install:
|
|
||||||
# for a list of additional drivers see packages/linux-driver-addons
|
|
||||||
# Space separated list is supported,
|
|
||||||
DRIVER_ADDONS="crazycat dvb-latest"
|
|
||||||
|
|
||||||
# additional packages to install:
|
# additional packages to install:
|
||||||
ADDITIONAL_PACKAGES+=" dtc ethmactool emmctool flashrom pciutils"
|
ADDITIONAL_PACKAGES+=" dtc ethmactool emmctool flashrom pciutils"
|
||||||
|
|
||||||
|
@ -19,14 +19,14 @@ xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemS
|
|||||||
<Name>@DISTRO@</Name>
|
<Name>@DISTRO@</Name>
|
||||||
<ProductSection>
|
<ProductSection>
|
||||||
<Info>Meta-information about the installed software</Info>
|
<Info>Meta-information about the installed software</Info>
|
||||||
<Product>LibreELEC</Product>
|
<Product>@DISTRO@</Product>
|
||||||
<Vendor>LibreELEC</Vendor>
|
<Vendor>@DISTRO@</Vendor>
|
||||||
<ProductUrl>https://libreelec.tv</ProductUrl>
|
<ProductUrl>@DISTRO_HOME_URL@</ProductUrl>
|
||||||
<VendorUrl>https://libreelec.tv</VendorUrl>
|
<VendorUrl>@DISTRO_HOME_URL@</VendorUrl>
|
||||||
</ProductSection>
|
</ProductSection>
|
||||||
<AnnotationSection>
|
<AnnotationSection>
|
||||||
<Info>A human-readable annotation</Info>
|
<Info>A human-readable annotation</Info>
|
||||||
<Annotation>LibreELEC is ‘Just enough OS’ for Kodi, a Linux distribution built to run Kodi on current and popular mediacentre hardware. After importing the OVA image adjust CPU, RAM, and HDD storage to the required configuration before first boot.</Annotation>
|
<Annotation>After importing the OVA image, adjust CPU, RAM, and HDD storage to the required configuration before first boot.</Annotation>
|
||||||
</AnnotationSection>
|
</AnnotationSection>
|
||||||
<OperatingSystemSection ovf:id="94" vmw:osType="Ubuntu 64-bit">
|
<OperatingSystemSection ovf:id="94" vmw:osType="Ubuntu 64-bit">
|
||||||
<Info>The kind of installed guest operating system</Info>
|
<Info>The kind of installed guest operating system</Info>
|
||||||
@ -35,7 +35,7 @@ xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemS
|
|||||||
<System>
|
<System>
|
||||||
<vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
|
<vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
|
||||||
<vssd:InstanceID>0</vssd:InstanceID>
|
<vssd:InstanceID>0</vssd:InstanceID>
|
||||||
<vssd:VirtualSystemIdentifier>LibreELEC</vssd:VirtualSystemIdentifier>
|
<vssd:VirtualSystemIdentifier>@DISTRO@</vssd:VirtualSystemIdentifier>
|
||||||
<vssd:VirtualSystemType>vmx-12</vssd:VirtualSystemType>
|
<vssd:VirtualSystemType>vmx-12</vssd:VirtualSystemType>
|
||||||
</System>
|
</System>
|
||||||
<Item>
|
<Item>
|
||||||
|
@ -62,14 +62,6 @@
|
|||||||
# e.g. ADDITIONAL_DRIVERS+=" DRIVER1 DRIVER2"
|
# e.g. ADDITIONAL_DRIVERS+=" DRIVER1 DRIVER2"
|
||||||
ADDITIONAL_DRIVERS+=""
|
ADDITIONAL_DRIVERS+=""
|
||||||
|
|
||||||
# build and install driver addons (yes / no)
|
|
||||||
DRIVER_ADDONS_SUPPORT="no"
|
|
||||||
|
|
||||||
# driver addons to install:
|
|
||||||
# for a list of additional drivers see packages/linux-driver-addons
|
|
||||||
# Space separated list is supported,
|
|
||||||
DRIVER_ADDONS="crazycat digital_devices dvb-latest"
|
|
||||||
|
|
||||||
# Default size of the ova image, in MB, eg. 4096
|
# Default size of the ova image, in MB, eg. 4096
|
||||||
OVA_SIZE="4096"
|
OVA_SIZE="4096"
|
||||||
|
|
||||||
|
@ -16,11 +16,11 @@ mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader"/imx6d*${UBOOT_SYSTEM}*.dtb ::
|
|||||||
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader"/imx6q*${UBOOT_SYSTEM}*.dtb ::
|
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader"/imx6q*${UBOOT_SYSTEM}*.dtb ::
|
||||||
|
|
||||||
echo "image: copying exlinux.conf"
|
echo "image: copying exlinux.conf"
|
||||||
mkdir -p "${LE_TMP}/extlinux"
|
mkdir -p "${IMG_TMP}/extlinux"
|
||||||
cat << EOF > "${LE_TMP}/extlinux/extlinux.conf"
|
cat << EOF > "${IMG_TMP}/extlinux/extlinux.conf"
|
||||||
LABEL ${DISTRO}
|
LABEL ${DISTRO}
|
||||||
LINUX /${KERNEL_NAME}
|
LINUX /${KERNEL_NAME}
|
||||||
FDTDIR /
|
FDTDIR /
|
||||||
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
||||||
EOF
|
EOF
|
||||||
mcopy -s -o "${LE_TMP}/extlinux" ::
|
mcopy -s -o "${IMG_TMP}/extlinux" ::
|
||||||
|
@ -52,14 +52,6 @@
|
|||||||
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)
|
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)
|
||||||
KODIPLAYER_DRIVER="mesa"
|
KODIPLAYER_DRIVER="mesa"
|
||||||
|
|
||||||
# build and install driver addons (yes / no)
|
|
||||||
DRIVER_ADDONS_SUPPORT="no"
|
|
||||||
|
|
||||||
# driver addons to install:
|
|
||||||
# for a list of additional drivers see packages/linux-driver-addons
|
|
||||||
# Space separated list is supported,
|
|
||||||
DRIVER_ADDONS="crazycat dvb-latest"
|
|
||||||
|
|
||||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||||
# Space separated list is supported,
|
# Space separated list is supported,
|
||||||
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
||||||
|
@ -85,14 +85,6 @@
|
|||||||
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
||||||
FIRMWARE="misc-firmware wlan-firmware dvb-firmware firmware-dragonboard"
|
FIRMWARE="misc-firmware wlan-firmware dvb-firmware firmware-dragonboard"
|
||||||
|
|
||||||
# build and install driver addons (yes / no)
|
|
||||||
DRIVER_ADDONS_SUPPORT="no"
|
|
||||||
|
|
||||||
# driver addons to install:
|
|
||||||
# for a list of additional drivers see packages/linux-driver-addons
|
|
||||||
# Space separated list is supported,
|
|
||||||
DRIVER_ADDONS="crazycat dvb-latest"
|
|
||||||
|
|
||||||
# build with installer (yes / no)
|
# build with installer (yes / no)
|
||||||
INSTALLER_SUPPORT="no"
|
INSTALLER_SUPPORT="no"
|
||||||
|
|
||||||
|
@ -80,14 +80,6 @@
|
|||||||
ADDITIONAL_DRIVERS+=" rpi-cirrus-config"
|
ADDITIONAL_DRIVERS+=" rpi-cirrus-config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build and install driver addons (yes / no)
|
|
||||||
DRIVER_ADDONS_SUPPORT="no"
|
|
||||||
|
|
||||||
# driver addons to install:
|
|
||||||
# for a list of additional drivers see packages/linux-driver-addons
|
|
||||||
# Space separated list is supported,
|
|
||||||
DRIVER_ADDONS="crazycat dvb-latest"
|
|
||||||
|
|
||||||
# additional packages to install:
|
# additional packages to install:
|
||||||
ADDITIONAL_PACKAGES+=" bcm2835-utils dtc"
|
ADDITIONAL_PACKAGES+=" bcm2835-utils dtc"
|
||||||
|
|
||||||
|
@ -73,13 +73,5 @@
|
|||||||
# Start boot partition at 16MiB, same as https://github.com/rockchip-linux/build images
|
# Start boot partition at 16MiB, same as https://github.com/rockchip-linux/build images
|
||||||
SYSTEM_PART_START=32768
|
SYSTEM_PART_START=32768
|
||||||
|
|
||||||
# build and install driver addons (yes / no)
|
|
||||||
DRIVER_ADDONS_SUPPORT="no"
|
|
||||||
|
|
||||||
# driver addons to install:
|
|
||||||
# for a list of additinoal drivers see packages/linux-driver-addons
|
|
||||||
# Space separated list is supported,
|
|
||||||
DRIVER_ADDONS="dvb-latest"
|
|
||||||
|
|
||||||
# debug tty path
|
# debug tty path
|
||||||
DEBUG_TTY="/dev/ttyS2"
|
DEBUG_TTY="/dev/ttyS2"
|
||||||
|
@ -14,14 +14,14 @@ mkimage_uboot(){
|
|||||||
|
|
||||||
mkimage_extlinux(){
|
mkimage_extlinux(){
|
||||||
echo "image: copying exlinux.conf"
|
echo "image: copying exlinux.conf"
|
||||||
mkdir -p "${LE_TMP}/extlinux"
|
mkdir -p "${IMG_TMP}/extlinux"
|
||||||
cat << EOF > "${LE_TMP}/extlinux/extlinux.conf"
|
cat << EOF > "${IMG_TMP}/extlinux/extlinux.conf"
|
||||||
LABEL ${DISTRO}
|
LABEL ${DISTRO}
|
||||||
LINUX /${KERNEL_NAME}
|
LINUX /${KERNEL_NAME}
|
||||||
FDT /${DTB}
|
FDT /${DTB}
|
||||||
APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} ${EXTRA_CMDLINE}
|
APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} ${EXTRA_CMDLINE}
|
||||||
EOF
|
EOF
|
||||||
mcopy -s -o "${LE_TMP}/extlinux" ::
|
mcopy -s -o "${IMG_TMP}/extlinux" ::
|
||||||
}
|
}
|
||||||
|
|
||||||
mkimage_dtb(){
|
mkimage_dtb(){
|
||||||
|
@ -73,14 +73,6 @@
|
|||||||
# e.g. ADDITIONAL_DRIVERS+=" DRIVER1 DRIVER2"
|
# e.g. ADDITIONAL_DRIVERS+=" DRIVER1 DRIVER2"
|
||||||
ADDITIONAL_DRIVERS+=""
|
ADDITIONAL_DRIVERS+=""
|
||||||
|
|
||||||
# build and install driver addons (yes / no)
|
|
||||||
DRIVER_ADDONS_SUPPORT="no"
|
|
||||||
|
|
||||||
# driver addons to install:
|
|
||||||
# for a list of additional drivers see packages/linux-driver-addons
|
|
||||||
# Space separated list is supported,
|
|
||||||
DRIVER_ADDONS="crazycat dvb-latest"
|
|
||||||
|
|
||||||
# use the kernel CEC framework for libcec (yes / no)
|
# use the kernel CEC framework for libcec (yes / no)
|
||||||
CEC_FRAMEWORK_SUPPORT="yes"
|
CEC_FRAMEWORK_SUPPORT="yes"
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ function do_mkimage() {
|
|||||||
PROJECT="${PROJECT}" \
|
PROJECT="${PROJECT}" \
|
||||||
DEVICE="${DEVICE}" \
|
DEVICE="${DEVICE}" \
|
||||||
DISTRO="${DISTRO}" \
|
DISTRO="${DISTRO}" \
|
||||||
|
DISTRO_HOME_URL="${DISTRO_HOME_URL}" \
|
||||||
TARGET_IMG="${TARGET_IMG}" \
|
TARGET_IMG="${TARGET_IMG}" \
|
||||||
BUILD_NAME="${IMAGE_NAME}" \
|
BUILD_NAME="${IMAGE_NAME}" \
|
||||||
IMAGE_NAME="${1:-${IMAGE_NAME}}" \
|
IMAGE_NAME="${1:-${IMAGE_NAME}}" \
|
||||||
@ -64,24 +65,24 @@ else
|
|||||||
GIT_HASH=$(git rev-parse HEAD)
|
GIT_HASH=$(git rev-parse HEAD)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${LIBREELEC_VERSION}" = "devel" ]; then
|
if [ "${DISTRO_VERSION}" = "devel" ]; then
|
||||||
GIT_ABBREV=${GIT_HASH:0:7}
|
GIT_ABBREV=${GIT_HASH:0:7}
|
||||||
DEVEL_VERSION=${LIBREELEC_VERSION}
|
DEVEL_VERSION=${DISTRO_VERSION}
|
||||||
case "${BUILD_PERIODIC}" in
|
case "${BUILD_PERIODIC}" in
|
||||||
nightly)
|
nightly)
|
||||||
LIBREELEC_VERSION=nightly-$(date +%Y%m%d)-${GIT_ABBREV}
|
DISTRO_VERSION=nightly-$(date +%Y%m%d)-${GIT_ABBREV}
|
||||||
;;
|
;;
|
||||||
daily)
|
daily)
|
||||||
LIBREELEC_VERSION=daily-$(date +%Y%j)-${GIT_ABBREV}
|
DISTRO_VERSION=daily-$(date +%Y%j)-${GIT_ABBREV}
|
||||||
;;
|
;;
|
||||||
weekly)
|
weekly)
|
||||||
LIBREELEC_VERSION=weekly-$(date +%G%V)-${GIT_ABBREV}
|
DISTRO_VERSION=weekly-$(date +%G%V)-${GIT_ABBREV}
|
||||||
;;
|
;;
|
||||||
monthly)
|
monthly)
|
||||||
LIBREELEC_VERSION=monthly-$(date +%Y%m)-${GIT_ABBREV}
|
DISTRO_VERSION=monthly-$(date +%Y%m)-${GIT_ABBREV}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
LIBREELEC_VERSION=devel-$(date +%Y%m%d%H%M%S)-${GIT_ABBREV}
|
DISTRO_VERSION=devel-$(date +%Y%m%d%H%M%S)-${GIT_ABBREV}
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@ -91,27 +92,27 @@ ORIGIN_URL="$(git remote -v | awk '$1 == "origin" { print $2 }' | head -1 | sed
|
|||||||
|
|
||||||
[ "${BUILDER_NAME,,}" = "official" ] && BUILDER_NAME=
|
[ "${BUILDER_NAME,,}" = "official" ] && BUILDER_NAME=
|
||||||
if [ "${OFFICIAL}" = "yes" ]; then
|
if [ "${OFFICIAL}" = "yes" ]; then
|
||||||
LIBREELEC_BUILD="official"
|
DISTRO_BUILD="official"
|
||||||
else
|
else
|
||||||
if [ -n "${BUILDER_NAME}" ]; then
|
if [ -n "${BUILDER_NAME}" ]; then
|
||||||
LIBREELEC_BUILD="${BUILDER_NAME}"
|
DISTRO_BUILD="${BUILDER_NAME}"
|
||||||
else
|
else
|
||||||
LIBREELEC_BUILD="community"
|
DISTRO_BUILD="community"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${CUSTOM_VERSION}" ]; then
|
if [ -n "${CUSTOM_VERSION}" ]; then
|
||||||
LIBREELEC_VERSION="${CUSTOM_VERSION}"
|
DISTRO_VERSION="${CUSTOM_VERSION}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LIBREELEC_ARCH="${DEVICE:-${PROJECT}}.${TARGET_ARCH}"
|
DISTRO_ARCH="${DEVICE:-${PROJECT}}.${TARGET_ARCH}"
|
||||||
TARGET_VERSION="${LIBREELEC_ARCH}-${LIBREELEC_VERSION}"
|
TARGET_VERSION="${DISTRO_ARCH}-${DISTRO_VERSION}"
|
||||||
|
|
||||||
if [ -n "${CUSTOM_IMAGE_NAME}" ]; then
|
if [ -n "${CUSTOM_IMAGE_NAME}" ]; then
|
||||||
IMAGE_NAME="${CUSTOM_IMAGE_NAME}"
|
IMAGE_NAME="${CUSTOM_IMAGE_NAME}"
|
||||||
else
|
else
|
||||||
if [ "${DEVEL_VERSION}" = "devel" ]; then
|
if [ "${DEVEL_VERSION}" = "devel" ]; then
|
||||||
IMAGE_NAME="${DISTRONAME}-${LIBREELEC_ARCH}-${OS_VERSION}-${LIBREELEC_VERSION}"
|
IMAGE_NAME="${DISTRONAME}-${DISTRO_ARCH}-${OS_VERSION}-${DISTRO_VERSION}"
|
||||||
else
|
else
|
||||||
IMAGE_NAME="${DISTRONAME}-${TARGET_VERSION}"
|
IMAGE_NAME="${DISTRONAME}-${TARGET_VERSION}"
|
||||||
fi
|
fi
|
||||||
@ -139,7 +140,7 @@ rm -rf ${INSTALL}
|
|||||||
rm -rf ${STAMPS_INSTALL}
|
rm -rf ${STAMPS_INSTALL}
|
||||||
mkdir -p ${INSTALL}
|
mkdir -p ${INSTALL}
|
||||||
|
|
||||||
# Create base layout of LibreELEC read-only file system
|
# Create base layout of read-only file system
|
||||||
for directory in etc dev proc run sys tmp usr var flash storage; do
|
for directory in etc dev proc run sys tmp usr var flash storage; do
|
||||||
mkdir -p ${INSTALL}/${directory}
|
mkdir -p ${INSTALL}/${directory}
|
||||||
done
|
done
|
||||||
@ -166,18 +167,18 @@ echo "${TARGET_VERSION}" >${INSTALL}/etc/release
|
|||||||
# Create /etc/os-release
|
# Create /etc/os-release
|
||||||
cat <<EOF >${INSTALL}/etc/os-release
|
cat <<EOF >${INSTALL}/etc/os-release
|
||||||
NAME="${DISTRONAME}"
|
NAME="${DISTRONAME}"
|
||||||
VERSION="${LIBREELEC_VERSION}"
|
VERSION="${DISTRO_VERSION}"
|
||||||
ID="${DISTRONAME,,}"
|
ID="${DISTRONAME,,}"
|
||||||
VERSION_ID="${OS_VERSION}"
|
VERSION_ID="${OS_VERSION}"
|
||||||
PRETTY_NAME="${DISTRONAME} (${LIBREELEC_BUILD}): ${LIBREELEC_VERSION}"
|
PRETTY_NAME="${DISTRONAME} (${DISTRO_BUILD}): ${DISTRO_VERSION}"
|
||||||
HOME_URL="https://libreelec.tv"
|
HOME_URL="${DISTRO_HOME_URL}"
|
||||||
BUG_REPORT_URL="${ORIGIN_URL}"
|
BUG_REPORT_URL="${ORIGIN_URL}"
|
||||||
BUILD_ID="${GIT_HASH}"
|
BUILD_ID="${GIT_HASH}"
|
||||||
LIBREELEC_ARCH="${LIBREELEC_ARCH}"
|
DISTRO_ARCH="${DISTRO_ARCH}"
|
||||||
LIBREELEC_BUILD="${LIBREELEC_BUILD}"
|
DISTRO_BUILD="${DISTRO_BUILD}"
|
||||||
LIBREELEC_PROJECT="${PROJECT}"
|
DISTRO_PROJECT="${PROJECT}"
|
||||||
EOF
|
EOF
|
||||||
[ -n "${DEVICE}" ] && echo "LIBREELEC_DEVICE=\"${DEVICE}\"" >>${INSTALL}/etc/os-release
|
[ -n "${DEVICE}" ] && echo "DISTRO_DEVICE=\"${DEVICE}\"" >>${INSTALL}/etc/os-release
|
||||||
[ -n "${BUILDER_NAME}" ] && echo "BUILDER_NAME=\"${BUILDER_NAME}\"" >>${INSTALL}/etc/os-release
|
[ -n "${BUILDER_NAME}" ] && echo "BUILDER_NAME=\"${BUILDER_NAME}\"" >>${INSTALL}/etc/os-release
|
||||||
[ -n "${BUILDER_VERSION}" ] && echo "BUILDER_VERSION=\"${BUILDER_VERSION}\"" >>${INSTALL}/etc/os-release
|
[ -n "${BUILDER_VERSION}" ] && echo "BUILDER_VERSION=\"${BUILDER_VERSION}\"" >>${INSTALL}/etc/os-release
|
||||||
|
|
||||||
@ -188,7 +189,7 @@ ${GREETING1}
|
|||||||
${GREETING2}
|
${GREETING2}
|
||||||
${GREETING3}
|
${GREETING3}
|
||||||
${GREETING4}
|
${GREETING4}
|
||||||
${DISTRONAME} (${LIBREELEC_BUILD}): ${LIBREELEC_VERSION} (${LIBREELEC_ARCH})
|
${DISTRONAME} (${DISTRO_BUILD}): ${DISTRO_VERSION} (${DISTRO_ARCH})
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
ln -sf /etc/issue ${INSTALL}/etc/motd
|
ln -sf /etc/issue ${INSTALL}/etc/motd
|
||||||
@ -374,7 +375,7 @@ if [ "${1}" = "release" -o "${1}" = "mkimage" -o "${1}" = "noobs" ]; then
|
|||||||
|
|
||||||
RELEASE_DIR="${TARGET_IMG}/${IMAGE_NAME}-${1}"
|
RELEASE_DIR="${TARGET_IMG}/${IMAGE_NAME}-${1}"
|
||||||
|
|
||||||
# eg. LibreELEC_RPi, LibreELEC_RPi2 etc.
|
# eg. Distro_RPi, Distro_RPi2 etc.
|
||||||
NOOBS_DISTRO="${DISTRONAME}_${DEVICE:-${PROJECT}}"
|
NOOBS_DISTRO="${DISTRONAME}_${DEVICE:-${PROJECT}}"
|
||||||
|
|
||||||
# Create release dir
|
# Create release dir
|
||||||
@ -406,7 +407,7 @@ if [ "${1}" = "release" -o "${1}" = "mkimage" -o "${1}" = "noobs" ]; then
|
|||||||
|
|
||||||
sed -e "s%@DISTRONAME@%${DISTRONAME}%g" \
|
sed -e "s%@DISTRONAME@%${DISTRONAME}%g" \
|
||||||
-e "s%@PROJECT@%${DEVICE:-${PROJECT}}%g" \
|
-e "s%@PROJECT@%${DEVICE:-${PROJECT}}%g" \
|
||||||
-e "s%@LIBREELEC_VERSION@%${LIBREELEC_VERSION}%g" \
|
-e "s%@DISTRO_VERSION@%${DISTRO_VERSION}%g" \
|
||||||
-e "s%@RELEASE_DATE@%$(date +%F)%g" \
|
-e "s%@RELEASE_DATE@%$(date +%F)%g" \
|
||||||
-e "s%@KERNEL_VERSION@%$(kernel_version)%g" \
|
-e "s%@KERNEL_VERSION@%$(kernel_version)%g" \
|
||||||
-e "s%@DESCRIPTION@%${DESCRIPTION}%g" \
|
-e "s%@DESCRIPTION@%${DESCRIPTION}%g" \
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# set variables
|
# set variables
|
||||||
LE_TMP=$(mktemp -d -p ${TARGET_IMG})
|
IMG_TMP=$(mktemp -d -p ${TARGET_IMG})
|
||||||
SAVE_ERROR="${LE_TMP}/save_error"
|
SAVE_ERROR="${IMG_TMP}/save_error"
|
||||||
|
|
||||||
if [ -z "${SYSTEM_SIZE}" -o -z "${SYSTEM_PART_START}" ]; then
|
if [ -z "${SYSTEM_SIZE}" -o -z "${SYSTEM_PART_START}" ]; then
|
||||||
echo "mkimage: SYSTEM_SIZE and SYSTEM_PART_START must be configured!"
|
echo "mkimage: SYSTEM_SIZE and SYSTEM_PART_START must be configured!"
|
||||||
@ -27,7 +27,7 @@ DISK="${DISK_BASENAME}.img"
|
|||||||
# functions
|
# functions
|
||||||
cleanup() {
|
cleanup() {
|
||||||
echo -e "image: cleanup...\n"
|
echo -e "image: cleanup...\n"
|
||||||
rm -rf "${LE_TMP}"
|
rm -rf "${IMG_TMP}"
|
||||||
}
|
}
|
||||||
|
|
||||||
show_error() {
|
show_error() {
|
||||||
@ -36,7 +36,7 @@ show_error() {
|
|||||||
if [ -s "${SAVE_ERROR}" ]; then
|
if [ -s "${SAVE_ERROR}" ]; then
|
||||||
cat "${SAVE_ERROR}"
|
cat "${SAVE_ERROR}"
|
||||||
else
|
else
|
||||||
echo "Folder ${LE_TMP} might be out of free space..."
|
echo "Folder ${IMG_TMP} might be out of free space..."
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
cleanup
|
cleanup
|
||||||
@ -88,26 +88,26 @@ fi
|
|||||||
echo "image: creating sparse file for part2..."
|
echo "image: creating sparse file for part2..."
|
||||||
STORAGE_PART_COUNT=$((${STORAGE_PART_END} - ${STORAGE_PART_START} + 1))
|
STORAGE_PART_COUNT=$((${STORAGE_PART_END} - ${STORAGE_PART_START} + 1))
|
||||||
sync
|
sync
|
||||||
dd if="${DISK}" of="${LE_TMP}/part2.ext4" bs=512 count=0 seek="${STORAGE_PART_COUNT}" conv=fsync >"${SAVE_ERROR}" 2>&1 || show_error
|
dd if="${DISK}" of="${IMG_TMP}/part2.ext4" bs=512 count=0 seek="${STORAGE_PART_COUNT}" conv=fsync >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
|
|
||||||
# create filesystem on part2
|
# create filesystem on part2
|
||||||
echo "image: creating filesystem on part2..."
|
echo "image: creating filesystem on part2..."
|
||||||
mke2fs -F -q -t ext4 -O ^orphan_file -m 0 "${LE_TMP}/part2.ext4"
|
mke2fs -F -q -t ext4 -O ^orphan_file -m 0 "${IMG_TMP}/part2.ext4"
|
||||||
tune2fs -L "${DISTRO_DISKLABEL}" -U ${UUID_STORAGE} "${LE_TMP}/part2.ext4" >"${SAVE_ERROR}" 2>&1 || show_error
|
tune2fs -L "${DISTRO_DISKLABEL}" -U ${UUID_STORAGE} "${IMG_TMP}/part2.ext4" >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
e2fsck -n "${LE_TMP}/part2.ext4" >"${SAVE_ERROR}" 2>&1 || show_error
|
e2fsck -n "${IMG_TMP}/part2.ext4" >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
sync
|
sync
|
||||||
|
|
||||||
# add resize mark
|
# add resize mark
|
||||||
mkdir "${LE_TMP}/part2.fs"
|
mkdir "${IMG_TMP}/part2.fs"
|
||||||
touch "${LE_TMP}/part2.fs/.please_resize_me"
|
touch "${IMG_TMP}/part2.fs/.please_resize_me"
|
||||||
echo "image: populating filesystem on part2..."
|
echo "image: populating filesystem on part2..."
|
||||||
populatefs -U -d "${LE_TMP}/part2.fs" "${LE_TMP}/part2.ext4" >"${SAVE_ERROR}" 2>&1 || show_error
|
populatefs -U -d "${IMG_TMP}/part2.fs" "${IMG_TMP}/part2.ext4" >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
sync
|
sync
|
||||||
e2fsck -n "${LE_TMP}/part2.ext4" >"${SAVE_ERROR}" 2>&1 || show_error
|
e2fsck -n "${IMG_TMP}/part2.ext4" >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
|
|
||||||
# merge part2 into disk image
|
# merge part2 into disk image
|
||||||
echo "image: merging part2 into disk image..."
|
echo "image: merging part2 into disk image..."
|
||||||
dd if="${LE_TMP}/part2.ext4" of="${DISK}" bs=512 seek="${STORAGE_PART_START}" conv=fsync,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
dd if="${IMG_TMP}/part2.ext4" of="${DISK}" bs=512 seek="${STORAGE_PART_START}" conv=fsync,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
|
|
||||||
# create disk image for virtual appliance
|
# create disk image for virtual appliance
|
||||||
if [ "${PROJECT}" = "Generic" ]; then
|
if [ "${PROJECT}" = "Generic" ]; then
|
||||||
@ -120,24 +120,24 @@ fi
|
|||||||
echo "image: creating sparse file for part1..."
|
echo "image: creating sparse file for part1..."
|
||||||
SYSTEM_PART_COUNT=$((${SYSTEM_PART_END} - ${SYSTEM_PART_START} + 1))
|
SYSTEM_PART_COUNT=$((${SYSTEM_PART_END} - ${SYSTEM_PART_START} + 1))
|
||||||
sync
|
sync
|
||||||
dd if=/dev/zero of="${LE_TMP}/part1.fat" bs=512 count=0 seek="${SYSTEM_PART_COUNT}" conv=fsync >"${SAVE_ERROR}" 2>&1 || show_error
|
dd if=/dev/zero of="${IMG_TMP}/part1.fat" bs=512 count=0 seek="${SYSTEM_PART_COUNT}" conv=fsync >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
|
|
||||||
shopt -s expand_aliases # enables alias expansion in script
|
shopt -s expand_aliases # enables alias expansion in script
|
||||||
alias mcopy='mcopy -i "${LE_TMP}/part1.fat" -o'
|
alias mcopy='mcopy -i "${IMG_TMP}/part1.fat" -o'
|
||||||
alias mmd='mmd -i "${LE_TMP}/part1.fat"'
|
alias mmd='mmd -i "${IMG_TMP}/part1.fat"'
|
||||||
|
|
||||||
# create filesystem on part1
|
# create filesystem on part1
|
||||||
echo "image: creating filesystem on part1..."
|
echo "image: creating filesystem on part1..."
|
||||||
|
|
||||||
if [ "${BOOTLOADER}" = "syslinux" -o "${BOOTLOADER}" = "bcm2835-bootloader" -o "${BOOTLOADER}" = "u-boot" ]; then
|
if [ "${BOOTLOADER}" = "syslinux" -o "${BOOTLOADER}" = "bcm2835-bootloader" -o "${BOOTLOADER}" = "u-boot" ]; then
|
||||||
mformat -i "${LE_TMP}/part1.fat" -v "${DISTRO_BOOTLABEL}" -N "${UUID_SYSTEM//-/}" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
mformat -i "${IMG_TMP}/part1.fat" -v "${DISTRO_BOOTLABEL}" -N "${UUID_SYSTEM//-/}" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
fi
|
fi
|
||||||
sync
|
sync
|
||||||
|
|
||||||
if [ "${BOOTLOADER}" = "syslinux" ]; then
|
if [ "${BOOTLOADER}" = "syslinux" ]; then
|
||||||
# create bootloader configuration
|
# create bootloader configuration
|
||||||
echo "image: creating bootloader configuration..."
|
echo "image: creating bootloader configuration..."
|
||||||
cat <<EOF >"${LE_TMP}/syslinux.cfg"
|
cat <<EOF >"${IMG_TMP}/syslinux.cfg"
|
||||||
SAY Wait for installer mode to start automatically in 5 seconds...
|
SAY Wait for installer mode to start automatically in 5 seconds...
|
||||||
SAY
|
SAY
|
||||||
SAY Options
|
SAY Options
|
||||||
@ -163,7 +163,7 @@ LABEL run
|
|||||||
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} portable quiet
|
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} portable quiet
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >"${LE_TMP}/grub.cfg"
|
cat <<EOF >"${IMG_TMP}/grub.cfg"
|
||||||
set timeout="25"
|
set timeout="25"
|
||||||
set default="Installer"
|
set default="Installer"
|
||||||
menuentry "Installer" {
|
menuentry "Installer" {
|
||||||
@ -180,11 +180,11 @@ menuentry "Run" {
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mcopy "${LE_TMP}/syslinux.cfg" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
mcopy "${IMG_TMP}/syslinux.cfg" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
|
|
||||||
# install syslinux
|
# install syslinux
|
||||||
echo "image: installing syslinux to part1..."
|
echo "image: installing syslinux to part1..."
|
||||||
syslinux.mtools -i "${LE_TMP}/part1.fat" >"${SAVE_ERROR}" 2>&1 || show_error
|
syslinux.mtools -i "${IMG_TMP}/part1.fat" >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
|
|
||||||
# copy files
|
# copy files
|
||||||
echo "image: copying files to part1..."
|
echo "image: copying files to part1..."
|
||||||
@ -197,16 +197,16 @@ EOF
|
|||||||
mcopy "${TOOLCHAIN}/share/syslinux/bootx64.efi" ::/EFI/BOOT >"${SAVE_ERROR}" 2>&1 || show_error
|
mcopy "${TOOLCHAIN}/share/syslinux/bootx64.efi" ::/EFI/BOOT >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
mcopy "${TOOLCHAIN}/share/syslinux/ldlinux.e64" ::/EFI/BOOT >"${SAVE_ERROR}" 2>&1 || show_error
|
mcopy "${TOOLCHAIN}/share/syslinux/ldlinux.e64" ::/EFI/BOOT >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
mcopy "${TOOLCHAIN}/share/grub/bootia32.efi" ::/EFI/BOOT >"${SAVE_ERROR}" 2>&1 || show_error
|
mcopy "${TOOLCHAIN}/share/grub/bootia32.efi" ::/EFI/BOOT >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
mcopy "${LE_TMP}/grub.cfg" ::/EFI/BOOT >"${SAVE_ERROR}" 2>&1 || show_error
|
mcopy "${IMG_TMP}/grub.cfg" ::/EFI/BOOT >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
|
|
||||||
elif [ "${BOOTLOADER}" = "bcm2835-bootloader" ]; then
|
elif [ "${BOOTLOADER}" = "bcm2835-bootloader" ]; then
|
||||||
# create bootloader configuration
|
# create bootloader configuration
|
||||||
echo "image: creating bootloader configuration..."
|
echo "image: creating bootloader configuration..."
|
||||||
cat <<EOF >"${LE_TMP}/cmdline.txt"
|
cat <<EOF >"${IMG_TMP}/cmdline.txt"
|
||||||
boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mcopy "${LE_TMP}/cmdline.txt" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
mcopy "${IMG_TMP}/cmdline.txt" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
|
|
||||||
# copy files
|
# copy files
|
||||||
echo "image: copying files to part1..."
|
echo "image: copying files to part1..."
|
||||||
@ -253,16 +253,16 @@ elif [ "${BOOTLOADER}" = "u-boot" -a -n "${UBOOT_SYSTEM}" ]; then
|
|||||||
mcopy -s "${RELEASE_DIR}/3rdparty/bootloader/overlays" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
mcopy -s "${RELEASE_DIR}/3rdparty/bootloader/overlays" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${LE_TMP}/extlinux"
|
mkdir -p "${IMG_TMP}/extlinux"
|
||||||
|
|
||||||
cat <<EOF >"${LE_TMP}/extlinux/extlinux.conf"
|
cat <<EOF >"${IMG_TMP}/extlinux/extlinux.conf"
|
||||||
LABEL ${DISTRO}
|
LABEL ${DISTRO}
|
||||||
LINUX /${KERNEL_NAME}
|
LINUX /${KERNEL_NAME}
|
||||||
FDT /${DTB}
|
FDT /${DTB}
|
||||||
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mcopy -s "${LE_TMP}/extlinux" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
mcopy -s "${IMG_TMP}/extlinux" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader/mkimage" ]; then
|
if [ -f "${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader/mkimage" ]; then
|
||||||
@ -288,32 +288,34 @@ fi # bootloader
|
|||||||
# run fsck
|
# run fsck
|
||||||
echo "image: checking filesystem on part1..."
|
echo "image: checking filesystem on part1..."
|
||||||
sync
|
sync
|
||||||
fsck.fat -n "${LE_TMP}/part1.fat" >"${SAVE_ERROR}" 2>&1 || show_error
|
fsck.fat -n "${IMG_TMP}/part1.fat" >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
|
|
||||||
# merge part1 into disk image
|
# merge part1 into disk image
|
||||||
echo "image: merging part1 into disk image..."
|
echo "image: merging part1 into disk image..."
|
||||||
dd if="${LE_TMP}/part1.fat" of="${DISK}" bs=512 seek="${SYSTEM_PART_START}" conv=fsync,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
dd if="${IMG_TMP}/part1.fat" of="${DISK}" bs=512 seek="${SYSTEM_PART_START}" conv=fsync,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
|
|
||||||
# finalize virtual appliance
|
# finalize virtual appliance
|
||||||
if [ "${PROJECT}" = "Generic" ]; then
|
if [ "${PROJECT}" = "Generic" ]; then
|
||||||
# change syslinux default to 'run'
|
# change syslinux default to 'run'
|
||||||
echo "image: modifying files on part1 for open virtual appliance..."
|
echo "image: modifying files on part1 for open virtual appliance..."
|
||||||
sed -e "/DEFAULT/ s/installer/run/" -i "${LE_TMP}/syslinux.cfg"
|
sed -e "/DEFAULT/ s/installer/run/" -i "${IMG_TMP}/syslinux.cfg"
|
||||||
sed -e "/set default=/s/\"Installer\"/\"Run\"/" -i "${LE_TMP}/grub.cfg"
|
sed -e "/set default=/s/\"Installer\"/\"Run\"/" -i "${IMG_TMP}/grub.cfg"
|
||||||
mcopy "${LE_TMP}/syslinux.cfg" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
mcopy "${IMG_TMP}/syslinux.cfg" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
mcopy "${LE_TMP}/grub.cfg" ::/EFI/BOOT >"${SAVE_ERROR}" 2>&1 || show_error
|
mcopy "${IMG_TMP}/grub.cfg" ::/EFI/BOOT >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
sync
|
sync
|
||||||
# run fsck
|
# run fsck
|
||||||
echo "image: checking filesystem on part1..."
|
echo "image: checking filesystem on part1..."
|
||||||
fsck.fat -n "${LE_TMP}/part1.fat" >"${SAVE_ERROR}" 2>&1 || show_error
|
fsck.fat -n "${IMG_TMP}/part1.fat" >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
# merge modified part1 into tmp disk image
|
# merge modified part1 into tmp disk image
|
||||||
echo "image: merging part1 into open virtual appliance..."
|
echo "image: merging part1 into open virtual appliance..."
|
||||||
dd if="${LE_TMP}/part1.fat" of="${DISK_BASENAME}.tmp" bs=512 seek="${SYSTEM_PART_START}" conv=fsync,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
dd if="${IMG_TMP}/part1.fat" of="${DISK_BASENAME}.tmp" bs=512 seek="${SYSTEM_PART_START}" conv=fsync,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
||||||
# create vmdk from tmp ${DISK}
|
# create vmdk from tmp ${DISK}
|
||||||
echo "image: creating vmdk for open virtual appliance..."
|
echo "image: creating vmdk for open virtual appliance..."
|
||||||
qemu-img convert -O vmdk -o subformat=streamOptimized "${DISK_BASENAME}.tmp" "${DISK_BASENAME}.vmdk"
|
qemu-img convert -O vmdk -o subformat=streamOptimized "${DISK_BASENAME}.tmp" "${DISK_BASENAME}.vmdk"
|
||||||
# generate ovf from template
|
# generate ovf from template
|
||||||
sed -e "s,@DISTRO@,${DISTRO},g" -e "s,@DISK@,${IMAGE_NAME},g" \
|
sed -e "s,@DISTRO@,${DISTRO},g" \
|
||||||
|
-e "s,@DISTRO_HOME_URL@,${DISTRO_HOME_URL},g" \
|
||||||
|
-e "s,@DISK@,${IMAGE_NAME},g" \
|
||||||
-e "s,@OVA_SIZE@,$((${OVA_SIZE} * 1024 * 1024)),g" \
|
-e "s,@OVA_SIZE@,$((${OVA_SIZE} * 1024 * 1024)),g" \
|
||||||
"${PROJECT_DIR}/${PROJECT}/config/ovf.template" >"${DISK_BASENAME}.ovf"
|
"${PROJECT_DIR}/${PROJECT}/config/ovf.template" >"${DISK_BASENAME}.ovf"
|
||||||
# combine ovf and vmdk into official ova
|
# combine ovf and vmdk into official ova
|
||||||
|
@ -9,7 +9,7 @@ export NOONEXIT=yes
|
|||||||
|
|
||||||
[ -z "${DEBUG_LOG}" ] && DEBUG_LOG=/tmp/distro-tool.log
|
[ -z "${DEBUG_LOG}" ] && DEBUG_LOG=/tmp/distro-tool.log
|
||||||
|
|
||||||
LIBREELEC_DIR=$HOME/LibreELEC.tv
|
DISTRO_DIR=$HOME/LibreELEC.tv
|
||||||
TARGET_DIR=$HOME/sources
|
TARGET_DIR=$HOME/sources
|
||||||
DOWNLOAD_DIR=$HOME/download
|
DOWNLOAD_DIR=$HOME/download
|
||||||
REVISION=
|
REVISION=
|
||||||
@ -737,15 +737,15 @@ Options:
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
get_libreelec_branch() {
|
get_distro_branch() {
|
||||||
cd $LIBREELEC_DIR
|
cd $DISTRO_DIR
|
||||||
git rev-parse --abbrev-ref HEAD
|
git rev-parse --abbrev-ref HEAD
|
||||||
}
|
}
|
||||||
|
|
||||||
# 1: LibreELEC variable, eg. LIBREELEC_VERSION
|
# 1: LibreELEC variable, eg. DISTRO_VERSION
|
||||||
get_libreelec_option() {
|
get_distro_option() {
|
||||||
local variable="$1"
|
local variable="$1"
|
||||||
cd $LIBREELEC_DIR
|
cd $DISTRO_DIR
|
||||||
source config/options ""
|
source config/options ""
|
||||||
echo "${!variable}"
|
echo "${!variable}"
|
||||||
}
|
}
|
||||||
@ -827,7 +827,7 @@ generate_work_worker() {
|
|||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
cd $LIBREELEC_DIR
|
cd $DISTRO_DIR
|
||||||
|
|
||||||
source config/options ""
|
source config/options ""
|
||||||
|
|
||||||
@ -845,8 +845,8 @@ generate_work_worker() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PKG_IS_ADDON=No
|
PKG_IS_ADDON=No
|
||||||
[[ ${PKG_DIR/${LIBREELEC_DIR}/} =~ ^/packages/addons/.* ]] && PKG_IS_ADDON=Yes
|
[[ ${PKG_DIR/${DISTRO_DIR}/} =~ ^/packages/addons/.* ]] && PKG_IS_ADDON=Yes
|
||||||
[[ ${PKG_DIR/${LIBREELEC_DIR}/} =~ ^/packages/mediacenter/kodi-binary-addons/.* ]] && PKG_IS_ADDON=Yes
|
[[ ${PKG_DIR/${DISTRO_DIR}/} =~ ^/packages/mediacenter/kodi-binary-addons/.* ]] && PKG_IS_ADDON=Yes
|
||||||
|
|
||||||
echo " {" >>${workfile_o}
|
echo " {" >>${workfile_o}
|
||||||
for var in ${wanted_vars}; do
|
for var in ${wanted_vars}; do
|
||||||
@ -883,7 +883,7 @@ get_packages() {
|
|||||||
local anchor="@?+?@"
|
local anchor="@?+?@"
|
||||||
|
|
||||||
(
|
(
|
||||||
cd $LIBREELEC_DIR
|
cd $DISTRO_DIR
|
||||||
|
|
||||||
# Generate package caches...
|
# Generate package caches...
|
||||||
source config/options ""
|
source config/options ""
|
||||||
@ -945,7 +945,7 @@ while [ : ]; do
|
|||||||
;;
|
;;
|
||||||
-l | --libreelec)
|
-l | --libreelec)
|
||||||
shift
|
shift
|
||||||
LIBREELEC_DIR=$1
|
DISTRO_DIR=$1
|
||||||
;;
|
;;
|
||||||
-t | --target)
|
-t | --target)
|
||||||
shift
|
shift
|
||||||
@ -1031,33 +1031,33 @@ done
|
|||||||
|
|
||||||
if [ ${DOGIT} = yes ]; then
|
if [ ${DOGIT} = yes ]; then
|
||||||
(
|
(
|
||||||
if [ -d ${LIBREELEC_DIR}/.git ]; then
|
if [ -d ${DISTRO_DIR}/.git ]; then
|
||||||
cd ${LIBREELEC_DIR}
|
cd ${DISTRO_DIR}
|
||||||
git pull
|
git pull
|
||||||
else
|
else
|
||||||
mkdir -p $(dirname "${LIBREELEC_DIR}") 2>/dev/null
|
mkdir -p $(dirname "${DISTRO_DIR}") 2>/dev/null
|
||||||
cd $(dirname "${LIBREELEC_DIR}")
|
cd $(dirname "${DISTRO_DIR}")
|
||||||
git clone https://github.com/LibreELEC/LibreELEC.tv.git $(basename "${LIBREELEC_DIR}")
|
git clone https://github.com/LibreELEC/LibreELEC.tv.git $(basename "${DISTRO_DIR}")
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check_exists LIBREELEC_DIR || exit
|
check_exists DISTRO_DIR || exit
|
||||||
LIBREELEC_DIR="$(get_abs_path "${LIBREELEC_DIR}")"
|
DISTRO_DIR="$(get_abs_path "${DISTRO_DIR}")"
|
||||||
|
|
||||||
DISTRO_SOURCE="$(get_libreelec_option DISTRO_SRC)"
|
DISTRO_SOURCE="$(get_distro_option DISTRO_SRC)"
|
||||||
DISTRO_MIRROR="$(get_libreelec_option DISTRO_MIRROR)"
|
DISTRO_MIRROR="$(get_distro_option DISTRO_MIRROR)"
|
||||||
LIBREELEC_VER="$(get_libreelec_option LIBREELEC_VERSION)"
|
DISTRO_VER="$(get_distro_option DISTRO_VERSION)"
|
||||||
|
|
||||||
if [ ${IS_MIRROR} = no ]; then
|
if [ ${IS_MIRROR} = no ]; then
|
||||||
TARGET_DIR="$(get_abs_path "${TARGET_DIR}/${LIBREELEC_VER}")"
|
TARGET_DIR="$(get_abs_path "${TARGET_DIR}/${DISTRO_VER}")"
|
||||||
else
|
else
|
||||||
TARGET_DIR="$(get_abs_path "${TARGET_DIR}/mirror")"
|
TARGET_DIR="$(get_abs_path "${TARGET_DIR}/mirror")"
|
||||||
fi
|
fi
|
||||||
check_exists TARGET_DIR || exit
|
check_exists TARGET_DIR || exit
|
||||||
|
|
||||||
if [ ${IS_MIRROR} = no ]; then
|
if [ ${IS_MIRROR} = no ]; then
|
||||||
DOWNLOAD_DIR="$(get_abs_path "${DOWNLOAD_DIR}/${LIBREELEC_VER}")"
|
DOWNLOAD_DIR="$(get_abs_path "${DOWNLOAD_DIR}/${DISTRO_VER}")"
|
||||||
else
|
else
|
||||||
DOWNLOAD_DIR="$(get_abs_path "${DOWNLOAD_DIR}/mirror")"
|
DOWNLOAD_DIR="$(get_abs_path "${DOWNLOAD_DIR}/mirror")"
|
||||||
fi
|
fi
|
||||||
@ -1070,9 +1070,9 @@ fi
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
if [ ${IS_MIRROR} = yes ]; then
|
if [ ${IS_MIRROR} = yes ]; then
|
||||||
echo "Synchronising LibreELEC.tv (branch: $(get_libreelec_branch), version: ${LIBREELEC_VER}) with MIRROR server ${TARGET_DIR}"
|
echo "Synchronising (branch: $(get_distro_branch), version: ${DISTRO_VER}) with MIRROR server ${TARGET_DIR}"
|
||||||
else
|
else
|
||||||
echo "Synchronising LibreELEC.tv (branch: $(get_libreelec_branch), version: ${LIBREELEC_VER}) with SOURCE server ${TARGET_DIR}"
|
echo "Synchronising (branch: $(get_distro_branch), version: ${DISTRO_VER}) with SOURCE server ${TARGET_DIR}"
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
echo "Distro Source is: ${DISTRO_SOURCE}"
|
echo "Distro Source is: ${DISTRO_SOURCE}"
|
||||||
|