lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 13 Oct 2015 10:24:14 -0500
From:	Rob Herring <robh@...nel.org>
To:	Michael Ellerman <mpe@...erman.id.au>
Cc:	Rob Herring <robh@...nel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Grant Likely <grant.likely@...aro.org>,
	Frank Rowand <frowand.list@...il.com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Olof Johansson <olof@...om.net>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH v2 12/13] powerpc: enable building of all dtbs

On Mon, Oct 12, 2015 at 5:26 AM, Michael Ellerman <mpe@...erman.id.au> wrote:
> On Thu, 2015-10-08 at 12:53 -0500, Rob Herring wrote:
>> Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
>> are not really dependent on a platform being enabled or any other kernel
>> config, so for testing coverage it is convenient to build all of the dtbs.
>> This builds all dts files in the tree, not just targets listed.
>>
>> Supporting this requires adding 'dtbs' make target which was not yet
>> supported on powerpc.
>
> I'm not entirely clear why we want this? It just means we can test build all
> the dts regardless of what kernel config we are building?

Yes. Given that I haven't found any that didn't build, that alone is
probably not so important. There's also an effort to move DT binding
docs to YAML, and I'm using dtc to dump out binding information to
automatically populate the binding docs hence I need to build all.
Eventually, we also plan to use the binding docs to validate dts
files.

> Have you tested the powerpc build with this applied or do you want me to?

Yes, I've tested powerpc.

>
>> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
>> index b9b4af2..0ec35ff 100644
>> --- a/arch/powerpc/Makefile
>> +++ b/arch/powerpc/Makefile
>> @@ -273,6 +273,11 @@ bootwrapper_install:
>>  %.dtb: scripts
>>       $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
>>
>> +PHONY += dtbs
>> +
>> +dtbs: prepare scripts
>> +     $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot)/dts
>
> The ARCH should be powerpc, I guess you just copied the one above.

Okay, I'll drop it (it should already be set).

>
>> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
>> index 4eec430..381df1a 100644
>> --- a/arch/powerpc/boot/Makefile
>> +++ b/arch/powerpc/boot/Makefile
>> @@ -402,7 +402,7 @@ zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
>>  clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
>>       zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
>>       zImage.miboot zImage.pmac zImage.pseries \
>> -     zImage.maple simpleImage.* otheros.bld *.dtb
>> +     zImage.maple simpleImage.* otheros.bld
>
> This looks like we used to clean *.dtb in the current dir but now we don't? But
> I'm probably just not understanding how clean-files works.

dtbs target is building in boot/dts. I just noticed that %.dtb targets
(or dtbImage.% targets) still build in boot/. I need to move them to
boot/dts/ as well to align with all other arches. This clean should
probably stay so dtbs get cleaned in either location.

>
>> @@ -410,6 +410,9 @@ clean-kernel += $(addsuffix .gz,$(clean-kernel))
>>  # If not absolute clean-files are relative to $(obj).
>>  clean-files += $(addprefix $(objtree)/, $(clean-kernel))
>>
>> +# Let clean descend into subdirs
>> +subdir- := dts
>> +
>>  WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
>>  WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
>>  WRAPPER_BINDIR := /usr/sbin
>> diff --git a/arch/powerpc/boot/dts/Makefile b/arch/powerpc/boot/dts/Makefile
>> new file mode 100644
>> index 0000000..f121775
>> --- /dev/null
>> +++ b/arch/powerpc/boot/dts/Makefile
>> @@ -0,0 +1,5 @@
>> +dtstree              := $(srctree)/$(src)
>> +dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
>> +
>> +always               := $(dtb-y)
>
> How/is that different from just doing the more normal:
>
> obj-$(CONFIG_OF_ALL_DTBS) := ...
>
> ?

obj-y will build the dtb into the kernel which some arches do and not
what we want here.

Rob
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ