diff --git a/main/postmarketos-mkinitfs/APKBUILD b/main/postmarketos-mkinitfs/APKBUILD index d6698b4e7..245e17ae8 100644 --- a/main/postmarketos-mkinitfs/APKBUILD +++ b/main/postmarketos-mkinitfs/APKBUILD @@ -1,5 +1,5 @@ pkgname=postmarketos-mkinitfs -pkgver=0.7.18 +pkgver=0.7.19 pkgrel=0 pkgdesc="Tool to generate initramfs images for postmarketOS" url="https://postmarketos.org" @@ -26,4 +26,4 @@ package() { sha512sums="8be7f29394f8cd4e1c4b93f018f6314350f7e37e20d242c97284c1b112a106f882318a101bc0c70b391590b969023901580c677ee9f869850e90e69171a44e80 init.sh.in 0a74a5be08ecc0e07ea4f4e361865327bf1e56006da0aa1bc2c5716ea2951dcdc9c9fcb9f5a6205aeedfff08e027b2bb44913c891378144d0fe264b53257f359 init_functions.sh -c9151771ffed846e88618e59e19f5bf6a9aa7d923de1194f3a9cd9d18fa3ed0d1e45622ecb81ef2d23295a25114dacf5cbdde5a23f8b4a376bf1f73cd8f3f0b3 mkinitfs.sh" +3f918f8b5967b73e507c2ddf36dccc24fee98298f05ca23e22605400de95137f8877e09769616e7db388557c645fb45c03e1e6b5bab815ec9f853c318f0431f1 mkinitfs.sh" diff --git a/main/postmarketos-mkinitfs/mkinitfs.sh b/main/postmarketos-mkinitfs/mkinitfs.sh index 1d3e1e83c..3527cafc6 100644 --- a/main/postmarketos-mkinitfs/mkinitfs.sh +++ b/main/postmarketos-mkinitfs/mkinitfs.sh @@ -261,6 +261,25 @@ create_bootimg() if [ "${deviceinfo_append_dtb}" == "true" ]; then kernelfile="${kernelfile}-dtb" fi + _second="" + if [ "${deviceinfo_bootimg_dtb_second}" == "true" ]; then + if [ -z "${deviceinfo_dtb}" ]; then + echo "ERROR: deviceinfo_bootimg_dtb_second is set, but" + echo "'deviceinfo_dtb' is missing. Set 'deviceinfo_dtb'" + echo "to the device tree blob for your device." + echo "See also: " + exit 1 + fi + dtb="/usr/share/dtb/${deviceinfo_dtb}.dtb" + _second="--second $dtb" + if ! [ -e "$dtb" ]; then + echo "ERROR: File not found: $dtb. Please set 'deviceinfo_dtb'" + echo "to the relative path to the device tree blob for your" + echo "device (without .dtb)." + echo "See also: " + exit 1 + fi + fi _dt="" if [ "${deviceinfo_bootimg_qcdt}" == "true" ]; then _dt="--dt /boot/dt.img" @@ -285,6 +304,7 @@ create_bootimg() --ramdisk_offset "${deviceinfo_flash_offset_ramdisk}" \ --tags_offset "${deviceinfo_flash_offset_tags}" \ --pagesize "${deviceinfo_flash_pagesize}" \ + ${_second} \ ${_dt} \ -o "${outfile/initramfs-/boot.img-}" || exit 1 if [ "${deviceinfo_bootimg_blobpack}" == "true" ]; then