# SPDX-License-Identifier: GPL-2.0 # Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech) source ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options #Write u-boot.bin to image case "${PKG_SOC}" in s922x) if [ -f "${RELEASE_DIR}/3rdparty/bootloader/u-boot.bin" ]; then echo "image: burn uboot.bin to image... (${PKG_SOC})" dd if="${RELEASE_DIR}/3rdparty/bootloader/u-boot.bin" of="${DISK}" bs=512 seek=1 conv=sync,noerror,notrunc >"${SAVE_ERROR}" 2>&1 || show_error fi esac #Copy bios bin if [ "${BIOS_BIN}" == true ]; then if [ -f "${RELEASE_DIR}/3rdparty/bootloader/ODROIDBIOS.BIN" ]; then echo "image: copy bios bin image..." cp "${RELEASE_DIR}/3rdparty/bootloader/ODROIDBIOS.BIN" "${LE_TMP}/ODROIDBIOS.BIN" mcopy -so "${LE_TMP}/ODROIDBIOS.BIN" :: fi if [ -d "${RELEASE_DIR}/3rdparty/bootloader/res" ]; then cp -r "${RELEASE_DIR}/3rdparty/bootloader/res" "${LE_TMP}/res" mcopy -so "${LE_TMP}/res" :: fi fi #Create boot.ini if [ "${BOOT_INI}" == true ] then echo "image: create boot.ini..." cat >"${LE_TMP}/boot.ini" < "${LE_TMP}/extlinux/extlinux.conf" LABEL ${DISTRO} LINUX /${KERNEL_NAME} ${FDTMODE} APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} ${EXTRA_CMDLINE} EOF mcopy -so "${LE_TMP}/extlinux" :: fi