mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
set LDFLAGS="--no-warn-rwx-segments" for build of bl31.elf on iMX8, A64, H5 and H6 socs. As the link fails with a non-zero exit code (because of --fatal-warnings). relevant commit: - https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 The ELF linker will now generate a warning message if the stack is made executable. Similarly it will warn if the output binary contains a segment with all three of the read, write and execute permission bits set. These warnings are intended to help developers identify programs which might be vulnerable to attack via these executable memory regions. The warnings are enabled by default but can be disabled via a command line option. compile error: LD atf-2.7/build/sun50i_a64/release/bl31/bl31.elf aarch64-none-elf-ld.bfd: warning: atf-2.7/build/sun50i_a64/release/bl31/bl31.elf has a LOAD segment with RWX permissions
29 lines
1.2 KiB
Makefile
29 lines
1.2 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (C) 2018-present Team LibreELEC
|
|
|
|
PKG_NAME="atf"
|
|
PKG_VERSION="2.7"
|
|
PKG_SHA256="327c65b1bc231608a7a808b068b00c1a22310e9fc86158813cd10a9711d5725e"
|
|
PKG_ARCH="arm aarch64"
|
|
PKG_LICENSE="BSD-3c"
|
|
PKG_SITE="https://github.com/ARM-software/arm-trusted-firmware"
|
|
PKG_URL="https://github.com/ARM-software/arm-trusted-firmware/archive/v${PKG_VERSION}.tar.gz"
|
|
PKG_DEPENDS_TARGET="toolchain"
|
|
PKG_LONGDESC="ARM Trusted Firmware is a reference implementation of secure world software, including a Secure Monitor executing at Exception Level 3 and various Arm interface standards."
|
|
PKG_TOOLCHAIN="manual"
|
|
|
|
[ -n "${KERNEL_TOOLCHAIN}" ] && PKG_DEPENDS_TARGET+=" gcc-${KERNEL_TOOLCHAIN}:host"
|
|
|
|
make_target() {
|
|
if [ "${DEVICE}" = "iMX8" ]; then
|
|
CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="--no-warn-rwx-segments" CFLAGS="--param=min-pagesize=0" make PLAT=${ATF_PLATFORM} bl31
|
|
else
|
|
CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="--no-warn-rwx-segments" CFLAGS="" make PLAT=${ATF_PLATFORM} bl31
|
|
fi
|
|
}
|
|
|
|
makeinstall_target() {
|
|
mkdir -p ${INSTALL}/usr/share/bootloader
|
|
cp -a build/${ATF_PLATFORM}/release/bl31.bin ${INSTALL}/usr/share/bootloader
|
|
}
|