main/lk2nd: add subpackage for quirky htc-memul (MR 4244)
htc-memul needs a special build with a different scratch address set. So generalize the build function so we can make multiple builds with parameters without duplicating too much code.
This commit is contained in:
parent
83f63d1c1b
commit
27be25f327
|
@ -1,7 +1,7 @@
|
|||
# Maintainer: Alexey Minnekhanov <alexeymin@postmarketos.org>
|
||||
pkgname=lk2nd
|
||||
pkgver=0.15.0
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Secondary little kernel (lk) bootloader for several Qualcomm devices"
|
||||
arch="armv7 aarch64"
|
||||
url="https://github.com/msm8916-mainline/lk2nd"
|
||||
|
@ -26,12 +26,13 @@ if [ "$CARCH" = "armv7" ]; then
|
|||
$subpackages
|
||||
$pkgname-msm8226
|
||||
$pkgname-msm8226-appended:msm8226_appended
|
||||
$pkgname-msm8226-htc-memul:msm8226_htc_memul
|
||||
$pkgname-msm8974
|
||||
$pkgname-msm8974-appended:msm8974_appended
|
||||
"
|
||||
fi
|
||||
|
||||
build() {
|
||||
_build() {
|
||||
# This builds baremetal executable; distro-specific compiler flags
|
||||
# and optimizations can't be set by build system.
|
||||
unset CFLAGS
|
||||
|
@ -47,10 +48,17 @@ build() {
|
|||
unset PATH
|
||||
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
make LK2ND_VERSION="$pkgver-r$pkgrel-postmarketos" TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msm8916
|
||||
local project="$1"; shift
|
||||
|
||||
make LK2ND_VERSION="$pkgver-r$pkgrel-postmarketos" TOOLCHAIN_PREFIX=arm-none-eabi- "$@" "$project"
|
||||
}
|
||||
|
||||
build() {
|
||||
_build lk2nd-msm8916
|
||||
if [ "$CARCH" = "armv7" ]; then
|
||||
make LK2ND_VERSION="$pkgver-r$pkgrel-postmarketos" TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msm8974
|
||||
make LK2ND_VERSION="$pkgver-r$pkgrel-postmarketos" TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msm8226
|
||||
_build lk2nd-msm8974
|
||||
_build lk2nd-msm8226
|
||||
_build lk2nd-msm8226 BOOTLOADER_OUT=htc-memul SCRATCH_ADDR=0x20000000 SCRATCH_ADDR_512MAP=0x20000000 SCRATCH_SIZE_512MAP=0x10000000
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -89,6 +97,11 @@ msm8226_appended() {
|
|||
"$subpkgdir"/boot/lk2nd.img
|
||||
}
|
||||
|
||||
msm8226_htc_memul() {
|
||||
install -Dm644 "$builddir"/htc-memul/build-lk2nd-msm8226/lk2nd.img \
|
||||
"$subpkgdir"/boot/lk2nd.img
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
60551065ea072257b459629ea2c555933fae97eef08e6bee5904aa3751cb67fa38125f89f8d7e06c6d9438b3783d81da428b3b428e46cf6bd8dae0ee9163c1b5 lk2nd-0.15.0.tar.gz
|
||||
"
|
||||
|
|
Loading…
Reference in New Issue
Block a user