Files
Arch-R/projects/Amlogic/bootloader/mkimage
2019-06-05 22:58:44 +02:00

31 lines
1000 B
Plaintext

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
. config/options $1
case "${UBOOT_SYSTEM}" in
box|"")
DTB="@@DTB_NAME@@"
;;
*)
echo "image: writing u-boot to $(basename $DISK)"
dd if="$INSTALL/usr/share/bootloader/u-boot.bin.sd.bin" of="$DISK" conv=fsync,notrunc bs=1 count=112 >"$SAVE_ERROR" 2>&1 || show_error
dd if="$INSTALL/usr/share/bootloader/u-boot.bin.sd.bin" of="$DISK" conv=fsync,notrunc bs=512 skip=1 seek=1 >"$SAVE_ERROR" 2>&1 || show_error
DTB="$(${SCRIPTS}/uboot_helper ${PROJECT} ${DEVICE} ${UBOOT_SYSTEM} dtb)"
;;
esac
echo "image: creating uEnv.ini"
cat << EOF > "${LE_TMP}/uEnv.ini"
dtb_name=/dtb/${DTB}
bootargs=boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
EOF
mcopy -s "${LE_TMP}/uEnv.ini" ::
touch "$RELEASE_DIR/3rdparty/bootloader/aml_autoscript.zip"
echo "image: copying autoscript files and device trees"
mcopy -s ${RELEASE_DIR}/3rdparty/bootloader/* ::