[LEDE-DEV] clarifying how trivial it is to define a couple new IMX6QDL targets
Florian Fainelli
f.fainelli at gmail.com
Sat Sep 30 09:29:18 PDT 2017
Le 09/30/17 à 05:16, Robert P. J. Day a écrit :
> On Fri, 29 Sep 2017, Florian Fainelli wrote:
>
>> On 09/29/2017 10:33 AM, Robert P. J. Day wrote:
>>>
>>> i was just looking at using latest LEDE to define a couple new
>>> IMX6QDL targets, and after a few minutes, it looks as if, at least
>>> to get a minimal bootable system and as long as i'm not doing
>>> anything drastically weird, it should be wickedly simple and i
>>> just want to verify that.
>>>
>>> it's all based on the fact that, with the current kernel, the
>>> only selection you need to make is CONFIG_SOC_IMX6Q, which will
>>> build a suitable kernel, whereupon the file
>>> arch/arm/boot/dts/Makefile contains the directive:
>>>
>>> dtb-$(CONFIG_SOC_IMX6Q) += \
>>> ... over 100 target dtb files ...
>>>
>>> under the circumstances, given that that single kernel is
>>> compatible with that many targets, it would appear that, as long
>>> as i don't care that 100+ other dtb files will be compiled, i can
>>> just add, under the LEDE directory
>>> target/linux/imx6/files-4.9/arch/arm/boot/dts, a couple new .dts
>>> files, like:
>>>
>>> acme_coyote_1.dts
>>> acme_coyote_2.dts
>>>
>>> and that's it.
>>>
>>> of course, there might be enhancements down the road but, for
>>> now, just to get something bootable, it seems all i need to do is
>>> patch a couple entries into arch/arm/boot/dts/Makefile, and add
>>> the dts files.
>>>
>>> am i understanding this correctly?
>>
>> As far as the kernel and DTS build is concerned that is pretty much
>> all that is needed, you will need a patch to
>> arch/arm/boot/dts/Makefile to make sure that your DTS get built into
>> a DTB AFAICT.
>
> right ... so all under target/linux/imx6/, i would do two things:
>
> 1) patch arch/arm/boot/dts/Makefile to add my new .dtb files to be
> built when CONFIG_SOC_IMX6Q (thereby building 105 .dtb files, not just
> the current 103 :-)
>
> 2) throw a couple new .dts files under
> files-4.9/arch/arch/arm/boot/dts
>
>> You will probably need to pair the DTS file(s) with an appropriate
>> change under target/linux/imx6/image/Makefile that adds a new
>> Device/acme-coyote1 and has at least a DEVICE_DTS :=
>> acme_coyote_1.dts to build a kernel with an appended DTB image.
>
> i was in fact wondering about that ... i can see the definition of a
> couple Ventana boards in that image/Makefile, and it may well become
> necessary to add entries for my new boards there at some point
> depending on customization. but if all i'm after right this minute is
> a generic kernel paired with my new .dtb files, i don't actually need
> to define my devices in that Makefile, do i? this is assuming that the
> generic build will give me just enough to boot, and i can worry about
> customization later.
You do need to define devices in that Makefile in order to create that
pairing, by default you would get just a zImage or uImage with no DTB
appended, and you would get individual DTBs files as well.
If that's what you are after, then that's fine, although you would still
want to have some Makefile rule that copies these DTBs from the kernel
build directory to bin/targets/ presumably to make things easier.
What most people usually want is to append the correct board-specific
DTB file with the generic zImage and package that as a board-specific
uImage because that's usually what u-boot wants/wanted.
--
Florian
More information about the Lede-dev
mailing list