mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2024-11-24 00:39:53 +00:00
RPi: make bootloader files optional
RPi4 only needs start.elf/fixup.dat, RPi5 doesn't need any of them Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
234e0ed9bb
commit
fe21297a01
@ -17,9 +17,11 @@ mount -o remount,rw $BOOT_ROOT
|
||||
|
||||
# update bootloader files
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/LICENCE* $BOOT_ROOT
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/bootcode.bin $BOOT_ROOT
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/fixup.dat $BOOT_ROOT
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/start.elf $BOOT_ROOT
|
||||
for f in bootcode.bin fixup.dat start.elf ; do
|
||||
if [ -f "${SYSTEM_ROOT}/usr/share/bootloader/$f" ]; then
|
||||
cp -p "${SYSTEM_ROOT}/usr/share/bootloader/$f" "${BOOT_ROOT}"
|
||||
fi
|
||||
done
|
||||
|
||||
rm -f $BOOT_ROOT/bcm283*.dtb # cleanup excess dtb's used by upstream kernels (ie. not LE)
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/*.dtb $BOOT_ROOT
|
||||
|
@ -16,14 +16,19 @@ PKG_TOOLCHAIN="manual"
|
||||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/share/bootloader
|
||||
cp -PRv LICENCE* ${INSTALL}/usr/share/bootloader
|
||||
cp -PRv bootcode.bin ${INSTALL}/usr/share/bootloader
|
||||
if [ "${DEVICE}" = "RPi4" ]; then
|
||||
cp -PRv fixup4x.dat ${INSTALL}/usr/share/bootloader/fixup.dat
|
||||
cp -PRv start4x.elf ${INSTALL}/usr/share/bootloader/start.elf
|
||||
else
|
||||
cp -PRv fixup_x.dat ${INSTALL}/usr/share/bootloader/fixup.dat
|
||||
cp -PRv start_x.elf ${INSTALL}/usr/share/bootloader/start.elf
|
||||
fi
|
||||
case "${DEVICE}" in
|
||||
RPi4)
|
||||
cp -PRv fixup4x.dat ${INSTALL}/usr/share/bootloader/fixup.dat
|
||||
cp -PRv start4x.elf ${INSTALL}/usr/share/bootloader/start.elf
|
||||
;;
|
||||
RPi5)
|
||||
;;
|
||||
*)
|
||||
cp -PRv bootcode.bin ${INSTALL}/usr/share/bootloader
|
||||
cp -PRv fixup_x.dat ${INSTALL}/usr/share/bootloader/fixup.dat
|
||||
cp -PRv start_x.elf ${INSTALL}/usr/share/bootloader/start.elf
|
||||
;;
|
||||
esac
|
||||
|
||||
find_file_path bootloader/update.sh ${PKG_DIR}/files/update.sh && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader
|
||||
find_file_path bootloader/canupdate.sh && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader
|
||||
|
@ -6,9 +6,11 @@
|
||||
|
||||
mkdir -p $RELEASE_DIR/3rdparty/bootloader
|
||||
cp -PR $INSTALL/usr/share/bootloader/LICENCE* $RELEASE_DIR/3rdparty/bootloader/
|
||||
cp -PR $INSTALL/usr/share/bootloader/bootcode.bin $RELEASE_DIR/3rdparty/bootloader/
|
||||
cp -PR $INSTALL/usr/share/bootloader/fixup.dat $RELEASE_DIR/3rdparty/bootloader/
|
||||
cp -PR $INSTALL/usr/share/bootloader/start.elf $RELEASE_DIR/3rdparty/bootloader/
|
||||
for f in bootcode.bin fixup.dat start.elf ; do
|
||||
if [ -f "${INSTALL}/usr/share/bootloader/$f" ]; then
|
||||
cp -PR "${INSTALL}/usr/share/bootloader/$f" "${RELEASE_DIR}/3rdparty/bootloader/"
|
||||
fi
|
||||
done
|
||||
cp -PR $INSTALL/usr/share/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader/
|
||||
cp -PR $INSTALL/usr/share/bootloader/overlays $RELEASE_DIR/3rdparty/bootloader/
|
||||
|
||||
|
@ -420,6 +420,12 @@ if [ "${1}" = "release" -o "${1}" = "mkimage" -o "${1}" = "noobs" ]; then
|
||||
fi
|
||||
done
|
||||
cp -PR ${INSTALL}/usr/share/bootloader/LICENCE* ${RELEASE_DIR}/${NOOBS_DISTRO}/System/
|
||||
for f in bootcode.bin fixup.dat start.elf ; do
|
||||
if [ -f "${INSTALL}/usr/share/bootloader/$f" ]; then
|
||||
cp -PR "${INSTALL}/usr/share/bootloader/$f" "${RELEASE_DIR}/${NOOBS_DISTRO}/System/"
|
||||
fi
|
||||
done
|
||||
|
||||
cp -PR ${INSTALL}/usr/share/bootloader/bootcode.bin ${RELEASE_DIR}/${NOOBS_DISTRO}/System/
|
||||
cp -PR ${INSTALL}/usr/share/bootloader/fixup.dat ${RELEASE_DIR}/${NOOBS_DISTRO}/System/
|
||||
cp -PR ${INSTALL}/usr/share/bootloader/start.elf ${RELEASE_DIR}/${NOOBS_DISTRO}/System/
|
||||
|
@ -217,9 +217,12 @@ EOF
|
||||
mcopy "${RELEASE_DIR}/target/KERNEL.md5" "::/${KERNEL_NAME}.md5" >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
mcopy "${RELEASE_DIR}/target/SYSTEM.md5" ::/SYSTEM.md5 >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
|
||||
mcopy "${RELEASE_DIR}/3rdparty/bootloader/bootcode.bin" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
mcopy "${RELEASE_DIR}/3rdparty/bootloader/fixup.dat" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
mcopy "${RELEASE_DIR}/3rdparty/bootloader/start.elf" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
for f in bootcode.bin fixup.dat start.elf ; do
|
||||
if [ -f "${RELEASE_DIR}/3rdparty/bootloader/$f" ]; then
|
||||
mcopy "${RELEASE_DIR}/3rdparty/bootloader/$f" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
fi
|
||||
done
|
||||
|
||||
mcopy "${RELEASE_DIR}/3rdparty/bootloader/config.txt" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
for distro in "${RELEASE_DIR}/3rdparty/bootloader/distroconfig"*.txt ; do
|
||||
if [ -f "${distro}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user