Skip to content

Commit

Permalink
sys-boot/m1n1: add 1.4.15
Browse files Browse the repository at this point in the history
Signed-off-by: James Calligeros <[email protected]>
  • Loading branch information
chadmed committed Sep 20, 2024
1 parent 1d8611c commit 30fbda5
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys-boot/m1n1/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST m1n1-1.4.14.tar.gz 837044 BLAKE2B 9551175345947abd0890943795893fb4b9b88cbf6d262305e1a0ec56531493411930cbda6f649f7bbea90239640ccd95b96b4a310cc12bc74944983ddf5e7b97 SHA512 5fee4af23dab761b5ee72ef1ddef654e8c1addc8faecef5963b87d69da89739574a5fc541c9a779c257be08f8b15f2e4ba59cbaaaf765a6b82a0696469455e2e
DIST m1n1-1.4.15.tar.gz 839484 BLAKE2B 373c653f493998db1072ca957e54c24cbfe3869bb772c0b72a333b576d33bb993e0a93b9092ec288e1ffd8bafbe7a658c1c566799b9bec3dc05cd999485b5f71 SHA512 780a93597789894f2a4f8bf03fd95f4997be457a978a87fa18ca0c7edcdf0283e42b6dfdde5fae9d0fff2ae1c6971a565b31fedce8cf5f874efc818376329978
61 changes: 61 additions & 0 deletions sys-boot/m1n1/m1n1-1.4.15.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright 2022 James Calligeros <[email protected]>
# Distributed under the terms of the GNU General Public License v2

EAPI="7"

DESCRIPTION="Apple Silicon bootloader and experimentation playground"
HOMEPAGE="https://asahilinux.org/"
SRC_URI="https://github.com/AsahiLinux/m1n1/archive/refs/tags/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~arm64"
IUSE="clang"

BDEPEND="dev-build/make"

RDEPEND="
sys-boot/u-boot
|| (
sys-kernel/asahi-sources
sys-kernel/asahi-kernel
)
"

BDEPEND="${BDEPEND}
clang? ( sys-devel/clang )
"

PATCHES="
"${FILESDIR}/${PN}-1.4.14-simd-reg-fix.patch"
"

src_compile() {
cd "${S}" || die
if use clang; then
emake USE_CLANG=1 \
RELEASE=1 \
ARCH="${CHOST}-"
else
emake USE_CLANG=0 \
RELEASE=1 \
ARCH="${CHOST}-"
fi
}

src_install() {
dodir /usr/lib/asahi-boot
cp "${S}"/build/m1n1.bin "${ED}"/usr/lib/asahi-boot/m1n1.bin || die
}

pkg_postinst() {
elog "m1n1 has been installed at /usr/lib/asahi-boot/m1n1.bin"
elog "You must run update-m1n1 for the new version to be installed"
elog "in the ESP."
elog "Please see the Asahi Linux Wiki for more information."
}

pkg_postrm() {
elog "m1n1 has been removed from /usr/lib/asahi-boot/ but has not"
elog "been removed from the ESP. You need to do this manually, though"
elog "you really shouldn't."
}

0 comments on commit 30fbda5

Please sign in to comment.