Add infrastructure for building dtb files from linux kernel sources.
This commit is contained in:
parent
cdb3fe8ea0
commit
de246a6eb5
2 changed files with 49 additions and 0 deletions
6
sysutils/dtc/linux-distinfo
Normal file
6
sysutils/dtc/linux-distinfo
Normal file
|
@ -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
|
43
sysutils/dtc/linux-dtb.mk
Normal file
43
sysutils/dtc/linux-dtb.mk
Normal file
|
@ -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
|
||||
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
|
Loading…
Reference in a new issue