main/lk2nd: make all subpackages install the same file (MR 2638)

We should always install lk image as /boot/lk2nd.img, even for
image with appended DTB (lk2nd-appended-dtb.img). pmbootstrap tooling
will expect it this way, and also it keeps all subpackages consistent,
while also making them conflict with each other.

Add new subpackages that are explicitly named -appended, but still
install the same file.

Each device should "know" which kind of LK image it needs and should
explicitly depends on specific variant.

Having only one file `/boot/lk2nd.img` will simplify many things,
for example we don't have to introduce new deviceinfo properties
to specify which image is needed (like if we installed both of them).

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
This commit is contained in:
Alexey Minnekhanov 2021-10-27 22:06:33 +03:00
parent df9d656df5
commit 75a251552e
No known key found for this signature in database
GPG key ID: 6FE3B029D9D9FAFF

View file

@ -1,11 +1,11 @@
# Maintainer: Alexey Minnekhanov <alexeymin@postmarketos.org>
pkgname=lk2nd
pkgver=0.10.0
pkgrel=1
pkgrel=2
pkgdesc="Secondary little kernel (lk) bootloader for several Qualcomm devices"
arch="armv7 aarch64"
url="https://github.com/msm8916-mainline/lk2nd"
license="MIT"
license="MIT AND GPL-2.0-only"
makedepends="dtc dtc-dev gcc-arm-none-eabi python3 py3-libfdt"
source="$pkgname-$pkgver.tar.gz::https://github.com/msm8916-mainline/lk2nd/archive/refs/tags/$pkgver.tar.gz"
options="!check !archcheck !tracedeps !strip pmb:cross-native"
@ -18,8 +18,9 @@ options="!check !archcheck !tracedeps !strip pmb:cross-native"
subpackages="
$pkgname-msm8916
$pkgname-msm8916-appended:msm8916_appended
$pkgname-msm8974
$pkgname-msm8226
$pkgname-msm8226-appended:msm8226_appended
"
build() {
@ -53,14 +54,19 @@ msm8916() {
"$subpkgdir"/boot
}
msm8916_appended() {
install -Dm644 "$builddir"/build-msm8916-secondary/lk2nd-appended-dtb.img \
"$subpkgdir"/boot/lk2nd.img
}
msm8974() {
install -Dm644 "$builddir"/build-msm8974-secondary/lk2nd.img -t \
"$subpkgdir"/boot
}
msm8226() {
msm8226_appended() {
install -Dm644 "$builddir"/build-msm8226-secondary/lk2nd-appended-dtb.img \
-t "$subpkgdir"/boot
"$subpkgdir"/boot/lk2nd.img
}
sha512sums="