Skip to content

Commit

Permalink
Enable ALSA debug in kernel
Browse files Browse the repository at this point in the history
Now gets "virtio_snd: probe of virtio2 failed with error -2" in
dmesg.
  • Loading branch information
Cuda-Chen committed Sep 1, 2024
1 parent 78e0011 commit be7ad90
Show file tree
Hide file tree
Showing 8 changed files with 696 additions and 1,712 deletions.
23 changes: 21 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include mk/common.mk

CC ?= gcc
CFLAGS := -O2 -g -Wall -Wextra
CFLAGS += -include common.h
CFLAGS += -include common.h -I./cnfa

# clock frequency
CLOCK_FREQ ?= 65000000
Expand All @@ -13,6 +13,8 @@ OBJS_EXTRA :=
# command line option
OPTS :=

LDFLAGS :=

# virtio-blk
ENABLE_VIRTIOBLK ?= 1
$(call set-feature, VIRTIOBLK)
Expand Down Expand Up @@ -41,8 +43,20 @@ ifeq ($(call has, VIRTIONET), 1)
OBJS_EXTRA += virtio-net.o
endif

# virtio-snd
ENABLE_VIRTIOSND ?= 1
ifneq ($(UNAME_S),Linux)
ENABLE_VIRTIOSND := 0
endif
$(call set-feature, VIRTIOSND)
ifeq ($(call has, VIRTIOSND), 1)
OBJS_EXTRA += virtio-snd.o
LDFLAGS += -lasound
CFLAGS += -I/usr/local/include
endif

BIN = semu
all: $(BIN) minimal.dtb
all: cnfa_dep $(BIN) minimal.dtb

OBJS := \
riscv.o \
Expand All @@ -56,6 +70,11 @@ OBJS := \

deps := $(OBJS:%.o=.%.o.d)

cnfa_dep:
rm cnfa/CNFA_sf.h
make -C cnfa os_generic.h
make -C cnfa CNFA_sf.h

$(BIN): $(OBJS)
$(VECHO) " LD\t$@\n"
$(Q)$(CC) -o $@ $^ $(LDFLAGS)
Expand Down
3 changes: 3 additions & 0 deletions configs/buildroot.config
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ BR2_RELRO_NONE=y
# BR2_RELRO_PARTIAL is not set
# BR2_RELRO_FULL is not set
BR2_FORTIFY_SOURCE_1=y
BR2_PACKAGE_ALSA_UTILS=y
BR2_PACKAGE_ALSA_UTILS_APLAY=y
BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
# BR2_PACKAGE_URANDOM_SCRIPTS is not set
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_FULL=y
Expand Down
Loading

0 comments on commit be7ad90

Please sign in to comment.