riscv: merge two if-blocks for KBUILD_IMAGE
In arch/riscv/Makefile, KBUILD_IMAGE is assigned in two separate if-blocks. When CONFIG_XIP_KERNEL is disabled, the decision made by the first if-block is overwritten by the second one, which is redundant and unreadable. Merge the two if-blocks. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Link: https://lore.kernel.org/r/20240323113500.1249272-1-masahiroy@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
parent
3dfbd2d26b
commit
3b938e231b
@ -133,7 +133,15 @@ boot := arch/riscv/boot
|
|||||||
ifeq ($(CONFIG_XIP_KERNEL),y)
|
ifeq ($(CONFIG_XIP_KERNEL),y)
|
||||||
KBUILD_IMAGE := $(boot)/xipImage
|
KBUILD_IMAGE := $(boot)/xipImage
|
||||||
else
|
else
|
||||||
|
ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_ARCH_CANAAN),yy)
|
||||||
|
KBUILD_IMAGE := $(boot)/loader.bin
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_EFI_ZBOOT),)
|
||||||
KBUILD_IMAGE := $(boot)/Image.gz
|
KBUILD_IMAGE := $(boot)/Image.gz
|
||||||
|
else
|
||||||
|
KBUILD_IMAGE := $(boot)/vmlinuz.efi
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libs-y += arch/riscv/lib/
|
libs-y += arch/riscv/lib/
|
||||||
@ -153,17 +161,6 @@ endif
|
|||||||
vdso-install-y += arch/riscv/kernel/vdso/vdso.so.dbg
|
vdso-install-y += arch/riscv/kernel/vdso/vdso.so.dbg
|
||||||
vdso-install-$(CONFIG_COMPAT) += arch/riscv/kernel/compat_vdso/compat_vdso.so.dbg:../compat_vdso/compat_vdso.so
|
vdso-install-$(CONFIG_COMPAT) += arch/riscv/kernel/compat_vdso/compat_vdso.so.dbg:../compat_vdso/compat_vdso.so
|
||||||
|
|
||||||
ifneq ($(CONFIG_XIP_KERNEL),y)
|
|
||||||
ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_ARCH_CANAAN),yy)
|
|
||||||
KBUILD_IMAGE := $(boot)/loader.bin
|
|
||||||
else
|
|
||||||
ifeq ($(CONFIG_EFI_ZBOOT),)
|
|
||||||
KBUILD_IMAGE := $(boot)/Image.gz
|
|
||||||
else
|
|
||||||
KBUILD_IMAGE := $(boot)/vmlinuz.efi
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
BOOT_TARGETS := Image Image.gz loader loader.bin xipImage vmlinuz.efi
|
BOOT_TARGETS := Image Image.gz loader loader.bin xipImage vmlinuz.efi
|
||||||
|
|
||||||
all: $(notdir $(KBUILD_IMAGE))
|
all: $(notdir $(KBUILD_IMAGE))
|
||||||
|
Loading…
Reference in New Issue
Block a user