From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UbnpM-0006Ed-H0 for ptxdist@pengutronix.de; Mon, 13 May 2013 10:09:48 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1UbnpK-0004O9-Bx for ptxdist@pengutronix.de; Mon, 13 May 2013 10:09:46 +0200 Date: Mon, 13 May 2013 10:09:46 +0200 From: Michael Olbrich Message-ID: <20130513080946.GG23679@pengutronix.de> References: <1366384993-30020-1-git-send-email-h.feurstein@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1366384993-30020-1-git-send-email-h.feurstein@gmail.com> Subject: Re: [ptxdist] [RFC PATCH] kernel: add build support for device trees Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Fri, Apr 19, 2013 at 05:23:13PM +0200, Hubert Feurstein wrote: > This patch adds direct build support for device trees within the kernel tree. > Since kernel version 3.10 the ARM device trees can not be directly processed > by dtc anymore. They have to pass a CPP stage first. The kernel makefile > takes care about that. Actually, I'd like to keep the device tree a bit separate from the kernel, for various reasons. But this stuff needs to be cleaned up. I definitively want to get rid of the separate dtc. Is anyone actually using it? I think it is only needed for PPC pre 2.6.30 or something like that. I'm thinking of a separate dts package that (can?) use the same tarball+patches or something like that. Michael > Signed-off-by: Hubert Feurstein > --- > platforms/kernel.in | 18 ++++++++++++++++++ > rules/kernel.make | 11 ++++++++++- > 2 files changed, 28 insertions(+), 1 deletion(-) > > diff --git a/platforms/kernel.in b/platforms/kernel.in > index bf93a3a..8b28a16 100644 > --- a/platforms/kernel.in > +++ b/platforms/kernel.in > @@ -30,6 +30,24 @@ config KERNEL_MODULES_BUILD > string > default "modules" > > +config KERNEL_DTBS > + bool > + default n > + prompt "build device trees" > + > +config KERNEL_DTBS_BUILD > + prompt "list of device tree blobs" > + string > + depends on KERNEL_DTBS > + help > + e.g: imx6q-sabresd.dtb > + > +config KERNEL_DTBS_INSTALL > + bool > + default y > + prompt "Install device tree blobs into /boot" > + depends on KERNEL_DTBS > + > config KERNEL_VERSION > prompt "kernel version" > string > diff --git a/rules/kernel.make b/rules/kernel.make > index 9cf310d..28dbfab 100644 > --- a/rules/kernel.make > +++ b/rules/kernel.make > @@ -98,6 +98,8 @@ $(KERNEL_CONFIG): > @exit 1 > endif > > +KERNEL_DTBS_PATH := $(KERNEL_DIR)/arch/$(PTXCONF_KERNEL_ARCH_STRING)/boot/dts > +KERNEL_DTBS := $(call remove_quotes, $(PTXCONF_KERNEL_DTBS_BUILD)) > > # > # when compiling the rootfs into the kernel, we just include an empty > @@ -156,7 +158,8 @@ $(STATEDIR)/kernel.compile: > $(KERNEL_DIR)/usr/initramfs_data.cpio.* \ > $(KERNEL_DIR)/usr/.initramfs_data.cpio.* > @cd $(KERNEL_DIR) && $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) \ > - $(KERNEL_MAKEVARS) $(KERNEL_IMAGE) $(PTXCONF_KERNEL_MODULES_BUILD) > + $(KERNEL_MAKEVARS) $(KERNEL_IMAGE) $(PTXCONF_KERNEL_MODULES_BUILD) \ > + $(KERNEL_DTBS) > @$(call touch) > > endif # !PTXCONF_PROJECT_USE_PRODUCTION > @@ -200,6 +203,12 @@ ifdef PTXCONF_KERNEL_INSTALL > @$(call install_copy, kernel, 0, 0, 0644, $(KERNEL_IMAGE_PATH_y), /boot/$(KERNEL_IMAGE), n) > endif > > +ifdef PTXCONF_KERNEL_DTBS_INSTALL > + @for dtb in $(KERNEL_DTBS); do \ > + $(call install_copy, kernel, 0, 0, 0644, $(KERNEL_DTBS_PATH)/$${dtb}, /boot/$${dtb}, n); \ > + done > +endif > + > # install the ELF kernel image for debugging purpose > ifdef PTXCONF_KERNEL_VMLINUX > @$(call install_copy, kernel, 0, 0, 0644, $(KERNEL_DIR)/vmlinux, /boot/vmlinux, n) > -- > 1.8.1.3 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de