mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-03 16:07:51 +00:00
amlogic: be more selective on .img content
This commit is contained in:
parent
f4c4b8cde8
commit
4faed5429f
@ -3,28 +3,61 @@
|
||||
|
||||
. config/options $1
|
||||
|
||||
case "${UBOOT_SYSTEM}" in
|
||||
box|"")
|
||||
DTB="@@DTB_NAME@@"
|
||||
;;
|
||||
DTB="$(${SCRIPTS}/uboot_helper ${PROJECT} ${DEVICE} ${UBOOT_SYSTEM} dtb)"
|
||||
|
||||
*)
|
||||
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
|
||||
mkimage_uboot(){
|
||||
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
|
||||
mkimage_autoscripts(){
|
||||
echo "image: copying autoscript files and device trees"
|
||||
mcopy -s ${RELEASE_DIR}/3rdparty/bootloader/* ::
|
||||
touch "$RELEASE_DIR/3rdparty/bootloader/aml_autoscript.zip"
|
||||
}
|
||||
|
||||
echo "image: creating uEnv.ini"
|
||||
mkimage_uEnv(){
|
||||
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" ::
|
||||
mcopy -s "${LE_TMP}/uEnv.ini" ::
|
||||
}
|
||||
|
||||
touch "$RELEASE_DIR/3rdparty/bootloader/aml_autoscript.zip"
|
||||
mkimage_extlinux(){
|
||||
echo "image: copying exlinux.conf"
|
||||
mkdir -p "${LE_TMP}/extlinux"
|
||||
cat << EOF > "${LE_TMP}/extlinux/extlinux.conf"
|
||||
LABEL ${DISTRO}
|
||||
LINUX /${KERNEL_NAME}
|
||||
FDT /${DTB}
|
||||
APPEND boot=LABEL=LIBREELEC disk=LABEL=STORAGE quiet ${EXTRA_CMDLINE}
|
||||
EOF
|
||||
mcopy -s -o "${LE_TMP}/extlinux" ::
|
||||
}
|
||||
|
||||
echo "image: copying autoscript files and device trees"
|
||||
mcopy -s ${RELEASE_DIR}/3rdparty/bootloader/* ::
|
||||
mkimage_dtb(){
|
||||
echo "image: copying device tree"
|
||||
mcopy -s ${RELEASE_DIR}/3rdparty/bootloader/dtb/$DTB ::
|
||||
}
|
||||
|
||||
case "${UBOOT_SYSTEM}" in
|
||||
box|"")
|
||||
DTB="@@DTB_NAME@@"
|
||||
mkimage_autoscripts
|
||||
mkimage_uEnv
|
||||
;;
|
||||
khadas*|lepotato|nanopi-k2|odroid*)
|
||||
mkimage_extlinux
|
||||
mkimage_uboot
|
||||
mkimage_dtb
|
||||
;;
|
||||
*)
|
||||
mkimage_uboot
|
||||
mkimage_extlinux
|
||||
mkimage_autoscripts
|
||||
mkimage_uEnv
|
||||
;;
|
||||
esac
|
||||
|
Loading…
x
Reference in New Issue
Block a user