2021-11-12 22:13:01 +00:00
|
|
|
# Maintainer: Alejandro Tafalla <atafalla@dnyon.com>
|
|
|
|
pkgname=lk2nd-msm8953
|
2023-04-29 08:39:23 +00:00
|
|
|
pkgver=0.3.3
|
2023-06-25 09:01:27 +00:00
|
|
|
pkgrel=1
|
2021-11-12 22:13:01 +00:00
|
|
|
pkgdesc="Secondary little kernel (lk) bootloader for msm8953 based devices"
|
|
|
|
arch="aarch64"
|
2022-05-04 20:21:22 +00:00
|
|
|
url="https://github.com/msm8953-mainline/lk2nd"
|
2021-11-12 22:13:01 +00:00
|
|
|
license="MIT AND GPL-2.0-only"
|
|
|
|
makedepends="dtc dtc-dev gcc-arm-none-eabi python3 py3-libfdt"
|
|
|
|
builddir="$srcdir"/lk2nd-$pkgver
|
2023-06-25 09:01:27 +00:00
|
|
|
source="lk2nd-$pkgver.tar.gz::https://github.com/msm8953-mainline/lk2nd/archive/refs/tags/$pkgver.tar.gz
|
|
|
|
o2.patch"
|
2021-11-12 22:13:01 +00:00
|
|
|
options="!check !archcheck !tracedeps !strip pmb:cross-native"
|
|
|
|
# This APKBUILD builds bare metal executable; options are very specific!
|
|
|
|
# * there are no tests (how do you even test the bootloader?);
|
|
|
|
# * binaries are "arch-independent"; aarch64 build also produces armv7 binary,
|
|
|
|
# because ARM CPUs boot in 32-bit mode;
|
|
|
|
# * there are no depends for bootloader, it's a kernel and OS in one binary;
|
|
|
|
# * stripping of unused sections is done in lk2nd's own ld script.
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# This builds baremetal executable; distro-specific compiler flags
|
|
|
|
# and optimizations can't be set by build system.
|
|
|
|
unset CFLAGS
|
|
|
|
unset CXXFLAGS
|
|
|
|
unset CPPFLAGS
|
|
|
|
unset LDFLAGS
|
|
|
|
unset CROSS_COMPILE
|
|
|
|
unset CC
|
|
|
|
unset CXX
|
|
|
|
|
|
|
|
# ccache and crossdirect "gcc"s are in PATH, get rid of them too,
|
|
|
|
# redefine PATH to be bare minimum
|
|
|
|
unset PATH
|
|
|
|
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
|
|
|
|
make TOOLCHAIN_PREFIX=arm-none-eabi- msm8953-secondary
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
# main package is empty
|
|
|
|
install -Dm644 "$builddir"/build-msm8953-secondary/lk2nd.img -t \
|
|
|
|
"$pkgdir"/boot
|
|
|
|
}
|
|
|
|
sha512sums="
|
2023-04-29 08:39:23 +00:00
|
|
|
9a55ebe30bfe2e232593edb2eddd7b6078980d2339131f2975e0a85545630b8d386c4af021bab488d4e098f1fb2d78b1059eea51e987490a3e1dfebd4ea11cf0 lk2nd-0.3.3.tar.gz
|
2023-06-25 09:01:27 +00:00
|
|
|
e4d2e116966485aca746bec5bf6ab9855514dc70dfb94ce3cdc9def01c5b36eeddc33e77bdbcfb8f6bb89bb0277fd6dd3e6f8066475dcfc5b5fcdec567af754b o2.patch
|
2021-11-12 22:13:01 +00:00
|
|
|
"
|