diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index afae33812e4..acfdb9e167f 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -66,6 +66,6 @@ libs-y += arch/riscv/lib/
 ifdef CONFIG_EXAMPLES
 EXAMPLE_ARCH := riscv
 EXAMPLE_APPEND_DTB := y
-EXAMPLE_POST_LINK = @tools/prelink-riscv $@
+EXAMPLE_POST_LINK = $(if $(CONFIG_EFI_APP),,@tools/prelink-riscv $@)
 include scripts/Makefile.ulib-example
 endif
diff --git a/configs/efi-riscv_app64_defconfig b/configs/efi-riscv_app64_defconfig
index f18bfb653ad..d48ecf19585 100644
--- a/configs/efi-riscv_app64_defconfig
+++ b/configs/efi-riscv_app64_defconfig
@@ -52,4 +52,6 @@ CONFIG_CONSOLE_TRUETYPE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_CONSOLE_SCROLL_LINES=5
 CONFIG_FAT_WRITE=y
+CONFIG_ULIB=y
+CONFIG_EXAMPLES=y
 CONFIG_CMD_DHRYSTONE=y
