I have acquired a dts file and don't know what to do with it. In the linux-huawei-angler APKBUILD, package() looks like this:
package() {
install -Dm644 "$srcdir/build/arch/arm64/boot/Image.gz-dtb" \
"$pkgdir/boot/vmlinuz-$_flavor"
install -D "$srcdir/build/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
}
I changed it to this for linux-huawei-kiwi APKBUILD:
package() {
install -Dm644 "$ksrcdir/arch/arm64/boot/dts/qcom/huawei_kiw_l21_vc.dts" \
"$pkgdir/boot/vmlinuz-$_flavor"
install -D "$srcdir/build/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
}
But that is wrong. I think this file is appropriate for my device, so what does package() have to look like in my APKBUILD?
You'll have to either append the .dtb to the kernel image before the install call in the package function or let the kernel makefile put all generated .dts files in /lib/somewhere and add the filename for the dtb in the deviceinfo.
The first option is the most used one currently since those kernels only work with a single kernel anyway, the second option is used by linux-postmarketos to be able to use the kernel with multiple .dtb files for different devices.
An example of the manually append dtb option is the asus-flo: https://github.com/postmarketOS/pmbootstrap/blob/3fb17225f6eeb68411b15c42d5b5bd028982e83c/aports/device/linux-asus-flo/APKBUILD#L62-L66
Example of how its done in linux-postmarketos, installing the .dtb files in the kernel package:
https://github.com/postmarketOS/pmbootstrap/blob/3fb17225f6eeb68411b15c42d5b5bd028982e83c/aports/device/linux-asus-flo/APKBUILD#L62-L66
And selecting the correct dtb in the device package:
https://github.com/postmarketOS/pmbootstrap/blob/3fb17225f6eeb68411b15c42d5b5bd028982e83c/aports/device/device-nokia-rx51/deviceinfo#L11
(that makes the nokia-rx51 device use the omap3-n900.dtb file from the kernel)
@fyfyone The Nexus 6P kernel's build process creates an arch/arm64/boot/Image.gz-dtb file with the dtb already appended to the kernel, so angler's package just uses that. Your kernel also seems to do the same.
Two great answers! Please comment if you have more questions and we'll reopen this.