mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
31 lines
1000 B
Plaintext
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/* ::
|