2023-03-22 21:56:33 +00:00
|
|
|
# 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
|
2023-03-23 19:26:09 +00:00
|
|
|
FIP_DIR="${ROOT}/build.${DISTRO}-${DEVICE}.aarch64/amlogic-boot-fip-*"
|
2023-03-22 21:56:33 +00:00
|
|
|
|
|
|
|
case "${PKG_SOC}" in
|
|
|
|
s922x)
|
2023-03-23 19:26:09 +00:00
|
|
|
echo "uboot: encrypting u-boot.bin with fip..."
|
|
|
|
cp -av u-boot.bin ${FIP_DIR}/
|
2023-03-22 21:56:33 +00:00
|
|
|
cd ${FIP_DIR}
|
|
|
|
./build-fip.sh ${BOOT_FIP} u-boot.bin ${INSTALL}/usr/share/bootloader/
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "boot: create extlinux.conf..."
|
|
|
|
mkdir -p "${INSTALL}/usr/share/bootloader/extlinux"
|
|
|
|
|
|
|
|
FDTMODE="FDT /${DEVICE_DTB}.dtb"
|
|
|
|
|
|
|
|
cat << EOF > "${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
|