mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
Rockchip: bootloader: add support for fdtdir
This commit is contained in:
committed by
Christian Hewitt
parent
269a3b511e
commit
8f61262ff6
@@ -1,6 +1,22 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
if [ -z "${DTB}" ]; then
|
||||
echo "image: copying device tree blobs..."
|
||||
mmd rockchip >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
mcopy "${RELEASE_DIR}/3rdparty/bootloader/"*.dtb ::/rockchip >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
|
||||
echo "image: copying extlinux.conf..."
|
||||
mkdir -p "${IMG_TMP}/extlinux"
|
||||
cat <<EOF >"${IMG_TMP}/extlinux/extlinux.conf"
|
||||
LABEL ${DISTRO}
|
||||
LINUX /${KERNEL_NAME}
|
||||
FDTDIR /
|
||||
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
||||
EOF
|
||||
mcopy -s "${IMG_TMP}/extlinux" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
fi
|
||||
|
||||
if [ -n "${UBOOT_SYSTEM}" ]; then
|
||||
BOOTLOADER_PATH="${RELEASE_DIR}/3rdparty/bootloader/u-boot-rockchip.bin"
|
||||
if [ -f "${BOOTLOADER_PATH}" ]; then
|
||||
|
||||
@@ -20,6 +20,7 @@ fi
|
||||
|
||||
# update device tree
|
||||
for all_dtb in ${BOOT_ROOT}/*.dtb; do
|
||||
[ -f "$all_dtb" ] || continue
|
||||
dtb=$(basename ${all_dtb})
|
||||
|
||||
# device tree mappings for update from vendor to mainline kernel
|
||||
@@ -56,6 +57,19 @@ fi
|
||||
fi
|
||||
done
|
||||
|
||||
# update /rockchip device tree blobs
|
||||
if [ -d ${BOOT_ROOT}/rockchip ]; then
|
||||
echo -n "Updating Device Tree Blobs... "
|
||||
for all_dtb in ${BOOT_ROOT}/rockchip/*.dtb; do
|
||||
[ -f "$all_dtb" ] || continue
|
||||
dtb=$(basename ${all_dtb})
|
||||
if [ -f ${SYSTEM_ROOT}/usr/share/bootloader/${dtb} ]; then
|
||||
cp -p ${SYSTEM_ROOT}/usr/share/bootloader/${dtb} ${BOOT_ROOT}/rockchip
|
||||
fi
|
||||
done
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
# update bootloader
|
||||
if [ -f ${SYSTEM_ROOT}/usr/share/bootloader/u-boot-rockchip.bin ]; then
|
||||
echo -n "Updating U-Boot... "
|
||||
|
||||
Reference in New Issue
Block a user