-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic Kconfig support for lima-guestagent #1790
Conversation
Makefile
Outdated
@@ -7,6 +7,9 @@ TAR ?= tar | |||
ZIP ?= zip | |||
PLANTUML ?= plantuml # may also be "java -jar plantuml.jar" if installed elsewhere | |||
|
|||
KCONFIG_CONF ?= conf | |||
KCONFIG_MCONF ?= mconf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These commands are rarely available on macOS, so I don't think we should depend on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alternative would be compile them from source in the project, which I would like to avoid.
There is a good rationale in https://github.com/WangNan0/kbuild-standalone (or use python?)
It is also only needed, if making major changes to the Kconfig file itself. Otherwise, edit .config
.
The format should be quite straight-forward, even if one needs to comment out - not set as 'n'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should just adopt vi .config
or ./configure --enable-XXX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding support for autoconf would require more infrastructure and generate more boilerplate, imho
We could remove the scary "DO NOT EDIT" comment, for instance python's @@ -1,9 +1,5 @@
-#
-# Automatically generated file; DO NOT EDIT.
-# Lima
-#
CONFIG_GUESTAGENT_OS_LINUX=y
CONFIG_GUESTAGENT_ARCH_X8664=y
CONFIG_GUESTAGENT_ARCH_AARCH64=y
CONFIG_GUESTAGENT_ARCH_ARMV7L=y
CONFIG_GUESTAGENT_ARCH_RISCV64=y It also has an alternative |
Making a homebrew "formula" for the kbuild-standalone programs could be a good idea? https://github.com/WangNan0/kbuild-standalone (which is GPLv2 licensed, like the kernel)
EDIT: Apparently they get a prefix added to them, when installed globally. Just like the "kconfig-conf" and "kconfig-mconf", from kconfig-frontends... But it is probably easier to just So changed the default to use those programs, instead of the ones in C... |
2ff856b
to
2be798c
Compare
2be798c
to
26f3a38
Compare
Changed it to look for all three systems, and to allow editing the |
help: | ||
@echo ' binaries - Build all binaries' | ||
@echo ' manpages - Build manual pages' | ||
|
||
exe: _output/bin/limactl$(exe) | ||
|
||
.PHONY: minimal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make minimal
should now generate a new .config
and run make binary
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not everything is configurable, and there is no mechanism for "host arch"
26f3a38
to
17c610d
Compare
I added some (very) basic help text, mostly because it was mentioned in the output and interface.
And the guiconfig/gconf/qconf was complaining, when there was a |
config.default
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fear this file to be misinterpreted as the default lima YAML config.
Can we just generate the default config with heredoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or put this file to somewhere like Makefile.d/
or Kconfig.d
/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed it to config.mk, hopefully there will be no confusion.
It is possible to edit this file (if not using kconfig tools).
The main difference is that it is checked into the repository.
To make user-specific config, it is better to edit .config
.
The default make target will copy config.mk, if it is missing.
It is also a problem that the python library does not implement |
17c610d
to
230c8cb
Compare
I updated the kconfig-frontends from v4.11 to v4.19, just in case. The old repo seemed missing? And the debian packaging only had an import of the generated files, not the original git sources. https://github.com/afbjorklund/kconfig-frontends
|
Refactor the list of helpers and lima-guestagent binaries. This makes it easier to make them into optional, later on. Signed-off-by: Anders F Björklund <[email protected]>
Make it possible to configure which guestagents to build. Regenerating config file requires kconfig or kbuild tools. Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
230c8cb
to
d41e74d
Compare
|
||
This requires kconfig tools installed, it is also possible to edit `.config`. | ||
The default configuration can be found in the file `config.mk` (make syntax). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraphs should be inside ## Kconfig tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was for the user that doesn't have any tools, but edits the config as text
This requires kconfig tools installed, it is also possible to edit `.config`. | ||
The default configuration can be found in the file `config.mk` (make syntax). | ||
|
||
## Kconfig tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Kconfig tools | |
## Kconfig tools (optional) |
Make it possible to choose which lima-guestagent binaries to build...
This makes it possible to have optional binaries, such as FreeBSD etc.
There is support for "make config":
And also for "make menuconfig":
It is possible to just edit the
.config
file (markedDO NOT EDIT
).Regenerating it requires one of the standalone Kconfig programs:
https://github.com/WangNan0/kbuild-standalone
https://packages.ubuntu.com/kconfig-frontends
https://pypi.org/project/kconfiglib
See also: https://www.kernel.org/doc/html/next/kbuild/kconfig-language.html