# SPDX-License-Identifier: GPL-2.0 # Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech) PKG_UBOOT="$(get_build_dir u-boot)" source ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options FIP_DIR="${ROOT}/build.${DISTRO}-${DEVICE}.aarch64/amlogic-boot-fip-*" case "${DEVICE}" in S922X) cp -rf ${PKG_DIR}/bin/${DEVICE}/u-boot.bin ${INSTALL}/usr/share/bootloader/ ;; *) echo "uboot: encrypting u-boot.bin with fip..." cp -av u-boot.bin ${FIP_DIR}/ cd ${FIP_DIR} ./build-fip.sh ${BOOT_FIP} u-boot.bin ${INSTALL}/usr/share/bootloader/ ;; esac if [ "${BIOS_BIN}" == true ] then echo "uboot: copy bios bin to ${INSTALL}/usr/share/bootloader..." cp -av ${PKG_BUILD}/tools/odroid_resource/ODROIDBIOS.BIN ${INSTALL}/usr/share/bootloader fi if [ "${BOOT_INI}" == true ] then echo "boot: create boot.ini..." cat >${INSTALL}/usr/share/bootloader/boot.ini < "${INSTALL}/usr/share/bootloader/extlinux/extlinux.conf" LABEL ${DISTRO} LINUX /${KERNEL_NAME} ${FDTMODE} APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ ${EXTRA_CMDLINE} EOF fi