From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd: fdt: Use separate CMD_FDT Kconfig entry instead of OF_LIBFDT
Date: Wed, 6 Apr 2016 20:28:57 +0200 [thread overview]
Message-ID: <57055569.4050204@xilinx.com> (raw)
In-Reply-To: <CAK7LNATNiG=P2-WJiwohKfu0B_AKiaXO+o26gzKbapwrCGbbMA@mail.gmail.com>
On 6.4.2016 03:28, Masahiro Yamada wrote:
> Hi.
>
>
> 2016-04-06 4:09 GMT+09:00 Simon Glass <sjg@chromium.org>:
>> Hi Michal,
>>
>> On 5 April 2016 at 04:15, Michal Simek <michal.simek@xilinx.com> wrote:
>>> Hi Simon,
>>>
>>> On 5.4.2016 02:03, Simon Glass wrote:
>>>> Hi Michal,
>>>>
>>>> On 4 April 2016 at 11:50, Michal Simek <michal.simek@xilinx.com> wrote:
>>>>> Create CMD_FDT Kconfig entry to have an option to disable fdt command
>>>>> which is not required for small configuration which requires libfdt
>>>>> only.
>>>>> Enable it by default for all targets which enables OF_LIBFDT.
>>>>>
>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>> ---
>>>>>
>>>>> cmd/Kconfig | 7 +++++++
>>>>> cmd/Makefile | 2 +-
>>>>> 2 files changed, 8 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/cmd/Kconfig b/cmd/Kconfig
>>>>> index fe8b4f0510da..8703cdb4a9be 100644
>>>>> --- a/cmd/Kconfig
>>>>> +++ b/cmd/Kconfig
>>>>> @@ -173,6 +173,13 @@ config CMD_ELF
>>>>> help
>>>>> Boot an ELF/vxWorks image from the memory.
>>>>>
>>>>> +config CMD_FDT
>>>>> + bool "Flattened Device Tree utility commands"
>>>>> + default y
>>>>
>>>> Should that be:
>>>>
>>>> default y if OF_LIBFDT
>>>>
>>>> ?
>>>>
>>>>> + depends on OF_LIBFDT
>>>>> + help
>>>>> + Do FDT related setup before booting into the Operating System.
>>>>> +
>>>
>>>
>>> In recent commits to this file both formats are used.
>>>
>>> +config CMD_BLOCK_CACHE
>>> + bool "blkcache - control and stats for block cache"
>>> + depends on BLOCK_CACHE
>>> + default y if BLOCK_CACHE
>>>
>>> even looks non standard.
>>>
>>> +config CMD_BOOTEFI
>>> + bool "bootefi"
>>> + depends on EFI_LOADER
>>> + default y
>>>
>>> I am happy to change whatever style you prefer but I think it should be
>>> synchronized. The efi one was Reviewed by you. :-)
>>
>> I think Masahiro knows most about this. If it works it's fine with me.
>> The way you have it is more intuitive and I prefer it. But he did
>> point at a problem at some point.
>
>
> I think "depends on OF_LIBFDT"
> is correct in this case.
>
>
> do_fdt() calls fdt_fixup_memory(), which is defined in common/fdt_support.c,
> which is enabled by CONFIG_OF_LIBFDT.
>
> So, CMD_FDT should depend on OF_LIBFDT.
> Otherwise, "make menuconfig" would allow users
> to enable CMD_FDT without OF_LIBFDT,
> which would cause link error.
>
>
>> One other question - won't this disable the 'fdt' command for many boards?
>
>
> config CMD_FDT
> bool "Flattened Device Tree utility commands"
> default y
> depends on OF_LIBFDT
>
>
> "default y" cares about it.
> So, if CONFIG_OF_LIBFDT is enabled in the defconfig,
> CONFIG_CMD_FDT should be enabled as well.
>
>
>
> But the following 6 boards opt out of Kconfig.
> They define CONFIG_OF_LIBFDT in their config headers,
> so this patch would disable "fdt" command for them.
>
> include/configs/legoev3.h
> include/configs/ma5d4evk.h
> include/configs/pic32mzdask.h
> include/configs/stm32f746-disco.h
> include/configs/xilinx-ppc.h
> include/configs/zipitz2.h
>
>
>
> Could you move them to defconfigs?
>
I have sent v2 to address these. I have used buildman and there is up to
2k difference when symbol is in Kconfig. Not sure why but it shouldn't
be big deal.
Thanks,
Michal
next prev parent reply other threads:[~2016-04-06 18:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 17:50 [U-Boot] [PATCH] cmd: fdt: Use separate CMD_FDT Kconfig entry instead of OF_LIBFDT Michal Simek
2016-04-05 0:03 ` Simon Glass
2016-04-05 10:15 ` Michal Simek
2016-04-05 19:09 ` Simon Glass
2016-04-06 1:28 ` Masahiro Yamada
2016-04-06 18:28 ` Michal Simek [this message]
2016-04-09 18:36 ` Simon Glass
2016-04-11 14:41 ` Michal Simek
2016-04-11 14:43 ` Simon Glass
2016-04-11 14:48 ` Michal Simek
2016-04-11 14:50 ` Simon Glass
2016-04-11 14:59 ` Michal Simek
2016-04-20 14:40 ` Simon Glass
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=57055569.4050204@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=u-boot@lists.denx.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