The QT based xconfig util is broken for several reasons. 1. On systems with qt6 (which is a majority on modern distros), the qconf-cfg.sh script appends a c++17 flag to the output file, which makes the value of $(HOSTCXXFLAGS_qconf.o) - a multiline string. This causes problem during compiler invocation, thus we can observe: 'g++: fatal error: no input files' Flattening the HOSTCXXFLAGS_ with $strip function resolves the problem 2. The missing Qt's Meta-Object file "qconf-moc.cc", which should be autogenerated during build by invoking "moc" tool. The current set of recipes in Makefile.mk aren't triggering the moc generation. Explicitly adding "qconf-moc.o" target, with dependency on "qconf-moc.cc" resolves the problem. 3. "$(call if_changed,moc)" used to invoke "moc" tool isn't working, due to missing "if_changed" macro. Replace it with direct call to "cmd_moc" in "Makefile.real". Bringing the full implementation of "if_changed" seem to be impractical, as it uses too many dependent functions and macros. BUG=https://ticket.coreboot.org/issues/518 Change-Id: I7eb1e71aeb6a92b8d3c194a369bd3bd6dc708863 Signed-off-by: Dmytro Aleksandrov <alkersan@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/89006 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> |
||
|---|---|---|
| .. | ||
| lxdialog | ||
| patches | ||
| .gitignore | ||
| conf.c | ||
| confdata.c | ||
| description.md | ||
| expr.c | ||
| expr.h | ||
| gconf-cfg.sh | ||
| gconf.c | ||
| gconf.glade | ||
| images.c | ||
| images.h | ||
| internal.h | ||
| lexer.l | ||
| lexer.lex.c_shipped | ||
| list.h | ||
| lkc.h | ||
| lkc_proto.h | ||
| Makefile | ||
| Makefile.mk | ||
| mconf-cfg.sh | ||
| mconf.c | ||
| menu.c | ||
| merge_config.sh | ||
| mnconf-common.c | ||
| mnconf-common.h | ||
| nconf-cfg.sh | ||
| nconf.c | ||
| nconf.gui.c | ||
| nconf.h | ||
| parser.tab.c_shipped | ||
| parser.tab.h_shipped | ||
| parser.y | ||
| preprocess.c | ||
| qconf-cfg.sh | ||
| qconf.cc | ||
| qconf.h | ||
| README.md | ||
| regex.c | ||
| regex.h | ||
| streamline_config.pl | ||
| symbol.c | ||
| toada.c | ||
| util.c | ||
coreboot kconfig
This is coreboot's copy of kconfig which tracks Linux as upstream but comes with a few patches for portability but also a few semantic changes.
The patches that lead to this tree can be found in the patches/ subdirectory in a quilt friendly format that is also simple enough to manage manually with Unix tooling.
Updating kconfig
The first step is to unapply the patches. This can either be done with quilt
in an already-configured tree (quilt pop -a should cleanly unapply them all)
or manually if quilt doesn't have its tracking metadata around yet:
for i in $( ls patches/*.patch | tac ); do patch -p1 -R -i "$i"; done
The result should be a subtree that, apart from a few coreboot specific
files on our side (e.g. documentation, integration in our build system)
and a few files on the upstream end that we don't carry (e.g. the tests),
is identical to the scripts/kconfig/ directory of Linux as of the most recent
uprev we did. Check the uprev version by looking through
git log util/kconfig output in our tree.
Assuming that you want to uprev from Linux 5.13 to 5.14, with a Linux git tree
available in ~/linux
cd util/kconfig && (cd ~/linux/ && git diff v5.13..v5.14 scripts/kconfig) | patch -p2`
applies the changes to your local tree.
Then reapply our patch train, which might be as simple as
quilt push -a --refresh but might also require some meddling with the
patches to make them apply again with the changes you just imported from
Linux.
Check that kconfig still works, git add and git commit the changes and
write a meaningful commit message that documents what Linux kconfig version
the tree has been upreved to.
Adding a new patch
The format of the patches to kconfig is a mix of the headers produced by git format-patch and the patch format of quilt. However neither git nor quilt
seems to have any functionality to directly produce a file in such a format
To add a patch in this format:
-
Add your changes to the sources and
git committhem -
Generate a git patch for the commit:
$ git format-patch HEAD~
-
Reverse apply the newly created patch file to restore the tree back to the state quilt thinks it is in:
$ git apply -R
-
Import the patch info quilt:
$ quilt import
-
Force push the change to the top of quilt's patch stack (quilt won't like the git diff style and would normally refuse to apply the patch):
$ quilt push -f
-
Add the changed files to be tracked against the quilt:
$ quilt add
-
Re-apply your changes from the patch file:
$ git apply
-
Add the changes to quilt to regenerate the patch file in a quilt compatible format while keeping the git header:
$ quilt refresh
-
The new patch file and updated patches/series files can now be added to the git commit