Skip to content
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

Makefile: add boot_gfx target #286

Merged
merged 1 commit into from
Aug 27, 2023

Conversation

wipawel
Copy link
Contributor

@wipawel wipawel commented Aug 23, 2023

This can be used to boot KTF under QEMU with display.

@wipawel wipawel added devel Development effort build infra Build infrastructure issue or change labels Aug 23, 2023
@wipawel wipawel requested a review from a team as a code owner August 23, 2023 08:57
Copy link
Contributor

@sktt sktt left a comment

Choose a reason for hiding this comment

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

Shouldn't default be nogfx? Alternatively, could we also have boot_debug use nogfx too?

Copy link
Contributor

@minipli-oss minipli-oss left a comment

Choose a reason for hiding this comment

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

I agree with #286 (review), nogfx should still be the default, so the change should be something along the lines (completely untested!):

diff --git a/Makefile b/Makefile
index 318a04e44a7c..ba034d3eb359 100644
--- a/Makefile
+++ b/Makefile
@@ -254,9 +254,11 @@ ifeq ($(HAVE_KVM), kvm)
 QEMU_PARAMS += -enable-kvm
 endif # HAVE_KVM
 QEMU_PARAMS += -m 128
-QEMU_PARAMS += -display none -vga none -vnc none
 QEMU_PARAMS += -serial stdio
 QEMU_PARAMS += -smp cpus=2
+QEMU_PARAMS_NOGFX := -display none -vga none -vnc none
+QEMU_PARAMS += $(QEMU_PARAMS_NOGFX)
+QEMU_PARAMS_GFX := $(subst $(QEMU_PARAMS_NOGFX),,$(QEMU_PARAMS))
 
 QEMU_PARAMS_KERNEL := -append "param1 param2 param3"
 QEMU_PARAMS_DEBUG := -s &
@@ -281,6 +283,11 @@ boot: $(ISO_FILE)
        @echo "QEMU START"
        $(VERBOSE) $(QEMU_BIN) -cdrom $(ISO_FILE) $(QEMU_PARAMS)
 
+.PHONY: boot_gfx
+boot_gfx: $(ISO_FILE)
+       @echo "QEMU START"
+       $(VERBOSE) $(QEMU_BIN) -cdrom $(ISO_FILE) $(QEMU_PARAMS_GFX)
+
 .PHONY: boot_debug
 boot_debug: $(ISO_FILE)
        $(QEMU_BIN) -cdrom $(ISO_FILE) $(QEMU_PARAMS) $(QEMU_PARAMS_DEBUG)

@wipawel
Copy link
Contributor Author

wipawel commented Aug 27, 2023

Shouldn't default be nogfx? Alternatively, could we also have boot_debug use nogfx too?

Ok, I fixed it as you suggested with the code minipli proposed.

@wipawel wipawel enabled auto-merge (rebase) August 27, 2023 10:17
sktt
sktt previously approved these changes Aug 27, 2023
This can be used to boot KTF under QEMU with display.

Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
@wipawel wipawel disabled auto-merge August 27, 2023 12:13
@wipawel wipawel merged commit 7f9fe2c into KernelTestFramework:mainline Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build infra Build infrastructure issue or change devel Development effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants