mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-22 06:51:26 +02:00
sys-boot/grub: add grub_platforms_arm64 use flag
Enables the build of efi grub application for arm64 platforms. Signed-off-by: Andrej Rosano <andrej@inversepath.com>
This commit is contained in:
parent
347819617d
commit
3ef27eba2d
@ -42,6 +42,8 @@ GRUB_ALL_PLATFORMS=(
|
|||||||
coreboot multiboot efi-32 pc qemu xen
|
coreboot multiboot efi-32 pc qemu xen
|
||||||
# amd64, ia64:
|
# amd64, ia64:
|
||||||
efi-64
|
efi-64
|
||||||
|
# arm64:
|
||||||
|
arm64
|
||||||
)
|
)
|
||||||
IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
|
IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
|
||||||
|
|
||||||
@ -85,6 +87,7 @@ DEPEND="${RDEPEND}
|
|||||||
sys-fs/squashfs-tools[lzo,xz]
|
sys-fs/squashfs-tools[lzo,xz]
|
||||||
grub_platforms_efi-64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] )
|
grub_platforms_efi-64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] )
|
||||||
grub_platforms_pc? ( app-emulation/qemu[qemu_softmmu_targets_i386] )
|
grub_platforms_pc? ( app-emulation/qemu[qemu_softmmu_targets_i386] )
|
||||||
|
grub_platforms_arm64? ( app-emulation/qemu[qemu_softmmu_targets_aarch64] )
|
||||||
)
|
)
|
||||||
truetype? ( app-arch/unzip )
|
truetype? ( app-arch/unzip )
|
||||||
"
|
"
|
||||||
@ -119,6 +122,19 @@ QA_PRESTRIPPED="
|
|||||||
"
|
"
|
||||||
|
|
||||||
pkg_pretend() {
|
pkg_pretend() {
|
||||||
|
if [[ ${GRUB_PLATFORMS} =~ "arm64" ]] ; then
|
||||||
|
ebegin "Checking for aarch64-cros-linux-gnu-gcc"
|
||||||
|
if type -p aarch64-cros-linux-gnu-gcc > /dev/null ; then
|
||||||
|
eend 0
|
||||||
|
else
|
||||||
|
eend 1
|
||||||
|
eerror "Failed to locate 'aarch64-cros-linux-gnu-gcc' in \$PATH."
|
||||||
|
eerror "You can install an AARCH64 toolchain using:"
|
||||||
|
eerror " $ crossdev -t aarch64-cros-linux-gnu"
|
||||||
|
die "AARCH64 toolchain not found"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||||
# Bug 439082
|
# Bug 439082
|
||||||
if ! version_is_at_least 4.8 "$(gcc-version)" &&
|
if ! version_is_at_least 4.8 "$(gcc-version)" &&
|
||||||
@ -180,6 +196,12 @@ grub_configure() {
|
|||||||
local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
|
local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
|
||||||
export TARGET_CFLAGS TARGET_CPPFLAGS
|
export TARGET_CFLAGS TARGET_CPPFLAGS
|
||||||
fi ;;
|
fi ;;
|
||||||
|
arm64)
|
||||||
|
# FIXME(andrejro): mixed architecture binaries are generated
|
||||||
|
# while prepallstrip uses the native strip executable. This
|
||||||
|
# causes errors trying to strip aarch64 grub modules.
|
||||||
|
platform=efi
|
||||||
|
local CTARGET=aarch64-cros-linux-gnu ;;
|
||||||
guessed) ;;
|
guessed) ;;
|
||||||
*) platform=${MULTIBUILD_VARIANT} ;;
|
*) platform=${MULTIBUILD_VARIANT} ;;
|
||||||
esac
|
esac
|
||||||
@ -231,7 +253,6 @@ src_configure() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
tc-export CC NM OBJCOPY STRIP
|
tc-export CC NM OBJCOPY STRIP
|
||||||
export TARGET_CC=${TARGET_CC:-${CC}}
|
|
||||||
tc-export BUILD_CC # Bug 485592
|
tc-export BUILD_CC # Bug 485592
|
||||||
|
|
||||||
# Portage will take care of cleaning up GRUB_PLATFORMS
|
# Portage will take care of cleaning up GRUB_PLATFORMS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user