pmb.aportgen.linux: build qcdt in package() (!1880)
Building the QCDT image in build() complicates use of envkernel.sh - in that case, make is done independently of the APKBUILD, and only the package() function is run to assemble the kernel package. Building it entirely in package() allows using envkernel.sh without having to set up some "post make script" (see https://wiki.postmarketos.org/wiki/Compiling_kernels_with_envkernel.sh#Post_make_scripts). package() might actually fit better in general, since QCDT is only a special "package" format for (multiple) DTB files at the end :)
This commit is contained in:
parent
21b4e04c77
commit
b0a664dc0e
|
@ -15,22 +15,13 @@ def generate_apkbuild(args, pkgname, deviceinfo, patches):
|
||||||
package = """
|
package = """
|
||||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor\""""
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor\""""
|
||||||
|
|
||||||
build = """
|
|
||||||
unset LDFLAGS
|
|
||||||
make ARCH="$_carch" CC="${CC:-gcc}" \\
|
|
||||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS\""""
|
|
||||||
|
|
||||||
if deviceinfo["bootimg_qcdt"] == "true":
|
if deviceinfo["bootimg_qcdt"] == "true":
|
||||||
makedepends += " dtbtool"
|
makedepends += " dtbtool"
|
||||||
|
|
||||||
build += """\n
|
|
||||||
# Generate master DTB (deviceinfo_bootimg_qcdt)
|
|
||||||
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/""" + carch + "/boot/dt.img\" \"arch/" + carch + "/boot/\""
|
|
||||||
|
|
||||||
package += """\n
|
package += """\n
|
||||||
# Master DTB (deviceinfo_bootimg_qcdt)
|
# Master DTB (deviceinfo_bootimg_qcdt)
|
||||||
install -Dm644 "$builddir/arch/""" + carch + """/boot/dt.img" \\
|
dtbTool -p scripts/dtc/ -o "arch/$_carch/boot"/dt.img "arch/$_carch/boot/"
|
||||||
"$pkgdir/boot/dt.img\""""
|
install -Dm644 "arch/$_carch/boot"/dt.img "$pkgdir"/boot/dt.img"""
|
||||||
|
|
||||||
content = """\
|
content = """\
|
||||||
# Contributor: Firstname Lastname <email> (CHANGEME!)
|
# Contributor: Firstname Lastname <email> (CHANGEME!)
|
||||||
|
@ -65,7 +56,10 @@ def generate_apkbuild(args, pkgname, deviceinfo, patches):
|
||||||
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {""" + build + """
|
build() {
|
||||||
|
unset LDFLAGS
|
||||||
|
make ARCH="$_carch" CC="${CC:-gcc}" \\
|
||||||
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {""" + package + """
|
package() {""" + package + """
|
||||||
|
|
Loading…
Reference in New Issue