mirror of
https://github.com/raspberrypi/rpi-update.git
synced 2026-01-20 21:13:38 +08:00
rpi-update: More complete Pi 5 support
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
This commit is contained in:
27
rpi-update
27
rpi-update
@@ -179,6 +179,11 @@ function update_modules {
|
|||||||
continue;
|
continue;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [[ ${WANT_PI5} -ne 1 ]]; then
|
||||||
|
if [[ "${VERSION}" == "v8_16k+" ]]; then
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
cp -R "${DIR}" "${FW_MODPATH}/"
|
cp -R "${DIR}" "${FW_MODPATH}/"
|
||||||
echo " *** depmod ${BASEDIR}"
|
echo " *** depmod ${BASEDIR}"
|
||||||
depmod -b "${ROOT_PATH}" -a "${BASEDIR}"
|
depmod -b "${ROOT_PATH}" -a "${BASEDIR}"
|
||||||
@@ -326,6 +331,7 @@ function show_notice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function check_partition {
|
function check_partition {
|
||||||
|
mbs=$1
|
||||||
if [[ ${SKIP_CHECK_PARTITION} -ne 0 ]]; then
|
if [[ ${SKIP_CHECK_PARTITION} -ne 0 ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
@@ -338,10 +344,10 @@ function check_partition {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ $PARTSIZE -ne 0 ] && [ $PARTSIZE -lt $(( 256*1024*1024 )) ]; then
|
if [ $PARTSIZE -ne 0 ] && [ $PARTSIZE -lt $(( mbs*1024*1024 )) ]; then
|
||||||
echo "Partition size $(( $PARTSIZE >> 20 ))M may not be sufficient for new Pi4 files"
|
echo "Partition size $(( $PARTSIZE >> 20 ))M may not be sufficient for all firmware files"
|
||||||
echo "This could result in a system that will not boot."
|
echo "This could result in a system that will not boot."
|
||||||
echo "256M FAT partition is recommended. Ensure you have a backup if continuing."
|
echo "${mbs}M FAT partition is recommended. Ensure you have a backup if continuing."
|
||||||
if [[ ${SKIP_WARNING} -ne 0 ]]; then
|
if [[ ${SKIP_WARNING} -ne 0 ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
@@ -400,6 +406,9 @@ function update_firmware {
|
|||||||
if [[ ${WANT_64BIT} -eq 1 ]]; then
|
if [[ ${WANT_64BIT} -eq 1 ]]; then
|
||||||
[[ -e "${FW_REPOLOCAL}/"kernel8.img ]] && cp "${FW_REPOLOCAL}/"kernel8.img "${FW_PATH}/"
|
[[ -e "${FW_REPOLOCAL}/"kernel8.img ]] && cp "${FW_REPOLOCAL}/"kernel8.img "${FW_PATH}/"
|
||||||
fi
|
fi
|
||||||
|
if [[ ${WANT_PI5} -eq 1 ]]; then
|
||||||
|
[[ -e "${FW_REPOLOCAL}/"kernel_2712.img ]] && cp "${FW_REPOLOCAL}/"kernel_2712.img "${FW_PATH}/"
|
||||||
|
fi
|
||||||
if [[ -n $(shopt -s nullglob; echo "${FW_REPOLOCAL}/"*.dtb*) ]]; then
|
if [[ -n $(shopt -s nullglob; echo "${FW_REPOLOCAL}/"*.dtb*) ]]; then
|
||||||
cp "${FW_REPOLOCAL}/"*.dtb* "${FW_PATH}/"
|
cp "${FW_REPOLOCAL}/"*.dtb* "${FW_PATH}/"
|
||||||
fi
|
fi
|
||||||
@@ -477,12 +486,18 @@ function do_update {
|
|||||||
if [ -f ${FW_PATH}/start4.elf ] || [ -f ${BOOT_PATH}/start4.elf ]; then
|
if [ -f ${FW_PATH}/start4.elf ] || [ -f ${BOOT_PATH}/start4.elf ]; then
|
||||||
WANT_PI4=${WANT_PI4:-1}
|
WANT_PI4=${WANT_PI4:-1}
|
||||||
fi
|
fi
|
||||||
|
if [ -f ${FW_PATH}/kernel_2712.img ]; then
|
||||||
|
WANT_PI5=${WANT_PI5:-1}
|
||||||
|
fi
|
||||||
WANT_32BIT=${WANT_32BIT:-0}
|
WANT_32BIT=${WANT_32BIT:-0}
|
||||||
WANT_64BIT=${WANT_64BIT:-0}
|
WANT_64BIT=${WANT_64BIT:-0}
|
||||||
WANT_PI4=${WANT_PI4:-0}
|
WANT_PI4=${WANT_PI4:-0}
|
||||||
echo "WANT_32BIT:${WANT_32BIT} WANT_64BIT:${WANT_64BIT} WANT_PI4:${WANT_PI4}"
|
WANT_PI5=${WANT_PI5:-0}
|
||||||
if [[ ${WANT_PI4} -eq 1 ]]; then
|
echo "WANT_32BIT:${WANT_32BIT} WANT_64BIT:${WANT_64BIT} WANT_PI4:${WANT_PI4} WANT_PI5:${WANT_PI5}"
|
||||||
check_partition
|
if [[ ${WANT_PI5} -eq 1 ]]; then
|
||||||
|
check_partition 512
|
||||||
|
elif [[ ${WANT_PI4} -eq 1 ]]; then
|
||||||
|
check_partition 256
|
||||||
fi
|
fi
|
||||||
check_initramfs
|
check_initramfs
|
||||||
check_eeprom_version
|
check_eeprom_version
|
||||||
|
|||||||
Reference in New Issue
Block a user