diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-05-07 10:40:18 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-05-07 10:40:18 +0000 |
commit | edfd711a4f210ac656633afda678f30813cbb0e8 (patch) | |
tree | ac2242563b28260ed882b1ba2bbb2398b5138728 /usr.sbin | |
parent | bf0fad56e5d35ceffed5fe4e14e540f777d272b9 (diff) |
Add arm64 support.
ok tom@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/installboot/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/installboot/armv7_installboot.c | 19 |
2 files changed, 20 insertions, 3 deletions
diff --git a/usr.sbin/installboot/Makefile b/usr.sbin/installboot/Makefile index 1362c36c36f..a88d84e8b4e 100644 --- a/usr.sbin/installboot/Makefile +++ b/usr.sbin/installboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.19 2016/08/14 13:47:52 krw Exp $ +# $OpenBSD: Makefile,v 1.20 2017/05/07 10:40:17 kettenis Exp $ PROG= installboot SRCS= installboot.c util.c @@ -15,7 +15,7 @@ CFLAGS += -DSOFTRAID SRCS += i386_installboot.c SRCS += i386_nlist.c SRCS += i386_softraid.c -.elif ${MACHINE} == "armv7" +.elif ${MACHINE} == "armv7" || ${MACHINE} == "arm64" SRCS += armv7_installboot.c .elif ${MACHINE} == "hppa" CFLAGS += -DBOOTSTRAP diff --git a/usr.sbin/installboot/armv7_installboot.c b/usr.sbin/installboot/armv7_installboot.c index 17fa948b90b..7242fbf00db 100644 --- a/usr.sbin/installboot/armv7_installboot.c +++ b/usr.sbin/installboot/armv7_installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armv7_installboot.c,v 1.2 2016/06/02 06:21:10 jsg Exp $ */ +/* $OpenBSD: armv7_installboot.c,v 1.3 2017/05/07 10:40:17 kettenis Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -182,6 +182,22 @@ write_efisystem(struct disklabel *dl, char part) goto umount; } +#ifdef __aarch64__ + /* + * Copy BOOTAA64.EFI to /efi/boot/bootaa64.efi. + */ + pathlen = strlen(dst); + if (strlcat(dst, "/bootaa64.efi", sizeof(dst)) >= sizeof(dst)) { + rslt = -1; + warn("unable to build /bootaa64.efi path"); + goto umount; + } + src = fileprefix(root, "/usr/mdec/BOOTAA64.EFI"); + if (src == NULL) { + rslt = -1; + goto umount; + } +#else /* * Copy BOOTARM.EFI to /efi/boot/bootarm.efi. */ @@ -196,6 +212,7 @@ write_efisystem(struct disklabel *dl, char part) rslt = -1; goto umount; } +#endif srclen = strlen(src); if (verbose) fprintf(stderr, "%s %s to %s\n", |