Skip to content

Commit

Permalink
show kernel messages in verbose mode
Browse files Browse the repository at this point in the history
skips using "quiet" kernel parameter

introducing --verbose option
  • Loading branch information
adrianschroeter committed Jan 12, 2022
1 parent efeece0 commit 942d222
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
22 changes: 22 additions & 0 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ COPY_SOURCES_ASIS=
RECIPE_BUILD_START_TIME=
CCACHE_SETUP_START_TIME=

# set all verbose modes to off by default
BUILD_VERBOSE_VM=

# This is for insserv
export YAST_IS_RUNNING=instsys
# https://github.com/systemd/systemd/blob/master/docs/ENVIRONMENT.md
Expand Down Expand Up @@ -333,6 +336,10 @@ Known Parameters:
--emulator-script SCRIPT
specify another emulator instead of emulator.sh
--verbose CLASS
Verbose output, CLASS can be 'all' or a specific one:
vm: includes kernel and initrd messages
--vm-type TYPE
Use virtual machine instead of chroot
TYPE is one of xen|kvm|uml|qemu|lxc|zvm|openstack|ec2|docker|pvm|nspawn
Expand Down Expand Up @@ -1240,6 +1247,21 @@ while test -n "$1"; do
RSYNCDEST=$ARG
shift
;;
-verbose)
needarg
case "$ARGS" in
all)
BUILD_VERBOSE_VM=true
;;
vm)
BUILD_VERBOSE_VM=true
;;
*)
echo "WARNING: unknown verbose option $ARGS"
;;
esac
shift
;;
-uid)
needarg
if test -n "${ARG//[0-9:]/}" ; then
Expand Down
3 changes: 2 additions & 1 deletion build-vm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# so disabling spectre/meltdown mitigations doesn't hurt security and gains performance
vm_linux_kernel_parameter="mitigations=off"
# Make sure that dodgy kernels fail quickly and early
vm_linux_always_append="oops=panic panic=1 quiet"
vm_linux_always_append="oops=panic panic=1"

# guest visible devices
VM_ROOTDEV=/dev/hda1
Expand Down Expand Up @@ -101,6 +101,7 @@ vm_detach_swap() {
}

vm_fixup() {
test -z "$BUILD_VERBOSE_VM" && vm_linux_always_append="$vm_linux_always_append quiet"
vm_fixup_$VM_TYPE "$@"
}

Expand Down

0 comments on commit 942d222

Please sign in to comment.