Re: [U-Boot] [RFC PATCH v1 0/1] Migrate IMAGE_FORMAT_LEGACY to Kconfig

2018-04-20 Thread Tom Rini
On Fri, Apr 20, 2018 at 10:46:00AM +0100, Alex Kiernan wrote:
> On Fri, Apr 20, 2018 at 5:23 AM, Alex Kiernan  wrote:
> > On Thu, Apr 19, 2018 at 8:39 PM, Tom Rini  wrote:
> >> On Thu, Apr 19, 2018 at 04:52:30AM +, Alex Kiernan wrote:
> >>>
> >>> On the face of it, this is a straightforward moveconfig, but because
> >>> of how CONFIG_FIT_SIGNATURE, CONFIG_IMAGE_FORMAT_LEGACY and
> >>> CONFIG_DISABLE_IMAGE_LEGACY interacted when you enabled
> >>> CONFIG_FIT_SIGNATURE, you got CONFIG_IMAGE_FORMAT_LEGACY disabled
> >>> immediately unless you had some way of explicitly enabling it
> >>> elsewhere.
> >>>
> >>> Kconfig doesn't give us this - CONFIG_IMAGE_FORMAT_LEGACY starts off
> >>> enabled, CONFIG_FIT_SIGNATURE starts off disabled and if you enable
> >>> CONFIG_FIT_SIGNATURE then CONFIG_IMAGE_FORMAT_LEGACY stays enabled.
> >>>
> >>> Is there some way to preserve the existing behaviour through Kconfig
> >>> that I've failed to figure out?
> >>
> >> When I do these, it's a multi-step moveconfig.py that goes something
> >> like:
> >> - Introduce FOO (no deps)
> >> - moveconfig.py -y it.
> >> - Introduce BAR (no deps)
> >> - moveconfig.py -y it.
> >> - for FILE in configs/*defconfig;do grep -q FOO $FILE || echo '#
> >>   CONFIG_FOO is not set' >> $FILE;done
> >> - Repeat the for loop but for BAR.
> >> - Introduce deps
> >> - moveconfig.py -sC
> >> - Build before/after for a few boards that I know are tricky, use
> >>   buildman -SCvel/Ssdel to confirm size changes didn't happen.
> >> - If good, world-build checking sizes.
> >>
> >> And in some cases like this particular one, there might need to be an
> >> initial first comment to invert the logic, and as that can be tricky
> >> when adding a new option that _should_ be default y, first I add it
> >> without default y, moveconfig.py -y it, for loop like above, then add
> >> default y and moveconfig.py -s.
> >>
> >
> > Thanks, let me give that a go...
> >
> 
> Having gone through that piece by piece, I'm pretty sure that
> moveconfig has actually done the right thing. We've these
> configurations which enable FIT_SIGNATURE without IMAGE_FORMAT_LEGACY:
> 
> am335x_boneblack_vboot_defconfig
> conga-qeval20-qa3-e3845_defconfig
> conga-qeval20-qa3-e3845-internal-uart_defconfig
> controlcenterdc_defconfig
> dfi-bt700-q7x-151_defconfig
> minnowmax_defconfig
> sandbox64_defconfig
> sandbox_defconfig
> sandbox_flattree_defconfig
> sandbox_noblk_defconfig
> sandbox_spl_defconfig
> som-db5800-som-6867_defconfig
> theadorable-x86-conga-qa3-e3845_defconfig
> theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig
> theadorable-x86-dfi-bt700_defconfig
> 
> And checking each of them, they're IMAGE_FORMAT_LEGACY disabled after
> the conversion.
> 
> I'll hang fire on sending a non-RFC v2 to see if there's any more comments.

I think you have it right as well, thanks!

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RFC PATCH v1 0/1] Migrate IMAGE_FORMAT_LEGACY to Kconfig

2018-04-20 Thread Alex Kiernan
On Fri, Apr 20, 2018 at 5:23 AM, Alex Kiernan  wrote:
> On Thu, Apr 19, 2018 at 8:39 PM, Tom Rini  wrote:
>> On Thu, Apr 19, 2018 at 04:52:30AM +, Alex Kiernan wrote:
>>>
>>> On the face of it, this is a straightforward moveconfig, but because
>>> of how CONFIG_FIT_SIGNATURE, CONFIG_IMAGE_FORMAT_LEGACY and
>>> CONFIG_DISABLE_IMAGE_LEGACY interacted when you enabled
>>> CONFIG_FIT_SIGNATURE, you got CONFIG_IMAGE_FORMAT_LEGACY disabled
>>> immediately unless you had some way of explicitly enabling it
>>> elsewhere.
>>>
>>> Kconfig doesn't give us this - CONFIG_IMAGE_FORMAT_LEGACY starts off
>>> enabled, CONFIG_FIT_SIGNATURE starts off disabled and if you enable
>>> CONFIG_FIT_SIGNATURE then CONFIG_IMAGE_FORMAT_LEGACY stays enabled.
>>>
>>> Is there some way to preserve the existing behaviour through Kconfig
>>> that I've failed to figure out?
>>
>> When I do these, it's a multi-step moveconfig.py that goes something
>> like:
>> - Introduce FOO (no deps)
>> - moveconfig.py -y it.
>> - Introduce BAR (no deps)
>> - moveconfig.py -y it.
>> - for FILE in configs/*defconfig;do grep -q FOO $FILE || echo '#
>>   CONFIG_FOO is not set' >> $FILE;done
>> - Repeat the for loop but for BAR.
>> - Introduce deps
>> - moveconfig.py -sC
>> - Build before/after for a few boards that I know are tricky, use
>>   buildman -SCvel/Ssdel to confirm size changes didn't happen.
>> - If good, world-build checking sizes.
>>
>> And in some cases like this particular one, there might need to be an
>> initial first comment to invert the logic, and as that can be tricky
>> when adding a new option that _should_ be default y, first I add it
>> without default y, moveconfig.py -y it, for loop like above, then add
>> default y and moveconfig.py -s.
>>
>
> Thanks, let me give that a go...
>

Having gone through that piece by piece, I'm pretty sure that
moveconfig has actually done the right thing. We've these
configurations which enable FIT_SIGNATURE without IMAGE_FORMAT_LEGACY:

am335x_boneblack_vboot_defconfig
conga-qeval20-qa3-e3845_defconfig
conga-qeval20-qa3-e3845-internal-uart_defconfig
controlcenterdc_defconfig
dfi-bt700-q7x-151_defconfig
minnowmax_defconfig
sandbox64_defconfig
sandbox_defconfig
sandbox_flattree_defconfig
sandbox_noblk_defconfig
sandbox_spl_defconfig
som-db5800-som-6867_defconfig
theadorable-x86-conga-qa3-e3845_defconfig
theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig
theadorable-x86-dfi-bt700_defconfig

And checking each of them, they're IMAGE_FORMAT_LEGACY disabled after
the conversion.

I'll hang fire on sending a non-RFC v2 to see if there's any more comments.

-- 
Alex Kiernan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RFC PATCH v1 0/1] Migrate IMAGE_FORMAT_LEGACY to Kconfig

2018-04-19 Thread Alex Kiernan
On Thu, Apr 19, 2018 at 8:39 PM, Tom Rini  wrote:
> On Thu, Apr 19, 2018 at 04:52:30AM +, Alex Kiernan wrote:
>>
>> On the face of it, this is a straightforward moveconfig, but because
>> of how CONFIG_FIT_SIGNATURE, CONFIG_IMAGE_FORMAT_LEGACY and
>> CONFIG_DISABLE_IMAGE_LEGACY interacted when you enabled
>> CONFIG_FIT_SIGNATURE, you got CONFIG_IMAGE_FORMAT_LEGACY disabled
>> immediately unless you had some way of explicitly enabling it
>> elsewhere.
>>
>> Kconfig doesn't give us this - CONFIG_IMAGE_FORMAT_LEGACY starts off
>> enabled, CONFIG_FIT_SIGNATURE starts off disabled and if you enable
>> CONFIG_FIT_SIGNATURE then CONFIG_IMAGE_FORMAT_LEGACY stays enabled.
>>
>> Is there some way to preserve the existing behaviour through Kconfig
>> that I've failed to figure out?
>
> When I do these, it's a multi-step moveconfig.py that goes something
> like:
> - Introduce FOO (no deps)
> - moveconfig.py -y it.
> - Introduce BAR (no deps)
> - moveconfig.py -y it.
> - for FILE in configs/*defconfig;do grep -q FOO $FILE || echo '#
>   CONFIG_FOO is not set' >> $FILE;done
> - Repeat the for loop but for BAR.
> - Introduce deps
> - moveconfig.py -sC
> - Build before/after for a few boards that I know are tricky, use
>   buildman -SCvel/Ssdel to confirm size changes didn't happen.
> - If good, world-build checking sizes.
>
> And in some cases like this particular one, there might need to be an
> initial first comment to invert the logic, and as that can be tricky
> when adding a new option that _should_ be default y, first I add it
> without default y, moveconfig.py -y it, for loop like above, then add
> default y and moveconfig.py -s.
>

Thanks, let me give that a go...

There's a second concern I have once the pieces are all in there when
you're making changes through menuconfig (and friends)... there's no
"weak" default enable in Kconfig (at least as far as I can tell) so if
you select FIT_SIGNATURE, you have to explicitly go and de-select
IMAGE_FORMAT_LEGACY.

Am I missing something, or can we live with that?

-- 
Alex Kiernan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RFC PATCH v1 0/1] Migrate IMAGE_FORMAT_LEGACY to Kconfig

2018-04-19 Thread Tom Rini
On Thu, Apr 19, 2018 at 04:52:30AM +, Alex Kiernan wrote:
> 
> On the face of it, this is a straightforward moveconfig, but because
> of how CONFIG_FIT_SIGNATURE, CONFIG_IMAGE_FORMAT_LEGACY and
> CONFIG_DISABLE_IMAGE_LEGACY interacted when you enabled
> CONFIG_FIT_SIGNATURE, you got CONFIG_IMAGE_FORMAT_LEGACY disabled
> immediately unless you had some way of explicitly enabling it
> elsewhere.
> 
> Kconfig doesn't give us this - CONFIG_IMAGE_FORMAT_LEGACY starts off
> enabled, CONFIG_FIT_SIGNATURE starts off disabled and if you enable
> CONFIG_FIT_SIGNATURE then CONFIG_IMAGE_FORMAT_LEGACY stays enabled.
> 
> Is there some way to preserve the existing behaviour through Kconfig
> that I've failed to figure out?

When I do these, it's a multi-step moveconfig.py that goes something
like:
- Introduce FOO (no deps)
- moveconfig.py -y it.
- Introduce BAR (no deps)
- moveconfig.py -y it.
- for FILE in configs/*defconfig;do grep -q FOO $FILE || echo '#
  CONFIG_FOO is not set' >> $FILE;done
- Repeat the for loop but for BAR.
- Introduce deps
- moveconfig.py -sC
- Build before/after for a few boards that I know are tricky, use
  buildman -SCvel/Ssdel to confirm size changes didn't happen.
- If good, world-build checking sizes.

And in some cases like this particular one, there might need to be an
initial first comment to invert the logic, and as that can be tricky
when adding a new option that _should_ be default y, first I add it
without default y, moveconfig.py -y it, for loop like above, then add
default y and moveconfig.py -s.

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [RFC PATCH v1 0/1] Migrate IMAGE_FORMAT_LEGACY to Kconfig

2018-04-18 Thread Alex Kiernan

On the face of it, this is a straightforward moveconfig, but because
of how CONFIG_FIT_SIGNATURE, CONFIG_IMAGE_FORMAT_LEGACY and
CONFIG_DISABLE_IMAGE_LEGACY interacted when you enabled
CONFIG_FIT_SIGNATURE, you got CONFIG_IMAGE_FORMAT_LEGACY disabled
immediately unless you had some way of explicitly enabling it
elsewhere.

Kconfig doesn't give us this - CONFIG_IMAGE_FORMAT_LEGACY starts off
enabled, CONFIG_FIT_SIGNATURE starts off disabled and if you enable
CONFIG_FIT_SIGNATURE then CONFIG_IMAGE_FORMAT_LEGACY stays enabled.

Is there some way to preserve the existing behaviour through Kconfig
that I've failed to figure out?

Green Travis build:

https://travis-ci.org/akiernan/u-boot/builds/368366062


Alex Kiernan (1):
  Migrate IMAGE_FORMAT_LEGACY to Kconfig

 Kconfig| 10 ++
 README | 13 -
 configs/ids8313_defconfig  |  1 +
 configs/imx6dl_icore_nand_defconfig|  1 +
 configs/imx6q_icore_nand_defconfig |  1 +
 configs/imx6qdl_icore_mipi_defconfig   |  1 +
 configs/imx6qdl_icore_mmc_defconfig|  1 +
 configs/imx6qdl_icore_nand_defconfig   |  1 +
 configs/imx6qdl_icore_rqs_defconfig|  1 +
 configs/imx6ul_geam_mmc_defconfig  |  1 +
 configs/imx6ul_geam_nand_defconfig |  1 +
 configs/imx6ul_isiot_emmc_defconfig|  1 +
 configs/imx6ul_isiot_nand_defconfig|  1 +
 configs/syzygy_hub_defconfig   |  1 +
 configs/zynq_cc108_defconfig   |  1 +
 configs/zynq_microzed_defconfig|  1 +
 configs/zynq_z_turn_defconfig  |  1 +
 configs/zynq_zc702_defconfig   |  1 +
 configs/zynq_zc706_defconfig   |  1 +
 configs/zynq_zc770_xm010_defconfig |  1 +
 configs/zynq_zc770_xm011_defconfig |  1 +
 configs/zynq_zc770_xm011_x16_defconfig |  1 +
 configs/zynq_zc770_xm012_defconfig |  1 +
 configs/zynq_zc770_xm013_defconfig |  1 +
 configs/zynq_zed_defconfig |  1 +
 configs/zynq_zybo_defconfig|  1 +
 include/config_fallbacks.h |  8 
 include/configs/ids8313.h  |  2 --
 include/configs/imx6-engicam.h |  5 -
 include/configs/wb50n.h|  2 --
 include/configs/zynq-common.h  |  3 ---
 scripts/config_whitelist.txt   |  2 --
 32 files changed, 34 insertions(+), 35 deletions(-)

-- 
2.7.4

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot