Skip to content

Commit 37809df

Browse files
Christoph Hellwigpalmer-dabbelt
authored andcommitted
riscv: create a loader.bin boot image for Kendryte SoC
Create the loader.bin bootable image file that can be loaded into Kendryte K210 based boards using the kflash.py tool with the command: kflash.py/kflash.py -t arch/riscv/boot/loader.bin Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Anup Patel <[email protected]> Reviewed-by: Palmer Dabbelt <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent aa10eb6 commit 37809df

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

arch/riscv/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ PHONY += vdso_install
8383
vdso_install:
8484
$(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@
8585

86-
ifeq ($(CONFIG_RISCV_M_MODE),y)
87-
KBUILD_IMAGE := $(boot)/loader
86+
ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_KENDRYTE),yy)
87+
KBUILD_IMAGE := $(boot)/loader.bin
8888
else
8989
KBUILD_IMAGE := $(boot)/Image.gz
9090
endif
91-
BOOT_TARGETS := Image Image.gz loader
91+
BOOT_TARGETS := Image Image.gz loader loader.bin
9292

9393
all: $(notdir $(KBUILD_IMAGE))
9494

arch/riscv/boot/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ $(obj)/Image.lzma: $(obj)/Image FORCE
4141
$(obj)/Image.lzo: $(obj)/Image FORCE
4242
$(call if_changed,lzo)
4343

44+
$(obj)/loader.bin: $(obj)/loader FORCE
45+
$(call if_changed,objcopy)
46+
4447
install:
4548
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
4649
$(obj)/Image System.map "$(INSTALL_PATH)"

0 commit comments

Comments
 (0)