Skip to content

Commit 5e49e0a

Browse files
committed
Allow customizing root and read-write kernel command line options
1 parent 0ba04cd commit 5e49e0a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ INITRD ?=
333333
RDINIT ?= /sbin/init
334334
QEMU_KERNEL_IMAGE ?= $(KERNEL_IMAGE)
335335
ECHR ?= 1
336+
ROOT ?= /dev/vda
337+
RW ?= rw
336338

337339
QEMU_ARGS := \
338340
-m $(MEM) \
@@ -353,7 +355,7 @@ ifneq ($(INITRD),)
353355
QEMU_ARGS += -initrd $(INITRD)
354356
else
355357
QEMU_ARGS += -drive file=$(ROOTFS),if=virtio,format=$(ROOTFS_FORMAT)
356-
QEMU_EXTRA_KERNEL_CMDLINE += root=/dev/vda rw
358+
QEMU_EXTRA_KERNEL_CMDLINE += root=$(ROOT) $(RW)
357359
endif
358360

359361
ifeq ($(GDB),1)
@@ -364,7 +366,7 @@ ifeq ($(ARCH),x86_64)
364366
QEMU_BIN := qemu-system-x86_64
365367
QEMU_ARGS += \
366368
-cpu kvm64,+smep,+smap \
367-
-append "8250.nr_uarts=1 console=ttyS0 selinux=0 kpti no5lvl $(QEMU_EXTRA_KERNEL_CMDLINE)"
369+
-append "console=ttyS0 selinux=0 kpti no5lvl $(QEMU_EXTRA_KERNEL_CMDLINE)"
368370

369371
# We can't use KVM with GitHub Actions CI
370372
ifneq ($(CI),true)

0 commit comments

Comments
 (0)