summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjmcneill <jmcneill@pkgsrc.org>2021-03-06 20:14:30 +0000
committerjmcneill <jmcneill@pkgsrc.org>2021-03-06 20:14:30 +0000
commitb42d1ea0641d8392d0167a87af6b0b6c33d405df (patch)
treefc1f53275465271b3788ba884631c3b4d64d4d17 /sysutils
parent20c570aa8d9b3f4b92c0c99ae99b901ba2bbfd17 (diff)
downloadpkgsrc-b42d1ea0641d8392d0167a87af6b0b6c33d405df.tar.gz
Initial import of preloader-m1 from Git.
Preloader M1 acts as a wrapper for Linux (and other operating systems) kernels on Apple M1 hardware and provides a trampoline for starting processor cores.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/preloader-m1/DESCR3
-rw-r--r--sysutils/preloader-m1/Makefile28
-rw-r--r--sysutils/preloader-m1/PLIST3
-rw-r--r--sysutils/preloader-m1/distinfo7
-rw-r--r--sysutils/preloader-m1/patches/patch-Makefile10
5 files changed, 51 insertions, 0 deletions
diff --git a/sysutils/preloader-m1/DESCR b/sysutils/preloader-m1/DESCR
new file mode 100644
index 00000000000..b52132b046d
--- /dev/null
+++ b/sysutils/preloader-m1/DESCR
@@ -0,0 +1,3 @@
+Preloader M1 acts as a wrapper for Linux (and other operating systems)
+kernels on Apple M1 hardware and provides a trampoline for starting
+processor cores.
diff --git a/sysutils/preloader-m1/Makefile b/sysutils/preloader-m1/Makefile
new file mode 100644
index 00000000000..7b725ac8a60
--- /dev/null
+++ b/sysutils/preloader-m1/Makefile
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.1 2021/03/06 20:14:30 jmcneill Exp $
+
+PKGNAME= preloader-m1-0.0.20210220
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_GITHUB:=corellium/}
+GITHUB_PROJECT= preloader-m1
+GITHUB_TAG= 32c0b02c2a3d78e90bb4712094fa26d1b6ac6cae
+DISTNAME= preloader-m1-${GITHUB_TAG}
+EXTRACT_SUFX= .tar.gz
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://github.com/corellium/preloader-m1/
+COMMENT= Preloader for OS images on Apple M1 SoCs
+LICENSE= modified-bsd
+
+USE_TOOLS+= gmake
+
+BUILD_DEPENDS+= cross-aarch64-none-elf-gcc-[0-9]*:../../cross/aarch64-none-elf-gcc
+MAKE_ENV+= CROSS_COMPILE=${PREFIX}/cross-aarch64-none-elf/bin/aarch64-none-elf-
+BUILD_TARGET= machopack preboot.bin
+
+INSTALLATION_DIRS= bin share/preloader-m1
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/machopack ${DESTDIR}${PREFIX}/bin/machopack
+ ${INSTALL_DATA} ${WRKSRC}/preboot.bin ${DESTDIR}${PREFIX}/share/preloader-m1
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/preloader-m1/PLIST b/sysutils/preloader-m1/PLIST
new file mode 100644
index 00000000000..fa0e2bfb712
--- /dev/null
+++ b/sysutils/preloader-m1/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2021/03/06 20:14:30 jmcneill Exp $
+bin/machopack
+share/preloader-m1/preboot.bin
diff --git a/sysutils/preloader-m1/distinfo b/sysutils/preloader-m1/distinfo
new file mode 100644
index 00000000000..68af1fce03a
--- /dev/null
+++ b/sysutils/preloader-m1/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2021/03/06 20:14:30 jmcneill Exp $
+
+SHA1 (preloader-m1-32c0b02c2a3d78e90bb4712094fa26d1b6ac6cae-32c0b02c2a3d78e90bb4712094fa26d1b6ac6cae.tar.gz) = b62ca7f44b889dd900bfa6f54b1cb929f6484872
+RMD160 (preloader-m1-32c0b02c2a3d78e90bb4712094fa26d1b6ac6cae-32c0b02c2a3d78e90bb4712094fa26d1b6ac6cae.tar.gz) = f5b5f88a9df17b630f2fe5bd76f49e0b35d29922
+SHA512 (preloader-m1-32c0b02c2a3d78e90bb4712094fa26d1b6ac6cae-32c0b02c2a3d78e90bb4712094fa26d1b6ac6cae.tar.gz) = ec113920fcf2658e88599d8c084ebed8d84b0b98d73b7178f24e74b3cf82b23522a5471123a79eebe0c6d3ad27fd08deced5f8810a167fb79a784cf294d542bb
+Size (preloader-m1-32c0b02c2a3d78e90bb4712094fa26d1b6ac6cae-32c0b02c2a3d78e90bb4712094fa26d1b6ac6cae.tar.gz) = 26445 bytes
+SHA1 (patch-Makefile) = 8740b9cac0c09252fee9d445648ce6c6cc3549d2
diff --git a/sysutils/preloader-m1/patches/patch-Makefile b/sysutils/preloader-m1/patches/patch-Makefile
new file mode 100644
index 00000000000..be084febd98
--- /dev/null
+++ b/sysutils/preloader-m1/patches/patch-Makefile
@@ -0,0 +1,10 @@
+$NetBSD: patch-Makefile,v 1.1 2021/03/06 20:14:30 jmcneill Exp $
+
+--- Makefile.orig 2021-02-20 17:24:43.000000000 +0000
++++ Makefile
+@@ -1,4 +1,4 @@
+-AA64 = /opt/cross/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-elf/bin/aarch64-elf-
++AA64 = $(CROSS_COMPILE)
+ AA64CFLAGS = -Os -Wall -std=c99 -fno-builtin -fno-common -fno-pic -fno-unwind-tables -fomit-frame-pointer -fno-dwarf2-cfi-asm -mgeneral-regs-only
+
+ all: linux.macho