pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/dtc Add infrastructure for building dtb files...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/83758354bec5
branches:  trunk
changeset: 362794:83758354bec5
user:      jmcneill <jmcneill%pkgsrc.org@localhost>
date:      Thu May 25 21:39:57 2017 +0000

description:
Add infrastructure for building dtb files from linux kernel sources.

diffstat:

 sysutils/dtc/linux-distinfo |   6 ++++++
 sysutils/dtc/linux-dtb.mk   |  43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 0 deletions(-)

diffs (57 lines):

diff -r c9ed223d233a -r 83758354bec5 sysutils/dtc/linux-distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dtc/linux-distinfo       Thu May 25 21:39:57 2017 +0000
@@ -0,0 +1,6 @@
+$NetBSD: linux-distinfo,v 1.1 2017/05/25 21:39:57 jmcneill Exp $
+
+SHA1 (linux-4.11.3.tar.xz) = 75102241132b57fa4e9afcfe8d3a34a500073e1d
+RMD160 (linux-4.11.3.tar.xz) = d1449446ee25e9060390bcaa985c7fff41bc1777
+SHA512 (linux-4.11.3.tar.xz) = 835e65968059c2964ea6dd4239e48d44a21565ff112d63d864b032d947d50f6f4aa8af73852a58ddf1d80c763375adcf9663d8bc4da5155f96f85bfb5a25e606
+Size (linux-4.11.3.tar.xz) = 95543348 bytes
diff -r c9ed223d233a -r 83758354bec5 sysutils/dtc/linux-dtb.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dtc/linux-dtb.mk Thu May 25 21:39:57 2017 +0000
@@ -0,0 +1,43 @@
+# $NetBSD: linux-dtb.mk,v 1.1 2017/05/25 21:39:57 jmcneill Exp $
+
+LK_VERSION=    4.11.3
+PKGNAME=       dtb-${DTB_ARCH}-${DTB_DEVICE}-${LK_VERSION}
+DISTNAME=      linux-${LK_VERSION}
+CATEGORIES=    sysutils
+MASTER_SITES=  https://cdn.kernel.org/pub/linux/kernel/v4.x/
+EXTRACT_SUFX=  .tar.xz
+EXTRACT_ELEMENTS= \
+               linux-${LK_VERSION}/arch/${DTB_ARCH}/boot/dts \
+               linux-${LK_VERSION}/include
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://www.kernel.org/
+COMMENT=       DTB files for ${DTB_ARCH} ${DTB_DEVICE} based boards
+LICENSE=       gnu-gpl-v2
+
+DISTINFO_FILE= ${.CURDIR}/../../sysutils/dtc/linux-distinfo
+
+GENERATE_PLIST=        cd ${DESTDIR}${PREFIX};
+GENERATE_PLIST+=${FIND} * -type f | ${SORT};
+
+DTC=           ${LOCALBASE}/bin/dtc
+DTS_DIR=       ${WRKSRC}/arch/${DTB_ARCH}/boot/dts
+DTS_INC=       ${WRKSRC}/include
+DTS_ARCH_INC=  ${DTS_DIR}/include
+
+do-build:
+.for d in ${DTB_DTS}
+       ${CPP} -P -x assembler-with-cpp -I ${DTS_INC} -I ${DTS_ARCH_INC} \
+           -include ${DTS_DIR}/${d} /dev/null | \
+           ${DTC} -i ${DTS_INC} -i ${DTS_ARCH_INC} -I dts -O dtb \
+               -p 1024 -b 0 -o ${DTS_DIR}/${d:C/dts$/dtb/}
+.endfor
+
+do-install:
+.for d in ${DTB_DTS}
+       ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/dtb/${DTB_ARCH}
+       ${INSTALL_DATA} ${DTS_DIR}/${d:C/dts$/dtb/} \
+           ${DESTDIR}${PREFIX}/share/dtb/${DTB_ARCH}
+.endfor
+
+BUILD_DEPENDS+=        dtc>=1.4.2:../../sysutils/dtc



Home | Main Index | Thread Index | Old Index