From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [RFC PATCH] kernel: add build support for device trees
Date: Mon, 13 May 2013 10:09:46 +0200 [thread overview]
Message-ID: <20130513080946.GG23679@pengutronix.de> (raw)
In-Reply-To: <1366384993-30020-1-git-send-email-h.feurstein@gmail.com>
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 <h.feurstein@gmail.com>
> ---
> 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
prev parent reply other threads:[~2013-05-13 8:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 15:23 Hubert Feurstein
2013-05-13 8:09 ` Michael Olbrich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130513080946.GG23679@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox