2023-03-22 21:56:33 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
|
|
|
|
|
|
|
|
mkdir -p ${RELEASE_DIR}/3rdparty/bootloader
|
|
|
|
if [ -n "${UBOOT_CONFIG}" ]; then
|
|
|
|
BOOTLOADER_DIR=$(get_build_dir ${BOOTLOADER})
|
|
|
|
KERNEL_DIR=$(get_build_dir linux)
|
|
|
|
|
2023-03-29 19:20:51 +00:00
|
|
|
case "${PKG_SOC}" in
|
|
|
|
s922x)
|
|
|
|
if [ -f ${INSTALL}/usr/share/bootloader/u-boot.bin ]; then
|
|
|
|
cp -a ${INSTALL}/usr/share/bootloader/u-boot.bin ${RELEASE_DIR}/3rdparty/bootloader
|
|
|
|
fi
|
2023-04-11 19:48:04 +00:00
|
|
|
if [ -f ${INSTALL}/usr/share/bootloader/ODROIDBIOS.BIN ]; then
|
|
|
|
cp -a ${INSTALL}/usr/share/bootloader/ODROIDBIOS.BIN ${RELEASE_DIR}/3rdparty/bootloader
|
|
|
|
fi
|
2023-04-22 14:23:31 +00:00
|
|
|
if [ -d ${INSTALL}/usr/share/bootloader/res ]; then
|
|
|
|
cp -ra ${INSTALL}/usr/share/bootloader/res ${RELEASE_DIR}/3rdparty/bootloader
|
|
|
|
fi
|
2023-03-29 19:20:51 +00:00
|
|
|
;;
|
|
|
|
esac
|
2023-03-22 21:56:33 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
LINUX_DTS_DIR=$(get_build_dir linux)/arch/${TARGET_KERNEL_ARCH}/boot/dts/
|
|
|
|
for dtb in $(find ${LINUX_DTS_DIR} -name "*.dtb") ; do
|
|
|
|
if [ -f $dtb ]; then
|
|
|
|
cp -a $dtb ${RELEASE_DIR}/3rdparty/bootloader
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -n "${SD_DTB}" ]; then
|
|
|
|
SD_UBOOT_DTB=$(get_build_dir u-boot)/arch/arm/dts/${SD_DTB}.dtb
|
|
|
|
if [ -f $SD_UBOOT_DTB ]; then
|
|
|
|
cp -a $SD_UBOOT_DTB ${RELEASE_DIR}/3rdparty/bootloader
|
|
|
|
fi
|
|
|
|
fi
|