From: Dirk Brandewie <dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: sodaville-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org
Subject: Re: [PATCH 2/4] of: Add support for linking device tree blobs into vmlinux
Date: Mon, 15 Nov 2010 08:37:02 -0800 [thread overview]
Message-ID: <4CE161AE.4030103@gmail.com> (raw)
In-Reply-To: <20101114052525.GC2355-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
On 11/13/2010 09:25 PM, Grant Likely wrote:
> On Thu, Nov 11, 2010 at 04:03:48PM -0800, dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
>> From: Dirk Brandewie<dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>
>> This patch adds support for linking device tree blobs into
>> vmlinux. The device tree blobs are placed in the init.data
>> section.
>>
>> Signed-off-by: Dirk Brandewie<dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>> include/asm-generic/vmlinux.lds.h | 13 ++++++++++++-
>> init/Kconfig | 7 +++++++
>> scripts/Makefile.lib | 14 ++++++++++++++
>> 3 files changed, 33 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
>> index bd69d79..c8f600e 100644
>> --- a/include/asm-generic/vmlinux.lds.h
>> +++ b/include/asm-generic/vmlinux.lds.h
>> @@ -146,6 +146,16 @@
>> #define TRACE_SYSCALLS()
>> #endif
>>
>> +#ifdef CONFIG_KERNEL_DTB
>> +#define KERNEL_DTB \
>
> To match other definitions in this file, this should be defined with
> parentheses: #define KERNEL_DTB()
>
>> + . = ALIGN(32); \
>> + VMLINUX_SYMBOL(__dtb_start) = .; \
>> + *(.dtb) \
>
> I wonder if .meminit.rodata.dtb be a better section name. Could use
> some input from more experienced kernel hackers here. hpa, what say
> you?
I will use what ever name seems reasonable, It turns out that the sections that
are named *.init.rodata are really in a R/W section :-( so that name is really a
misnomer. I will check with HPA on name again.
>
> Also, inconsistent indentation (mixed tabs and spaces).
>
will fix
>> + VMLINUX_SYMBOL(__dtb_end) = .;
>> +#else
>> +#define KERNEL_DTB
>> +#endif
>> +
>
> Does this need to be wrapped with CONFIG_KERNEL_DTB? Is there any
> downside to including these sections unconditionally?
>
Not sure I was just following the convention set by TRACE_SYSCALLS(),
BRANCH_PROFILE(), ...
>> /* .data section */
>> #define DATA_DATA \
>> *(.data) \
>> @@ -468,7 +478,8 @@
>> MCOUNT_REC() \
>> DEV_DISCARD(init.rodata) \
>> CPU_DISCARD(init.rodata) \
>> - MEM_DISCARD(init.rodata)
>> + MEM_DISCARD(init.rodata) \
>> + KERNEL_DTB
>>
>> #define INIT_TEXT \
>> *(.init.text) \
>> diff --git a/init/Kconfig b/init/Kconfig
>> index 88c1046..fddfc0f 100644
>> --- a/init/Kconfig
>> +++ b/init/Kconfig
>> @@ -1083,6 +1083,13 @@ config PCI_QUIRKS
>> bugs/quirks. Disable this only if your target machine is
>> unaffected by PCI quirks.
>>
>> +config KERNEL_DTB
>> + bool "Support linking a device tree blob into vmlinux"
>> + default n
>> + help
>> + This option provides support for adding a device tree blob(s)
>> + directly to vmlinux
>
> Inconsistent indentation. I'm also not convinced that this Kconfig
> symbol is really needed (as commented on above).
>
>> +
>> config SLUB_DEBUG
>> default y
>> bool "Enable SLUB debugging support" if EMBEDDED
>> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
>> index 4c72c11..c4487b2 100644
>> --- a/scripts/Makefile.lib
>> +++ b/scripts/Makefile.lib
>> @@ -200,6 +200,20 @@ quiet_cmd_gzip = GZIP $@
>> cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9> $@) || \
>> (rm -f $@ ; false)
>>
>> +# DTC
>> +# ---------------------------------------------------------------------------
>> +$(obj)/%.dtb.S: $(obj)/%.dtb FORCE
>> + @echo '.section .dtb,"a"'> $@
>> + @echo '.global __dtb_$(*F)_begin'>> $@
>> + @echo '__dtb_$(*F)_begin:'>> $@
>> + @echo '.incbin "$<" '>> $@
>> + @echo '__dtb_$(*F)_end:'>> $@
>> + @echo '.global __dtb_$(*F)_end'>> $@
>> +
>> +DTC = $(objtree)/scripts/dtc/dtc
>> +
>> +quiet_cmd_dtc = DTC $@
>> + cmd_dtc = $(DTC) -O dtb -o $(obj)/$*.dtb -b 0 $(dtstree)/$*.dts
>
> As already mentioned; need to rationalized these rule additions with
> the changes made in patch #1.
>
> g.
>
next prev parent reply other threads:[~2010-11-15 16:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 0:03 [PATCH 0/4] [RFC V4] Adding DTB to architecture independent vmlinux dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <cover.1289520079.git.dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-12 0:03 ` [PATCH 1/4] x86/of: Support building device tree blob(s) into image dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <1b004c685c67c07a5a0b2b16b3a00dd016e2b759.1289520079.git.dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-14 5:13 ` Grant Likely
2010-11-12 0:03 ` [PATCH 2/4] of: Add support for linking device tree blobs into vmlinux dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <7d0a9d70f1616340115c187547006c76b0135ca7.1289520079.git.dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-14 5:25 ` Grant Likely
[not found] ` <20101114052525.GC2355-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-11-15 16:37 ` Dirk Brandewie [this message]
[not found] ` <4CE161AE.4030103-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-15 21:27 ` [sodaville] " H. Peter Anvin
2010-11-12 0:03 ` [PATCH 3/4] of/dtc: force dtb size to modulo 32 bytes dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <a7e6885535e6c930560f3d79a8a55ae922499752.1289520079.git.dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-12 0:47 ` [sodaville] " H. Peter Anvin
[not found] ` <4CDC8EA3.6080608-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2010-11-12 1:01 ` Dirk Brandewie
[not found] ` <4CDC91DC.7030407-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-12 1:16 ` David Gibson
2010-11-12 16:24 ` Dirk Brandewie
[not found] ` <4CDD6A55.6040603-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-12 19:08 ` H. Peter Anvin
2010-11-12 22:20 ` Jon Loeliger
2010-11-14 0:44 ` David Gibson
2010-11-14 4:35 ` Grant Likely
2010-11-12 0:03 ` [PATCH 4/4] of/fdt: add kernel command line option for dtb_compat string dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <855a5a11d04a7c1883675b6a77992c4af85222fd.1289520079.git.dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-14 6:22 ` Grant Likely
2010-11-14 6:26 ` Stephen Neuendorffer
[not found] ` <2573ead1-944d-4ba5-ace3-12936693d872-RaUQJvECHiv5op9OF0Koj7jjLBE8jN/0@public.gmane.org>
2010-11-14 6:33 ` Grant Likely
[not found] ` <20101114062246.GD2355-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-11-16 0:27 ` H. Peter Anvin
[not found] ` <4CE1CFDA.7030900-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2010-11-16 6:34 ` Grant Likely
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=4CE161AE.4030103@gmail.com \
--to=dirk.brandewie-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=sodaville-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.