mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
busybox: add create-edid-cpio script
This script simply creates /flash/edid.cpio with the contents from .config/firmware/edid Compared to the x86 specific getedid script this works on all platforms as it doesn't contain any platform specific code. Eventually getedid should be refactored make use of this helper script, too. Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
@@ -123,6 +123,7 @@ makeinstall_host() {
|
||||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
[ ${TARGET_ARCH} = x86_64 ] && cp ${PKG_DIR}/scripts/getedid ${INSTALL}/usr/bin
|
||||
cp ${PKG_DIR}/scripts/create-edid-cpio ${INSTALL}/usr/bin/
|
||||
cp ${PKG_DIR}/scripts/createlog ${INSTALL}/usr/bin/
|
||||
cp ${PKG_DIR}/scripts/dthelper ${INSTALL}/usr/bin
|
||||
ln -sf dthelper ${INSTALL}/usr/bin/dtfile
|
||||
|
||||
36
packages/sysutils/busybox/scripts/create-edid-cpio
Executable file
36
packages/sysutils/busybox/scripts/create-edid-cpio
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
EDID_DIR="/storage/.config/firmware/edid"
|
||||
EDID_CPIO="/flash/edid.cpio"
|
||||
TMPDIR="/tmp/edid-cpio"
|
||||
|
||||
if [ "$1" = "-q" ]; then
|
||||
VERBOSE=0
|
||||
else
|
||||
VERBOSE=1
|
||||
fi
|
||||
|
||||
if [ ! -d "${EDID_DIR}" ]; then
|
||||
echo "error: ${EDID_DIR} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf "${TMPDIR}"
|
||||
mkdir -p "${TMPDIR}/usr/lib/firmware"
|
||||
cp -r "${EDID_DIR}" "${TMPDIR}/usr/lib/firmware"
|
||||
cd "${TMPDIR}"
|
||||
mount -o remount,rw /flash
|
||||
find usr -print | cpio -ov -H newc > "${EDID_CPIO}"
|
||||
sync
|
||||
mount -o remount,ro /flash
|
||||
cd /storage
|
||||
rm -rf "${TMPDIR}"
|
||||
|
||||
if [ "${VERBOSE}" = "1" ]; then
|
||||
echo "successfully created ${EDID_CPIO}"
|
||||
fi
|
||||
Reference in New Issue
Block a user