Skip to contentSkip to conversation

scripts/package: buildtar: Output as vmlinuz for riscv

PATCH In review Matt Coster 3 participants 5 messages Mar 21, 2024 – Mar 26, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/package: buildtar: Output as vmlinuz for riscv

From: Karolis Mituzas <[email protected]>

This matches the behavior for arm64 [1] and prevents clobbering of vmlinux-${KERNELRELEASE}.

[1]: commit 0df57d90bfd6 ("kbuild: buildtar: add arm64 support")

Fixes 7d0bc44bd0ea ("kbuild: buildtar: add riscv support")
---
 scripts/package/buildtar | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/package/buildtar +1 -1
index 72c91a1b832f..a36aca2a27cc 100755
@@ -96,7 +96,7 @@ case "${ARCH}" in
 	riscv)
 		for i in Image.bz2 Image.gz Image; do
 			if [ -f "${objtree}/arch/riscv/boot/${i}" ] ; then
-				cp -v -- "${objtree}/arch/riscv/boot/${i}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+				cp -v -- "${objtree}/arch/riscv/boot/${i}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
 				break
 			fi
 		done
Signature · 1 line
2.44.0
#1 lore raw
Quoted 19 lines · Matt Coster

From: Karolis Mituzas <[email protected]>

This matches the behavior for arm64 [1] and prevents clobbering of vmlinux-${KERNELRELEASE}.

[1]: commit 0df57d90bfd6 ("kbuild: buildtar: add arm64 support")

Fixes 7d0bc44bd0ea ("kbuild: buildtar: add riscv support")
---
 scripts/package/buildtar | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/package/buildtar +0 -0
index 72c91a1b832f..a36aca2a27cc 100755

scripts/package/buildtar case "${ARCH}" in · line 97

Quoted 2 lines
scripts/package/buildtar +0 -0
@@ -96,7 +96,7 @@ case "${ARCH}" in
 	riscv)
 		for i in Image.bz2 Image.gz Image; do

This patch seems fine but it does introduce a slight inconsistency with the rest of this script, as vmlinuz implies a compressed boot image but Image is not compressed. Probably does not really matter but I feel like it is worth mentioning.

Quoted 9 lines
scripts/package/buildtar +1 -1
 			if [ -f "${objtree}/arch/riscv/boot/${i}" ] ; then
-				cp -v -- "${objtree}/arch/riscv/boot/${i}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+				cp -v -- "${objtree}/arch/riscv/boot/${i}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
 				break
 			fi
 		done
Signature · 1 line
2.44.0
#2 lore raw
Quoted 15 lines · Nathan Chancellor
Quoted 14 lines · Matt Coster

From: Karolis Mituzas <[email protected]>

This matches the behavior for arm64 [1] and prevents clobbering of vmlinux-${KERNELRELEASE}.

[1]: commit 0df57d90bfd6 ("kbuild: buildtar: add arm64 support")

Fixes 7d0bc44bd0ea ("kbuild: buildtar: add riscv support")
---
 scripts/package/buildtar | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

scripts/package/buildtar case "${ARCH}" in · line 97

Quoted 7 lines
scripts/package/buildtar +0 -0
index 72c91a1b832f..a36aca2a27cc 100755
@@ -96,7 +96,7 @@ case "${ARCH}" in
 	riscv)
 		for i in Image.bz2 Image.gz Image; do

This patch seems fine but it does introduce a slight inconsistency with the rest of this script, as vmlinuz implies a compressed boot image but Image is not compressed. Probably does not really matter but I feel like it is worth mentioning.

I agree this doesn't seem like the perfect solution, but I'm not sure what that would look like. We could easily pull the Image case out of the loop and use vmlinux there, but then the original vmlinux would still be clobbered.

Quoted 9 lines
Quoted 9 lines
scripts/package/buildtar +1 -1
 			if [ -f "${objtree}/arch/riscv/boot/${i}" ] ; then
-				cp -v -- "${objtree}/arch/riscv/boot/${i}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+				cp -v -- "${objtree}/arch/riscv/boot/${i}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
 				break
 			fi
 		done
Signature · 1 line
2.44.0

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#3 lore raw
In reply to Matt Coster
Quoted 5 lines · Matt Coster

From: Karolis Mituzas <[email protected]>

This matches the behavior for arm64 [1] and prevents clobbering of vmlinux-${KERNELRELEASE}.

What problem are you trying to solve?

Why is clobbering vmlinux-${KERNELRELEASE} a problem?

Signature · 2 lines
Best Regards
Masahiro Yamada
#4 lore raw
Quoted 11 lines · Masahiro Yamada
Quoted 5 lines · Matt Coster

From: Karolis Mituzas <[email protected]>

This matches the behavior for arm64 [1] and prevents clobbering of vmlinux-${KERNELRELEASE}.

What problem are you trying to solve?

Why is clobbering vmlinux-${KERNELRELEASE} a problem?

This patch makes riscv tar*-pkg builds consistent with other architectures. Clobbering vmlinux-${KERNELRELEASE} means there's no ELF binary produced by tar*-pkg builds; sometimes you just need an ELF binary, e.g. to run faddr2line.

Cheers,
Matt

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv