Skip to content

Add support for --fb option (like --graphics but without X)#388

Open
intelfx wants to merge 4 commits intoarighi:mainfrom
intelfx:work/fb-console
Open

Add support for --fb option (like --graphics but without X)#388
intelfx wants to merge 4 commits intoarighi:mainfrom
intelfx:work/fb-console

Conversation

@intelfx
Copy link

@intelfx intelfx commented Dec 6, 2025

Add support for a --fb option that starts QEMU in a graphical mode but without actually launching any graphical environment. This is intended for working with the framebuffer console (or anything else that might be run on top of such).

Additionally, this makes a few changes that synergize with the one above:

  • the serial console is connected on stdout when (any) graphics are used
  • a single --verbose only enables loglevel=7 and --show-boot-console
  • a repeated --verbose is now required to also enable debug

…ting X

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
No functional change.

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
On single `--verbose`, only pass `loglevel=7` rather than `debug`.
On `--verbose --verbose`, pass `debug` as previously.

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Copy link
Owner

@arighi arighi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks interesting, do you have any special use case / example on how to use it? Also CI isn't happy, but should be an easy fix. Thanks!

)
g.add_argument(
"--verbose",
action="count",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need to accept multiple --verbose?

initrdpath = None

if args.verbose:
if args.verbose >= 2:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, multiple --verbose enable debug. I think this should go in a separate PR.

@intelfx
Copy link
Author

intelfx commented Dec 15, 2025

This looks interesting, do you have any special use case / example on how to use it?

I just made it for myself because I was trying to do something with fbcon. If you run vng --fb you get a framebuffer console in a GUI window and the kernel log on stderr.

I think this should go in a separate PR.

OK, I'll split off the --verbose changes. Do you want run: dump kernel console on stdout even if graphics are used here or in a separate PR as well?

@arighi
Copy link
Owner

arighi commented Dec 15, 2025

This looks interesting, do you have any special use case / example on how to use it?

I just made it for myself because I was trying to do something with fbcon. If you run vng --fb you get a framebuffer console in a GUI window and the kernel log on stderr.

Ack, another nice thing to do would be to enable the required CONFIG_* options in the default config to properly support --fb, see:

"##: Graphics support",

I think this should go in a separate PR.

OK, I'll split off the --verbose changes. Do you want run: dump kernel console on stdout even if graphics are used here or in a separate PR as well?

I think it's fine to include this commit in the current PR. Thanks!

Copy link
Collaborator

@matttbe matttbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Explicitly marking this PR as "Request Changes", because there are suggested changes.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants