Add support for RPi4.aarch64

port of 1bd927e074
This commit is contained in:
David Lawson 2021-10-09 21:48:21 +02:00 committed by Tomáš Kelemen (vudiq)
parent e57da47067
commit 24b8ee0712
8 changed files with 28 additions and 3 deletions

View File

@ -81,6 +81,7 @@ targets="\
RPi|GPICase|arm|image \
RPi|RPi|arm|noobs \
RPi|RPi2|arm|noobs \
RPi|RPi4|aarch64|noobs \
RPi|RPi4|arm|noobs \
"

View File

@ -19,6 +19,7 @@ mount -o remount,rw $BOOT_ROOT
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/fixup4.dat $BOOT_ROOT
cp -p $SYSTEM_ROOT/usr/share/bootloader/start.elf $BOOT_ROOT
rm -f $BOOT_ROOT/bcm283*.dtb # cleanup excess dtb's used by upstream kernels (ie. not LE)

View File

@ -19,9 +19,11 @@ makeinstall_target() {
cp -PRv bootcode.bin ${INSTALL}/usr/share/bootloader
if [ "${DEVICE}" = "RPi4" ]; then
cp -PRv fixup4x.dat ${INSTALL}/usr/share/bootloader/fixup.dat
cp -PRv fixup4.dat ${INSTALL}/usr/share/bootloader/fixup4.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 fixup4.dat ${INSTALL}/usr/share/bootloader/fixup4.dat
cp -PRv start_x.elf ${INSTALL}/usr/share/bootloader/start.elf
fi
@ -32,6 +34,10 @@ makeinstall_target() {
find_file_path config/config.txt ${PKG_DIR}/files/config.txt && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader
if [ "${DISTRO}" = "Lakka" ]; then
if [ "${ARCH}" = "aarch64" ]; then
echo "arm_64bit=1" >> ${INSTALL}/usr/share/bootloader/distroconfig.txt
echo "kernel=${KERNEL_NAME}" >> ${INSTALL}/usr/share/bootloader/distroconfig.txt
fi
echo "disable_splash=1" >> ${INSTALL}/usr/share/bootloader/distroconfig.txt
echo "dtparam=audio=on" >> ${INSTALL}/usr/share/bootloader/distroconfig.txt
echo "hdmi_max_pixel_freq:0=200000000" >> ${INSTALL}/usr/share/bootloader/distroconfig.txt

View File

@ -8,6 +8,7 @@ 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/fixup4.dat $RELEASE_DIR/3rdparty/bootloader/
cp -PR $INSTALL/usr/share/bootloader/start.elf $RELEASE_DIR/3rdparty/bootloader/
cp -PR $INSTALL/usr/share/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader/
cp -PR $INSTALL/usr/share/bootloader/overlays $RELEASE_DIR/3rdparty/bootloader/

View File

@ -5,6 +5,7 @@ PKG_NAME="rpi-eeprom"
PKG_VERSION="f19990103e4483ebb47be5ea897c134913f83ad8"
PKG_SHA256="6985c06448a5fcdcd0350bebfb50930a7d4e05ecaf1230e29d796c5a8144dbd8"
PKG_ARCH="arm"
[ "${DISTRO}" = "Lakka" ] && PKG_ARCH+=" aarch64" || true
PKG_LICENSE="BSD-3/custom"
PKG_SITE="https://github.com/raspberrypi/rpi-eeprom"
PKG_URL="https://github.com/raspberrypi/rpi-eeprom/archive/${PKG_VERSION}.tar.gz"

View File

@ -55,6 +55,7 @@ targets="\
RPi|GPICase|arm| \
RPi|RPi|arm| \
RPi|RPi2|arm| \
RPi|RPi4|aarch64| \
RPi|RPi4|arm| \
"

View File

@ -39,15 +39,28 @@
VULKAN="vulkan-tools"
fi
fi
# Kernel target
KERNEL_TARGET="zImage"
;;
aarch64)
if [ "${DISTRO}" != "Lakka" ]; then
echo "${DEVICE} ${ARCH} not supported on ${DISTRO}!"
exit 1
fi
if [ "${DEVICE}" = "RPi4" ]; then
TARGET_CPU="cortex-a72"
TARGET_CPU_FLAGS="+crc"
TARGET_FPU="neon-fp-armv8"
fi
TARGET_FLOAT="hard"
KERNEL_TARGET="Image"
;;
esac
# Bootloader to use (bcm2835-bootloader)
BOOTLOADER="bcm2835-bootloader"
# Kernel target
KERNEL_TARGET="zImage"
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD="dtbs"

View File

@ -231,6 +231,7 @@ EOF
mcopy "${RELEASE_DIR}/3rdparty/bootloader/bootcode.bin" ::
mcopy "${RELEASE_DIR}/3rdparty/bootloader/fixup.dat" ::
mcopy "${RELEASE_DIR}/3rdparty/bootloader/fixup4.dat" ::
mcopy "${RELEASE_DIR}/3rdparty/bootloader/start.elf" ::
mcopy "${RELEASE_DIR}/3rdparty/bootloader/config.txt" ::
mcopy "${RELEASE_DIR}/3rdparty/bootloader/distroconfig.txt" ::