mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 21:56:42 +00:00
Merge pull request #7528 from antonlacon/rpi-aarch64
Add aarch64 userland to RPi
This commit is contained in:
commit
29d3f7f5d4
40
packages/tools/bcm2835-userland/package.mk
Normal file
40
packages/tools/bcm2835-userland/package.mk
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
|
PKG_NAME="bcm2835-userland"
|
||||||
|
PKG_VERSION="54fd97ae4066a10b6b02089bc769ceed328737e0"
|
||||||
|
PKG_SHA256="b5718b34730069b7c3748cefb528696267c5bf9ba1e12df4f668640c50849125"
|
||||||
|
PKG_ARCH="arm aarch64"
|
||||||
|
PKG_LICENSE="BSD-3-Clause"
|
||||||
|
PKG_SITE="https://github.com/raspberrypi/userland"
|
||||||
|
PKG_URL="https://github.com/raspberrypi/userland/archive/${PKG_VERSION}.tar.gz"
|
||||||
|
PKG_DEPENDS_TARGET="gcc:host"
|
||||||
|
PKG_LONGDESC="Source code for ARM side libraries for interfacing to Raspberry Pi GPU"
|
||||||
|
PKG_TOOLCHAIN="cmake"
|
||||||
|
|
||||||
|
if [ ${TARGET_ARCH} = "aarch64" ]; then
|
||||||
|
PKG_CMAKE_OPTS_TARGET="-DARM64=ON"
|
||||||
|
else
|
||||||
|
PKG_CMAKE_OPTS_TARGET="-DARM64=OFF"
|
||||||
|
fi
|
||||||
|
|
||||||
|
makeinstall_target() {
|
||||||
|
# libraries used by below binaries
|
||||||
|
mkdir -p ${INSTALL}/usr/lib
|
||||||
|
# cp -PRv ${PKG_BUILD}/build/lib/libbcm_host.so ${INSTALL}/usr/lib
|
||||||
|
# cp -PRv ${PKG_BUILD}/build/lib/libdebug_sym.so ${INSTALL}/usr/lib
|
||||||
|
cp -PRv ${PKG_BUILD}/build/lib/libdtovl.so ${INSTALL}/usr/lib
|
||||||
|
cp -PRv ${PKG_BUILD}/build/lib/libvchiq_arm.so ${INSTALL}/usr/lib
|
||||||
|
cp -PRv ${PKG_BUILD}/build/lib/libvcos.so ${INSTALL}/usr/lib
|
||||||
|
# cp -PRv ${PKG_BUILD}/build/lib/libdebug_sym_static.a ${INSTALL}/usr/lib
|
||||||
|
# cp -PRv ${PKG_BUILD}/build/lib/libfdt.a ${INSTALL}/usr/lib
|
||||||
|
# cp -PRv ${PKG_BUILD}/build/lib/libvchostif.a ${INSTALL}/usr/lib
|
||||||
|
|
||||||
|
mkdir -p ${INSTALL}/usr/bin
|
||||||
|
cp -PRv ${PKG_BUILD}/build/bin/dtoverlay ${INSTALL}/usr/bin
|
||||||
|
ln -s dtoverlay ${INSTALL}/usr/bin/dtparam
|
||||||
|
cp -PRv ${PKG_BUILD}/build/bin/vcgencmd ${INSTALL}/usr/bin
|
||||||
|
cp -PRv ${PKG_BUILD}/build/bin/vcmailbox ${INSTALL}/usr/bin
|
||||||
|
# tvservice does nothing when using vc4 driver
|
||||||
|
# cp -PRv ${PKG_BUILD}/build/bin/tvservice ${INSTALL}/usr/bin
|
||||||
|
}
|
26
packages/tools/bcm2835-utils/package.mk
Normal file
26
packages/tools/bcm2835-utils/package.mk
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
|
PKG_NAME="bcm2835-utils"
|
||||||
|
PKG_VERSION="5db3e694d27431403bebb13404f5d85899b571e0"
|
||||||
|
PKG_SHA256="ab8a9f7632fe979533b801644f30211f916cd8280f476471b5d323d420d7a146"
|
||||||
|
PKG_ARCH="arm aarch64"
|
||||||
|
PKG_LICENSE="BSD-3-Clause"
|
||||||
|
PKG_SITE="https://github.com/raspberrypi/utils"
|
||||||
|
PKG_URL="https://github.com/raspberrypi/utils/archive/${PKG_VERSION}.tar.gz"
|
||||||
|
PKG_DEPENDS_TARGET="gcc:host"
|
||||||
|
PKG_LONGDESC="Raspberry Pi related collection of scripts and simple applications"
|
||||||
|
PKG_TOOLCHAIN="cmake"
|
||||||
|
|
||||||
|
# only going to use vclog so don't build everything else
|
||||||
|
make_target() {
|
||||||
|
mkdir -p ${PKG_BUILD}/.${TARGET_NAME}/vclog/build
|
||||||
|
cd ${PKG_BUILD}/.${TARGET_NAME}/vclog/build
|
||||||
|
cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CONF} -DCMAKE_C_FLAGS="${TARGET_CFLAGS}" -S ${PKG_BUILD}/vclog
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
makeinstall_target() {
|
||||||
|
mkdir -p ${INSTALL}/usr/bin
|
||||||
|
cp -PRv ${PKG_BUILD}/.${TARGET_NAME}/vclog/build/vclog ${INSTALL}/usr/bin
|
||||||
|
}
|
@ -2,6 +2,16 @@
|
|||||||
# Device defaults
|
# Device defaults
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
# The TARGET_CPU variable controls which processor should be targeted for
|
||||||
|
# generated code.
|
||||||
|
case $TARGET_ARCH in
|
||||||
|
arm)
|
||||||
|
TARGET_FLOAT="hard"
|
||||||
|
TARGET_CPU="arm1176jzf-s"
|
||||||
|
TARGET_FPU="vfp"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# NOOBS supported hex versions (legacy)
|
# NOOBS supported hex versions (legacy)
|
||||||
NOOBS_HEX="2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,0092,0093"
|
NOOBS_HEX="2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,0092,0093"
|
||||||
|
|
||||||
|
@ -2,6 +2,16 @@
|
|||||||
# Device defaults
|
# Device defaults
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
# The TARGET_CPU variable controls which processor should be targeted for
|
||||||
|
# generated code.
|
||||||
|
case $TARGET_ARCH in
|
||||||
|
arm)
|
||||||
|
TARGET_CPU="cortex-a7"
|
||||||
|
TARGET_FPU="neon-vfpv4"
|
||||||
|
TARGET_FLOAT="hard"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# NOOBS supported hex versions (legacy)
|
# NOOBS supported hex versions (legacy)
|
||||||
NOOBS_HEX="1040,1041,2082"
|
NOOBS_HEX="1040,1041,2082"
|
||||||
|
|
||||||
|
@ -14,11 +14,21 @@
|
|||||||
# set the addon project
|
# set the addon project
|
||||||
ADDON_PROJECT="ARMv8"
|
ADDON_PROJECT="ARMv8"
|
||||||
|
|
||||||
# build 64bit kernel
|
# The TARGET_CPU variable controls which processor should be targeted for
|
||||||
|
# generated code.
|
||||||
case $TARGET_ARCH in
|
case $TARGET_ARCH in
|
||||||
|
aarch64)
|
||||||
|
TARGET_CPU="cortex-a72"
|
||||||
|
TARGET_CPU_FLAGS="+crc"
|
||||||
|
;;
|
||||||
arm)
|
arm)
|
||||||
TARGET_KERNEL_ARCH="arm64"
|
TARGET_KERNEL_ARCH="arm64"
|
||||||
TARGET_KERNEL_PATCH_ARCH="aarch64"
|
TARGET_KERNEL_PATCH_ARCH="aarch64"
|
||||||
|
TARGET_FLOAT="hard"
|
||||||
|
# cortex-a72 caused issues in the past, so use a53
|
||||||
|
TARGET_CPU="cortex-a53"
|
||||||
|
TARGET_CPU_FLAGS="+crc"
|
||||||
|
TARGET_FPU="neon-fp-armv8"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -2,40 +2,6 @@
|
|||||||
# setup system defaults
|
# setup system defaults
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# The TARGET_CPU variable controls which processor should be targeted for
|
|
||||||
# generated code.
|
|
||||||
case $TARGET_ARCH in
|
|
||||||
arm)
|
|
||||||
# Valid TARGET_CPU for Raspberry Pi based devices are:
|
|
||||||
# arm1176jzf-s cortex-a7 cortex-a53
|
|
||||||
if [ "$DEVICE" = "RPi" ]; then
|
|
||||||
TARGET_CPU="arm1176jzf-s"
|
|
||||||
elif [ "$DEVICE" = "RPi2" ]; then
|
|
||||||
TARGET_CPU="cortex-a7"
|
|
||||||
elif [ "$DEVICE" = "RPi4" ]; then
|
|
||||||
TARGET_CPU="cortex-a53"
|
|
||||||
TARGET_CPU_FLAGS="+crc"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TARGET_FLOAT:
|
|
||||||
# Specifies which floating-point ABI to use. Permissible values are:
|
|
||||||
# soft hard
|
|
||||||
TARGET_FLOAT="hard"
|
|
||||||
|
|
||||||
# Valid TARGET_FPU for Raspberry Pi based devices:
|
|
||||||
# This specifies what floating point hardware (or hardware emulation) is
|
|
||||||
# available on the target. Permissible names are:
|
|
||||||
# vfp neon-vfpv4 neon-fp-armv8
|
|
||||||
if [ "$DEVICE" = "RPi" ]; then
|
|
||||||
TARGET_FPU="vfp"
|
|
||||||
elif [ "$DEVICE" = "RPi2" ]; then
|
|
||||||
TARGET_FPU="neon-vfpv4"
|
|
||||||
elif [ "$DEVICE" = "RPi4" ]; then
|
|
||||||
TARGET_FPU="neon-fp-armv8"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Bootloader to use (bcm2835-bootloader)
|
# Bootloader to use (bcm2835-bootloader)
|
||||||
BOOTLOADER="bcm2835-bootloader"
|
BOOTLOADER="bcm2835-bootloader"
|
||||||
|
|
||||||
@ -107,7 +73,8 @@
|
|||||||
# for a list of additional drivers see packages/linux-drivers
|
# for a list of additional drivers see packages/linux-drivers
|
||||||
# Space separated list is supported,
|
# Space separated list is supported,
|
||||||
# e.g. ADDITIONAL_DRIVERS+=" DRIVER1 DRIVER2"
|
# e.g. ADDITIONAL_DRIVERS+=" DRIVER1 DRIVER2"
|
||||||
ADDITIONAL_DRIVERS+=" bcm2835-driver"
|
# Comment ADDITIONAL_PACKAGES below if using bcm2835-driver
|
||||||
|
# ADDITIONAL_DRIVERS+=" bcm2835-driver"
|
||||||
|
|
||||||
if [ "${ALSA_SUPPORT}" = "yes" ]; then
|
if [ "${ALSA_SUPPORT}" = "yes" ]; then
|
||||||
ADDITIONAL_DRIVERS+=" rpi-cirrus-config"
|
ADDITIONAL_DRIVERS+=" rpi-cirrus-config"
|
||||||
@ -121,5 +88,8 @@
|
|||||||
# Space separated list is supported,
|
# Space separated list is supported,
|
||||||
DRIVER_ADDONS="crazycat dvb-latest"
|
DRIVER_ADDONS="crazycat dvb-latest"
|
||||||
|
|
||||||
|
# additional packages to install:
|
||||||
|
ADDITIONAL_PACKAGES+=" bcm2835-userland bcm2835-utils"
|
||||||
|
|
||||||
# debug tty path
|
# debug tty path
|
||||||
DEBUG_TTY="/dev/console"
|
DEBUG_TTY="/dev/console"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user