* [PATCH] riscv: boot: Fix creation of loader.bin
@ 2023-10-24 14:53 Geert Uytterhoeven
2023-10-25 7:27 ` Damien Le Moal
2023-11-07 6:50 ` patchwork-bot+linux-riscv
0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-10-24 14:53 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang,
Alexandre Ghiti, Damien Le Moal, Song Shuai
Cc: linux-riscv, linux-kernel, Geert Uytterhoeven
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: 505b02957e74f0c5 ("riscv: Remove duplicate objcopy flag")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/riscv/boot/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile
index 22b13947bd131e84..8e7fc0edf21d3ece 100644
--- a/arch/riscv/boot/Makefile
+++ b/arch/riscv/boot/Makefile
@@ -17,6 +17,7 @@
KCOV_INSTRUMENT := n
OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
+OBJCOPYFLAGS_loader.bin :=-O binary
OBJCOPYFLAGS_xipImage :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
targets := Image Image.* loader loader.o loader.lds loader.bin
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] riscv: boot: Fix creation of loader.bin
2023-10-24 14:53 [PATCH] riscv: boot: Fix creation of loader.bin Geert Uytterhoeven
@ 2023-10-25 7:27 ` Damien Le Moal
2023-11-07 6:50 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2023-10-25 7:27 UTC (permalink / raw)
To: Geert Uytterhoeven, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Jisheng Zhang, Alexandre Ghiti, Song Shuai
Cc: linux-riscv, linux-kernel
On 10/24/23 23:53, Geert Uytterhoeven wrote:
> 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: 505b02957e74f0c5 ("riscv: Remove duplicate objcopy flag")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Looks OK to me.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] riscv: boot: Fix creation of loader.bin
2023-10-24 14:53 [PATCH] riscv: boot: Fix creation of loader.bin Geert Uytterhoeven
2023-10-25 7:27 ` Damien Le Moal
@ 2023-11-07 6:50 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-11-07 6:50 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-riscv, paul.walmsley, palmer, aou, jszhang, alexghiti,
dlemoal, songshuaishuai, linux-kernel
Hello:
This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:
On Tue, 24 Oct 2023 16:53:18 +0200 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- riscv: boot: Fix creation of loader.bin
https://git.kernel.org/riscv/c/57a4542cb7c9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-07 6:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-24 14:53 [PATCH] riscv: boot: Fix creation of loader.bin Geert Uytterhoeven
2023-10-25 7:27 ` Damien Le Moal
2023-11-07 6:50 ` patchwork-bot+linux-riscv
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox