Add initial 64-bit ARM (aarch64) support (#1034432)
Signed-off-by: Brian C. Lane <bcl@redhat.com> Resolves: rhbz#1034432
This commit is contained in:
parent
0d74373fd0
commit
3a5e515d4f
49
share/aarch64.tmpl
Normal file
49
share/aarch64.tmpl
Normal file
@ -0,0 +1,49 @@
|
||||
<%page args="kernels, runtime_img, basearch, outroot, product, isolabel"/>
|
||||
<%
|
||||
configdir="tmp/config_files/aarch64"
|
||||
PXEBOOTDIR="images/pxeboot"
|
||||
BOOTDIR="boot"
|
||||
KERNELDIR=PXEBOOTDIR
|
||||
LIVEDIR="LiveOS"
|
||||
%>
|
||||
|
||||
mkdir ${LIVEDIR}
|
||||
install ${runtime_img} ${LIVEDIR}/squashfs.img
|
||||
treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
|
||||
|
||||
## install bootloader and config files
|
||||
mkdir ${BOOTDIR}
|
||||
install ${configdir}/boot.msg ${BOOTDIR}
|
||||
install ${configdir}/grub2-efi.cfg ${BOOTDIR}
|
||||
|
||||
## configure bootloader
|
||||
replace @VERSION@ ${product.version} ${BOOTDIR}/grub2-efi.cfg ${BOOTDIR}/*.msg
|
||||
replace @PRODUCT@ '${product.name}' ${BOOTDIR}/grub2-efi.cfg ${BOOTDIR}/*.msg
|
||||
|
||||
## install kernels
|
||||
mkdir ${KERNELDIR}
|
||||
%for kernel in kernels:
|
||||
## normal aarch64
|
||||
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
||||
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||
%if doupgrade:
|
||||
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||
%endif
|
||||
%endfor
|
||||
|
||||
#FIXME: this will need adjusted when we have a real bootloader.
|
||||
## WHeeeeeeee, EFI.
|
||||
## We could remove the basearch restriction someday..
|
||||
<% efiargs=""; efigraft="" %>
|
||||
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
|
||||
<%
|
||||
efiarch = 'AARCH64'
|
||||
efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
|
||||
images = ["images/efiboot.img"]
|
||||
for img in images:
|
||||
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img)
|
||||
efigraft += " {0}={1}/{0}".format(img,outroot)
|
||||
%>
|
||||
<%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch=efiarch, isolabel=isolabel"/>
|
||||
%endif
|
||||
|
5
share/config_files/aarch64/boot.msg
Normal file
5
share/config_files/aarch64/boot.msg
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
splash.lss
|
||||
|
||||
- Press the 01<ENTER>07 key to begin the installation process.
|
||||
|
13
share/config_files/aarch64/grub.conf
Normal file
13
share/config_files/aarch64/grub.conf
Normal file
@ -0,0 +1,13 @@
|
||||
#debug --graphics
|
||||
default=0
|
||||
splashimage=@SPLASHPATH@
|
||||
timeout 5
|
||||
hiddenmenu
|
||||
title Install @PRODUCT@ @VERSION@
|
||||
findiso
|
||||
kernel @KERNELPATH@ @ROOT@ quiet
|
||||
initrd @INITRDPATH@
|
||||
title Test this media & install @PRODUCT@ @VERSION@
|
||||
findiso
|
||||
kernel @KERNELPATH@ @ROOT@ rd.live.check quiet
|
||||
initrd @INITRDPATH@
|
18
share/config_files/aarch64/grub2-efi.cfg
Normal file
18
share/config_files/aarch64/grub2-efi.cfg
Normal file
@ -0,0 +1,18 @@
|
||||
set default="0"
|
||||
|
||||
insmod gzio
|
||||
insmod part_gpt
|
||||
insmod ext2
|
||||
insmod gzio
|
||||
|
||||
set timeout=5
|
||||
### END /etc/grub.d/00_header ###
|
||||
|
||||
### BEGIN /etc/grub.d/10_linux ###
|
||||
menuentry 'Install @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
|
||||
set root='hd0,gpt2'
|
||||
devicetree @KERNELPATH@/../foundation-v8.dtb
|
||||
linuxefi @KERNELPATH@ @ROOT@ mem=2G console=ttyAMA0 earlyprintk=pl011,0x1c090000 debug uefi_debug rw
|
||||
initrdefi @INITRDPATH@
|
||||
}
|
||||
|
@ -21,6 +21,9 @@ installpkg kernel
|
||||
%endif
|
||||
|
||||
## arch-specific packages (bootloaders etc.)
|
||||
%if basearch == "aarch64":
|
||||
installpkg grub2-efi grubby
|
||||
%endif
|
||||
%if basearch in ("arm", "armhfp"):
|
||||
installpkg kernel-lpae kernel-tegra
|
||||
installpkg uboot-tools
|
||||
|
@ -50,7 +50,7 @@ from discinfo import DiscInfo
|
||||
from executils import runcmd, runcmd_output
|
||||
|
||||
class ArchData(DataHolder):
|
||||
lib64_arches = ("x86_64", "ppc64", "s390x", "ia64")
|
||||
lib64_arches = ("x86_64", "ppc64", "s390x", "ia64", "aarch64")
|
||||
bcj_arch = dict(i386="x86", x86_64="x86",
|
||||
ppc="powerpc", ppc64="powerpc",
|
||||
arm="arm", armhfp="arm")
|
||||
|
@ -37,6 +37,7 @@ templatemap = {
|
||||
'ppc64': 'ppc.tmpl',
|
||||
's390': 's390.tmpl',
|
||||
's390x': 's390.tmpl',
|
||||
'aarch64': 'aarch64.tmpl',
|
||||
'arm': 'arm.tmpl',
|
||||
'armhfp': 'arm.tmpl',
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user