Skip to content

Commit

Permalink
sys-boot/m1n1: add 1.4.12
Browse files Browse the repository at this point in the history
Signed-off-by: Janne Grunau <[email protected]>
  • Loading branch information
jannau authored and chadmed committed Apr 29, 2024
1 parent d51e09a commit dbcaa40
Show file tree
Hide file tree
Showing 2 changed files with 63 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.11.tar.gz 825748 BLAKE2B 84f311b5da34cb0502103fd439a22ef068db7c77d25f6e4e2de539d23ed28d3468a554fae1905b99d09dc27391a797f6cbf88efbf1b4720dad13fe7b00bbe551 SHA512 38a7c7d3b11e8543a9f89afaca008ed711152f6d91f2ab20e6ce4023fa90cf1ba0b406bcf0ba033b500caaefcfe6aa35cbcdf9cbcbf976e642f7b1689187d8bb
DIST m1n1-1.4.12.tar.gz 836287 BLAKE2B 2c192294daaeb9371e98d1cda596e7fbadc3cb35021fbc527f70a1a8076f84afe391190a620deb007e837f1a97b1fe9ca36bc194d1173debaff3c9f269a3f4f9 SHA512 2537c06523e133c169cd8a21cce0f644d004c8d9aa25ea08a8c5f0781851f68f832b4ac44011f5541ad6ab61271ece7c9d7337fa252f068673850090622659f3
62 changes: 62 additions & 0 deletions sys-boot/m1n1/m1n1-1.4.12.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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
sys-apps/dtc"

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

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

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."
if [ -e "${ROOT}"/bin/update-m1n1 ]; then
ewarn "You need to remove /bin/update-m1n1."
fi
}

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 dbcaa40

Please sign in to comment.