Skip to content

Commit c6f08a6

Browse files
committed
Run qemu with u-boot depending on UBOOT flag
1 parent 188a157 commit c6f08a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ ECHR ?= 1
400400
ROOT ?= /dev/vda
401401
RW ?= rw
402402
KASLR ?= 0
403+
UBOOT ?= 0
403404

404405
QEMU_KERNEL_CMDLINE := selinux=0
405406

@@ -415,6 +416,10 @@ QEMU_ARGS := \
415416
-echr $(ECHR) \
416417
$(QEMU_EXTRA_ARGS)
417418

419+
ifeq ($(UBOOT),1)
420+
QEMU_ARGS += -bios $(UBOOT_BIN)
421+
endif
422+
418423
ifneq ($(INITRD),)
419424
ifeq ($(INITRD),1)
420425
INITRD := $(CPIO_FILE)
@@ -469,6 +474,9 @@ endif
469474
QEMU_ARGS += -append "$(QEMU_KERNEL_CMDLINE) $(QEMU_EXTRA_KERNEL_CMDLINE)"
470475

471476
RUN_DEPS := $(QEMU_KERNEL_IMAGE)
477+
ifeq ($(UBOOT),1)
478+
RUN_DEPS += $(UBOOT_BIN)
479+
endif
472480

473481
# Make sure the modules directory exists, even if it's empty. Otherwise mount
474482
# will fail.

0 commit comments

Comments
 (0)