pmaports/main/dtbtool-sprd/APKBUILD
Henrik Grimler eed8631c02
main/dtbtool-sprd: fork and upgrade to 1.1.2 (MR 1864)
Fix error if -p arg or dtb dir do not end with /.

Currently, running

$ dtbTool-sprd -p "scripts/dtc" -o "arch/arm/boot/dt.img" "arch/arm/boot/dts/"

or

$ dtbTool-sprd -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/dts"

fails with something like
	DTB combiner:
	  Input directory: 'arch/arm/boot/dts/'
	  Output file: 'dt.img'
	Found file: sprd-scx20_sp7731ceb.dtb ... skip, failed to scan for 'sprd,sc-id =<' tag
	=> Found 0 unique DTB(s)

instead of succeeding with something like
	DTB combiner:
	  Input directory: 'arch/arm/boot/dts/'
	  Output file: 'dt.img'
	Found file: sprd-scx20_sp7731ceb.dtb ... chipset: 8830, platform: 1, rev: 131072
	=> Found 1 unique DTB(s)

	Generating master DTB... completed

The reason for the failure is that the tool tries to run external
commands and concatenates the path from the args, meaning that it
tries to run scripts/dtcdtc instead of scripts/dtc/dtc.
2021-01-15 00:06:39 +01:00

25 lines
783 B
Text

# Maintainer: Anri Dellal <anridellal@gmail.com>
pkgname=dtbtool-sprd
pkgver=1.1.2
pkgrel=0
pkgdesc="Tool for compiling a dtb.img for Spreadtrum SoC"
url="https://gitlab.com/Grimler/dtbtool-sprd"
arch="all"
license="MIT"
makedepends="dtc-dev"
options="!check" # There is no testsuite
source="
https://gitlab.com/Grimler/dtbtool-sprd/-/archive/v$pkgver/dtbtool-sprd-v$pkgver.tar.gz
"
builddir="dtbtool-sprd-v$pkgver"
build() {
gcc dtbtool.c -o dtbTool-sprd.o -c
gcc dtbTool-sprd.o -o dtbTool-sprd
}
package() {
install -Dm755 "$srcdir"/dtbtool-sprd-v$pkgver/dtbTool-sprd \
"$pkgdir"/usr/bin/dtbTool-sprd
}
sha512sums="3fe3398bf89a12f47b2dc409912dfac88413467e09af66244dcf359a30a220f5c44413458566f7d762bc4cfcbf1d3404dd74160617df8ef020fa383e53017c82 dtbtool-sprd-v1.1.2.tar.gz"