[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4CFDA7AF.2060201@gmail.com>
Date: Mon, 06 Dec 2010 19:19:11 -0800
From: Dirk Brandewie <dirk.brandewie@...il.com>
To: Sam Ravnborg <sam@...nborg.org>
CC: linux-kernel@...r.kernel.org, devicetree-discuss@...ts.ozlabs.org,
sodaville@...utronix.de, linuxppc-dev@...ts.ozlabs.org,
microblaze-uclinux@...e.uq.edu.au, linux-arch@...r.kernel.org,
mmarek@...e.cz
Subject: Re: [PATCH 1/4] of: Add support for linking device tree blobs into
vmlinux
On 12/06/2010 11:02 AM, Sam Ravnborg wrote:
> On Mon, Dec 06, 2010 at 09:35:59AM -0800, dirk.brandewie@...il.com wrote:
>> From: Dirk Brandewie<dirk.brandewie@...il.com>
>> -
>> +# DTC
>> +# ---------------------------------------------------------------------------
>> +
>> +# Generate an assembly file to wrap the output of the device tree compiler
>> +$(obj)/%.dtb.S: $(obj)/%.dtb
>> + @echo '#include<asm-generic/vmlinux.lds.h>'> $@
>> + @echo '.section .dtb.init.rodata,"a"'>> $@
>> + @echo '.balign STRUCT_ALIGNMENT'>> $@
>> + @echo '.global __dtb_$(*F)_begin'>> $@
>> + @echo '__dtb_$(*F)_begin:'>> $@
>> + @echo '.incbin "$<" '>> $@
>> + @echo '__dtb_$(*F)_end:'>> $@
>> + @echo '.global __dtb_$(*F)_end'>> $@
>> + @echo '.balign STRUCT_ALIGNMENT'>> $@
>> +
>
> If we really want this rule in Makefile.lib then at least make it less verbose,
> and more secure.
I started with the change in Makefile.lib because it made sense to me, is there
a more appropriate place for these rules/commands?
> Something like this:
> quiet_dt_S_dtb_cmd = DTB $@
> dt_S_dtb_cmd = \
> ( \
> @echo '#include<asm-generic/vmlinux.lds.h>'; \
> @echo '.section .dtb.init.rodata,"a"'; \
> @echo '.balign STRUCT_ALIGNMENT'; \
> echo '.global __dtb_$(*F)_begin'; \
> echo '__dtb_$(*F)_begin:'; \
> echo '.incbin "$<" '; \
> echo '__dtb_$(*F)_end:'; \
> echo '.global __dtb_$(*F)_end'; \
> echo '.balign STRUCT_ALIGNMENT'; \
> )> $@
>
> $(obj)/%.dtb.S: $(obj)/%.dtb
> $(call cmd,dt_S_dtb)
>
I will make the changes in next version.
>
>> +DTC = $(objtree)/scripts/dtc/dtc
>
> If this is the only spot where we use DTC then drop the variable.
>
>> +
>> +quiet_cmd_dtc = DTC $@
>> + cmd_dtc = $(DTC) -O dtb -o $@ -b 0 $(DTC_FLAGS) $<
>
>
>> +ooo
>
> What is the purpose of these "ooo"? A debugging left-over?
>
Yep sorry
>
> Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists