Age | Commit message (Collapse) | Author |
|
On some machines (and kernel trees), it has been found that the branch
count may resolve to an empty string.
With the current patch/branch tests, this causes a patch application
error due to comparisons resolving with no right or left hand side.
To protect against this, we can combine the conditions and protect the
counts with quotes. This doesn't resolve the root cause, but is a
better, defensive condition.
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Previously the patching tools would consider both system and user
supplied patches in the same manner .. they are simply a series of
patches to be applied to a branch, and that the scripts should determine
where in the series to start (based on what is already on the branch).
This detection was causing a few problems:
- time consuming
- starting in the middle of a series when intermediate patches were
merged to a branch.
To solve both the performance and start detection, we instead simply
note the transition from system (i.e. already defined features and
series) and user/recipe supplied patches. When the transition is noted,
the system will start pushing ALL patches without doing autoresume
detection.
Control in keeping the series up to date is passed to the user, and
consistent behaviour/performance is achieved.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The existing meta directory detection was failing when multiple
files with .meta* or meta* where at the top level of a repository.
With this chance we can sucessfully detect, and use a meta directory
without needing to manually specify it.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
We need to follow both parents in the history of a branch when dumping
the revision list. With merge commits, we may bring in a change from
multiple parent histories, and we should check both.
Without this patch, we may detect an invalid starting point to resume
a series.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
To allow wrapping utilities to detect errors, if a meta series is not
generated an exit code of 1 should be returned.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
With the split of kernel meta from the main repo, and the ability to
run the tools in various different orders, we need to ensure that all
the scripts handle the detectiona and setting of the meta directory
the same way.
With this, we've sync'd the final two scripts to that way of handling
meta dirs.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
configme relies on kgit-meta to gather fragments for processing.
To allow configuration of an external meta-data repository and non
build system use cases, we need a single script with no dependencies
or complex command lines.
By moving the fragment gathering routines into configme, we have the
first step in this process complte.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The various scripts in the kern-tools have grown slightly different
meta directory detection routines over time. This means that we are
not always consistent, and the checks are not as robust as possible.
As part of this change, we have a single (which to avoid including
a common kgit script and coupling the tools .. is repeated) routine
for detecting the meta branch.
This detection logs the result in a new file ".metadir", which
subsequent scripts can find, and use, thereby avoid repeating the same
check many times.
We also enhance the check to look for a sentinel file in a proper meta
directory, to avoid false positives when an unexpected kernel process
leaves an uncommitted directory in the kernel dir.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
We are allowed to restore a checkpoint multiple times, but detecting
if a checkpoint has already been restored depends on the proper meta
directory being checked.
In much the same way as other scripts, we should query the filesystem
for the right directory versus using a hardcoded default.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
In a similar way as commit 0768d697 [kgit-meta: dont run kgit-s2q for
non-leaf nodes], we can save even more processing time by not even
analysing and linking patches if we aren't on the leaf node of the
tree.
This early exit can save nearly 95% of the time required to "patch"
a tree when no changes are actually applied.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Much the same way that we save dropped configuration for later
reporting, we make a copy of non-hardware specifications with this
change.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
After a mismatch (a kernel configuration option that doesn't make the
final .config) is found, reporting tools may need access to the details
without needing to mine down into the configuration audit directory
structure.
To faciliate this, we make a copy of mismatch.cfg (and any other files
that we deem reportable) to the top level meta directory (along side
the meta-series).
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
When changing branches it used to be a purely addititive operation
if a branch existed. This is no longer the case, so we shouldn't
preserve the existig series file, but should instead clear the series
file, and let the patch routines add to it if required.
This was triggered by the patch optimization changes, that no longer
run do_patch if a leaf/final branch is not being processed.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
To ensure that all patche are considered and applied to the tree, we
pass --gen to kgit-meta when we know we are generating a tree from a
kernel meta data repository.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
When a history complete treegen is being performed, the meta data respository
is imported and its history grafted onto the kernel tree. When we operate in
this mode, the tree is then checkpoint restored before the generation of the
tree is performed.
A checkpointed restored tree has meta data in .$META, not $META. So we switch
to using the dot directory when this is detected.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
To speed up the processing of a meta-series, we can skip patch
validation on anything but the leaf branch, since we do not push
and propagate changes from sub branches to the final/BSP branch.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Before the kernel's meta data became an orphan branch, there was a mode
where the meta data could be merged into all branches. To determine if
meta data needed to be checked out, or not, a test was added to see if
the meta data branch was contained by all others.
This check adds 5 seconds each and every build. Since this mode is no
longer supported, we can save the time and delete the check.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
As part of generating a new tree we can gather the internal templates
and configuration blocks into a .rc file that can be queried by standard
git config commands.
kgit-feature generates that file:
% cd new-repo/.meta/
% kgit-feature -v -f -o cfg/kern-features.rc cfg/kernel-cache
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Instead of a cryptic error message, we can let the user know that we
haven't found any fragments .. and that likely means that there BSP is
not properly configured.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The previous technique of checking for the meta directory, meant that
only meta directories of the specific .meta* format could be found, and
if no dirs were present at all, a concerning warning was generated.
By syncing createme to use the same technique as the other scripts, and
using git to return untracked directories, we can locate the meta directory
no matter what name it takes.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
In order to limit the matching of path relocation and sanity checking to
actual directory divisions, we need to retain the trailing / on paths. We
really only care about // and other invalid characters.
Once we are sure the trailing / is present, we'll no longer match on
partial directory names when multiple directories contain a common
payth and final directory name.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
When a patch on the top of a branch shares a shortlog with a patch
further down in the queue, the default behaviour is to do a secondary
compare on the diffstat. If they don't match, we warn, but pick the
patch as the resume point anyway.
This behaviour is triggering some false positives, and hence patch
failures when the wrong fence post is picked.
We switch the default to only warn on this type of situation, and
if a resume really is intended the --fuzzy flag can be passed to
restore the old behaviour.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
generate_cfg was removed as a tool in [kern-tools: remove unused code, scripts and transition code]
but it is still referenced in the Makefile. We remove it from there to prevent installation
errors.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
With this change it is now possible to have a meta branch with meta data
in a directory that is not the same name as the branch.
The changes to three parts of the build are required to discover the name
of the meta directory by relying on the fact that in a clean/proper build
the meta directory is the only untracked, top level directory in the build.
As such, we can restore a checkpoint and then examine the build directory
to determine the meta directory name .. avoiding any new variables to
indicate this to the scripts and build system.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
If a build is repeatidly configured, we can end up with multiple revisions
in the kver variable. It can easily be avoided by ensuring the first command
overwrites the kver file, instead of always appending.
Reported-by: Lauri Pirttiaho <lapi@cw.fi>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
If a repository is generated with full meta data history, there are
extra artifcacts present due to the import and filtering of the data.
By moving directory names earlier, and forcing checkouts, we can ensure
that the checkpoint create and restore operations always work properly.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Instead of copying and doing a single large commit for kernel meta-data,
allow the full history of the meta-data to be imported into a new kernel
tree. This allows better development, since the logic behind any given
option is always available.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The regex that confirms that a found .scc target matches the target machine
is more specific than the regex that searches the .scc files. As a result,
we can match on the wrong target, and fail the second level check, which
results in an autogenerated (and likely bad) .scc file.
By anchoring the search regex with whitespace and the end of line, we'll
no longer mistake: "target-foo", when we are really looking for "target".
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
After we leave meta branch, it becomes .meta
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
|
|
chmod u+x merge_config.sh
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
|
|
The following commit removes the meta-series files that are required
for skipping the meta gen step, so that NOMETAGEN is no longer valid.
"It's dead code. The meta-series are gone, and will stay gone from the
tree":
commit b08749d4345506d442ac5196b20c003121c6aee6, "kgit-scc: remove -meta
files after consruction"
This is a partial revert of commit 02be3b5f102357a0c0b86f0861f0f16a9d6e5299,
"buildall: switch back to scc driven processing"
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
|
|
We only need to migrate a directory (and its subdirs) once. To improve
performance, we can check to see if a patch is present in the destination
directory structure, and if present, there's no need to do a migration.
Similarly, we can avoid adding duplicate patches, but still have them
processed, by checking for a patch being in a .scc file and only generating
if it isn't already described by a feature.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|