Lakka-LibreELEC/pkg_all.sh
Tomáš Kelemen 198dd04be7
RPi-Composite: initial commit (#2037)
this brings images suited to work OOB for RPi3/4/5 with CRT TV sets. it
comes with preconfigured shaders, core options, readable font, ...
see https://www.lakka.tv/articles/2024/05/02/rpi-composite/

- add new RPiX-Composite devices under RPi project
- RPi3/4-Composite use own kernel config
- RPi5-Composite uses kernel config of RPi5
- remove linux.arm.conf broken symlinks from some devices
- move VULKAN enable to device options
- add splash screens for 480/576 height
- glibc: match kernel version for RPi3/4 (using 5.10.y with "fake" 240p
  patch)
- adjust DEVICE conditions to only match first 4 characters / first 4
  characters + wildcard (various places)
- add specific assets, configs, shaders in retroarch package
- retroarch: adjust default configuration
- linux: add 5.10.y kernel (used by RPi3/4-Composite, see above)
- linux: add patches for 5.10.y kernel
- mkimage: add additional information into cmdline.txt and
  retroarch-overrides.txt
- firstboot.sh: add output (logged in fs-resize.log)
- firstboot.sh: prepend processed overrides with hash
- firstboot.sh: copy core configurations to storage partition
- firstboot.sh: rework wifi autoconfig script
- retroarch: add full default config file and apply changes in the
  package file directly to the config for individual systems (solves
  some issues with core/game overrides when there is no value in the
  config and user creates overrides in first run of retroarch, then
  these overrides are also stored in default config)
2025-03-07 01:09:47 +01:00

150 lines
3.6 KiB
Bash
Executable file

#!/bin/bash
usage() {
echo ""
echo "${0} <build|clean|unpack> <package>"
echo ""
echo "Builds/cleans a package for all projects/devices/systems of Lakka"
echo ""
}
[ ${#} -lt 2 -o ${#} -gt 2 ] && { usage ; echo -e "Error: no or incorrect number of parameters!\n" ; exit 127 ; }
case ${1} in
clean)
action=${1}
script="scripts/clean"
activity="Cleaning"
;;
build)
action=${1}
script="scripts/build"
activity="Compilation"
;;
unpack)
action=${1}
script="scripts/unpack"
activity="Unpacking"
;;
*)
usage
echo -e "Error: action '${1}' not valid!\n"
exit 128
;;
esac
# existing targets in format PROJECT|DEVICE|ARCH
targets="\
Allwinner|A64|aarch64| \
Allwinner|H2-plus|arm| \
Allwinner|H3|arm| \
Allwinner|H5|aarch64| \
Allwinner|H616|aarch64| \
Allwinner|H6|aarch64| \
Allwinner|R40|arm| \
Amlogic|AMLGX|aarch64| \
Ayn|Odin|aarch64| \
Generic|Generic|i386| \
Generic|Generic|x86_64| \
Generic|wayland|x86_64| \
Generic|x11|x86_64| \
L4T|Switch|aarch64| \
NXP|iMX6|arm| \
NXP|iMX8|aarch64| \
RPi|RPi|arm| \
RPi|RPi2|arm| \
RPi|RPi3|aarch64| \
RPi|RPi3-Composite|aarch64| \
RPi|RPi4|aarch64| \
RPi|RPi4-Composite|aarch64| \
RPi|RPi4-GPiCase2|aarch64| \
RPi|RPi4-PiBoyDmg|aarch64| \
RPi|RPi4-RetroDreamer|aarch64| \
RPi|RPi5|aarch64| \
RPi|RPi5-Composite|aarch64| \
RPi|RPiZero-GPiCase|arm| \
RPi|RPiZero2-GPiCase|arm| \
RPi|RPiZero2-GPiCase2W|aarch64| \
Rockchip|RK3288|arm| \
Rockchip|RK3328|aarch64| \
Rockchip|RK3399|aarch64| \
Samsung|Exynos|arm| \
"
package=${2}
declare -i failed=0
declare -i succeeded=0
failed_targets=""
succeeded_targets=""
skipped_targets=""
for T in ${targets} ; do
IFS='|' read -r -a build <<< ${T}
project=${build[0]}
device=${build[1]}
arch=${build[2]}
target_name=${device:-${project}}.${arch}
[ -z "${DISTRO}" ] && distro="Lakka" || distro="${DISTRO}"
echo "Processing package '${package}' for '${target_name}':"
export DISTRO=${distro}
export PROJECT=${project}
export DEVICE=${device}
export ARCH=${arch}
opt_file="distributions/${distro}/options"
ver_file="distributions/${distro}/version"
[ -f ${opt_file} ] && source ${opt_file} || { echo "${ver_file}: not found!" ; exit 129 ; }
[ -f ${ver_file} ] && source ${ver_file} || { echo "${ver_file}: not found!" ; exit 130 ; }
BUILD=build.${DISTRO}-${DEVICE:-$PROJECT}.${ARCH}-${LIBREELEC_VERSION}
if [ "${LIBREELEC_VERSION}" = "devel" ] ; then
BUILD=build.${DISTRO}-${DEVICE:-$PROJECT}.${ARCH}-${OS_VERSION}-${LIBREELEC_VERSION}
fi
if [ "${BUILD_NO_VERSION}" = "yes" ]; then
BUILD=build.${DISTRO}-${DEVICE:-$PROJECT}.${ARCH}
fi
if [ -n "${BUILD_SUFFIX}" ]; then
BUILD=${BUILD}-${BUILD_SUFFIX}
fi
build_folder=${BUILD}
if [ ! -d "${build_folder}" ] ; then
skipped_targets+="${target_name}\n"
echo -e "No build folder - skipping.\n"
continue
fi
${script} ${package}
if [ ${?} -gt 0 ] ; then
failed+=1
failed_targets+="${target_name}\n"
echo -e "${activity} of package '${package}' failed for '${target_name}'.\n"
else
succeeded+=1
succeeded_targets+="${target_name}\n"
echo -e "${activity} of package '${package}' succeeded for '${target_name}'.\n"
fi
done
if [ -n "${skipped_targets}" ] ; then
echo -e "Following targets were skipped - could not find existing build folder:\n${skipped_targets}\n"
fi
if [ ${failed} -gt 0 ] ; then
echo -e "Failed to ${action} package '${package}' on following ${failed} target(s):\n${failed_targets}\n" >&2
fi
if [ ${succeeded} -gt 0 ] ; then
echo -e "Successful ${action} of package '${package}' on following ${succeeded} target(s):\n${succeeded_targets}\n" >&2
fi
echo "Done."
exit ${failed}