Skip to content

Commit 57a4542

Browse files
geertupalmer-dabbelt
authored andcommitted
riscv: boot: Fix creation of loader.bin
When flashing loader.bin for K210 using kflash:     [ERROR] This is an ELF file and cannot be programmed to flash directly: arch/riscv/boot/loader.bin Before, loader.bin relied on "OBJCOPYFLAGS := -O binary" in the main RISC-V Makefile to create a boot image with the right format. With this removed, the image is now created in the wrong (ELF) format. Fix this by adding an explicit rule. Fixes: 505b029 ("riscv: Remove duplicate objcopy flag") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Link: https://lore.kernel.org/r/1086025809583809538dfecaa899892218f44e7e.1698159066.git.geert+renesas@glider.be Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 9ba91d1 commit 57a4542

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/boot/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
KCOV_INSTRUMENT := n
1818

1919
OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
20+
OBJCOPYFLAGS_loader.bin :=-O binary
2021
OBJCOPYFLAGS_xipImage :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
2122

2223
targets := Image Image.* loader loader.o loader.lds loader.bin

0 commit comments

Comments
 (0)