From: Schrempf Frieder <frieder.schrempf@kontron.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Buildman Kconfig issue with consecutive builds
Date: Thu, 7 Nov 2019 19:14:02 +0000 [thread overview]
Message-ID: <45d62bc8-49d0-63cd-059c-56dfc337e103@kontron.de> (raw)
In-Reply-To: <CAPnjgZ1ZyNtCakby-O54Z5aPBvtzBag_42sHz4g-MWfF4y1mUw@mail.gmail.com>
Hi Simon,
On 07.11.19 17:23, Simon Glass wrote:
> Hi Schrempf,
>
> On Thu, 7 Nov 2019 at 08:15, Schrempf Frieder
> <frieder.schrempf@kontron.de> wrote:
>>
>> On 07.11.19 15:02, Bin Meng wrote:
>>> Hi Frieder,
>>>
>>> On Thu, Nov 7, 2019 at 9:28 PM Schrempf Frieder
>>> <frieder.schrempf@kontron.de> wrote:
>>>>
>>>> Hi Bin,
>>>>
>>>> On 07.11.19 13:41, Bin Meng wrote:
>>>>> Hi Schrempf,
>>>>>
>>>>> On Thu, Nov 7, 2019 at 12:17 AM Schrempf Frieder
>>>>> <frieder.schrempf@kontron.de> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm having some trouble using buildman to test the impact of some
>>>>>> Kconfig cleanup patches ([1]).
>>>>>>
>>>>>> The patches introduce a new CONFIG_SPL_* option and I try to find out
>>>>>> which defconfigs need to be fixed, by comparing build sizes.
>>>>>>
>>>>>> Now when I added a patch to fix a defconfig I noticed that buildman
>>>>>> wouldn't report the expected size changes and upon looking more closely
>>>>>> I found that the added Kconfig options are still missing in u-boot-spl.cfg.
>>>>>>
>>>>>> The strange thing is, that when I try to build only the last commit then
>>>>>> the Kconfig options are there, which is why I suspect a bug in buildman
>>>>>> not handling Kconfig changes correctly with consecutive builds.
>>>>>>
>>>>>> Can anyone have a look what is wrong or how I can debug this issue?
>>>>>>
>>>>>> The issue can be reproduced with the branch at [1], running:
>>>>>>
>>>>>> buildman -b spi_flash_kconfig_cleanup_3 --step 0 xilinx_zynqmp_virt
>>>>>>
>>>>>
>>>>> Could you please add "-C" to the buildman command line and have a try?
>>>>
>>>> Indeed forcing the reconfig between the build steps with '-C' fixes the
>>>> issue.
>>>>
>>>> Is it a known problem, that buildman doesn't handle Kconfig changes
>>>> correctly without '-C' in some cases?
>>>
>>> AFAIK, this is an intended design of calling buildman w/o '-C' to save
>>> some build time.
>>
>> Ok, if that's the case I will try to come up with a patch that adds a
>> note to the README. This has cost me a few hours because I was thinking
>> buildman does the right thing and Kconfig options are messed up somewhere.
>
> An incremental build means that it does not run 'make xxx_defconfig'
> on every commit. Doing it this way saves *a lot* of time for large
> builds and the main purpose of buildman is to validate that U-Boot
> builds.
>
> However it might be possible to have it both ways...the code fragment
> below compares the Kconfig files and configs/ directory against the
> data of the 'u-boot' output file, and could trigger a full rebuild if
> newer.
Ok, thanks for the explanation.
>
> If you have time (sounds like you do!), you could incorporate that
> into buildman.
It's kind of funny that you got the impression, that I have time ;)
Actually I do not have much time to work on U-Boot in general among all
the other things.
And now I went deep down into the rabbit hole from "I want to get some
boards upstreamed" to "I need to port a QSPI controller driver first" to
"the driver port affects existing CONFIG options that are a total mess
and need to be fixed" to "I need to run buildman on my cleanup patches"
to "buildman could need some tweaking".
So unless there will be a lot of rainy weekends, I probably won't start
working on optimizing buildman ;)
Regards,
Frieder
>
> files = ['%s/u-boot' % outdir]
> if os.path.exists(files[0]):
> if options.incremental:
> cmd = ['find', 'configs/', '-cnewer', files[0]]
> result = cros_build_lib.RunCommand(cmd, capture_output=True, **kwargs)
> if result.output:
> logging.warning('config/ dir has changed - dropping -i')
> options.incremental = False
>
> if options.incremental:
> cmd = ['find', '.', '-name', 'Kconfig', '-and', '-cnewer', files[0]]
> result = cros_build_lib.RunCommand(cmd, capture_output=True, **kwargs)
> if result.output:
> logging.warning('Kconfig file(s) changed - dropping -i')
> options.incremental = False
>
>
> The current logic is in RunJob() and do_config is the thing that
> causes a reconfig.
>
> Regards,
> Simon
>
next prev parent reply other threads:[~2019-11-07 19:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 16:16 [U-Boot] Buildman Kconfig issue with consecutive builds Schrempf Frieder
2019-11-07 7:30 ` Schrempf Frieder
2019-11-07 12:41 ` Bin Meng
2019-11-07 13:28 ` Schrempf Frieder
2019-11-07 14:02 ` Bin Meng
2019-11-07 15:15 ` Schrempf Frieder
2019-11-07 16:23 ` Simon Glass
2019-11-07 19:14 ` Schrempf Frieder [this message]
2019-11-07 19:19 ` 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=45d62bc8-49d0-63cd-059c-56dfc337e103@kontron.de \
--to=frieder.schrempf@kontron.de \
--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