Skip to contentSkip to conversation

kbuild: show the install image name and path

PATCH In review Keith Busch 4 participants 4 messages Jun 2, 2022 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: show the install image name and path

From: Keith Busch <[email protected]>

Prior to commit f774f5bb87d13 ("kbuild: factor out the common installation code into"), a 'make install' would print out the install command like:

  sh ./arch/x86/boot/install.sh 5.18.0-11935-gbffe08031c89 \
        arch/x86/boot/bzImage System.map "/boot"

This output was very useful for my workflow, so this patch prints it out again. I'm not sure if there's a better way to do this than what's implemented here, so any feedback is appreciated.

Cc Masahiro Yamada <[email protected]>
---
 scripts/install.sh | 1 +
 1 file changed, 1 insertion(+)
scripts/install.sh +1 -0
index 9bb0fb44f04a..2989d25ef069 100755
@@ -33,6 +33,7 @@ do
 	# installkernel(8) says the parameters are like follows:
 	#
 	#   installkernel version zImage System.map [directory]
+	echo "$0 ${KERNELRELEASE} ${KBUILD_IMAGE} ${INSTALL_PATH}"
 	exec "${file}" "${KERNELRELEASE}" "${KBUILD_IMAGE}" System.map "${INSTALL_PATH}"
 done
 
Signature · 1 line
2.30.2
#1 lore raw
Quoted 33 lines · Keith Busch

From: Keith Busch <[email protected]>

Prior to commit f774f5bb87d13 ("kbuild: factor out the common installation code into"), a 'make install' would print out the install command like:

  sh ./arch/x86/boot/install.sh 5.18.0-11935-gbffe08031c89 \
        arch/x86/boot/bzImage System.map "/boot"

This output was very useful for my workflow, so this patch prints it out again. I'm not sure if there's a better way to do this than what's implemented here, so any feedback is appreciated.

Cc Masahiro Yamada <[email protected]>
---
 scripts/install.sh | 1 +
 1 file changed, 1 insertion(+)
scripts/install.sh +1 -1
index 9bb0fb44f04a..2989d25ef069 100755
@@ -33,6 +33,7 @@ do
        # installkernel(8) says the parameters are like follows:
        #
        #   installkernel version zImage System.map [directory]
+       echo "$0 ${KERNELRELEASE} ${KBUILD_IMAGE} ${INSTALL_PATH}"
        exec "${file}" "${KERNELRELEASE}" "${KBUILD_IMAGE}" System.map "${INSTALL_PATH}"
 done
 
--
Quoted 2 lines

2.30.2

You said "useful for *my* flow",
so you can do whatever you think is useful in
${HOME}/bin/${INSTALLKERNEL}, can't you?

$ cat ~/bin/installkernel
#!/bin/sh

echo '== useful info for my workflow =='
echo "$@"
echo '================================='

exec /sbin/${INSTALLKERNEL} "$@"

$ chmod +x ~/bin/installkernel
$ make install
  INSTALL /boot
== useful info for my workflow ==
5.17.0 arch/x86/boot/bzImage System.map /boot
=================================
Signature · 2 lines
Best Regards
Masahiro Yamada
#2 lore raw
Quoted 33 lines · Masahiro Yamada
Quoted 32 lines · Keith Busch

From: Keith Busch <[email protected]>

Prior to commit f774f5bb87d13 ("kbuild: factor out the common installation code into"), a 'make install' would print out the install command like:

  sh ./arch/x86/boot/install.sh 5.18.0-11935-gbffe08031c89 \
        arch/x86/boot/bzImage System.map "/boot"

This output was very useful for my workflow, so this patch prints it out again. I'm not sure if there's a better way to do this than what's implemented here, so any feedback is appreciated.

Cc Masahiro Yamada <[email protected]>
---
 scripts/install.sh | 1 +
 1 file changed, 1 insertion(+)
scripts/install.sh +1 -0
index 9bb0fb44f04a..2989d25ef069 100755
@@ -33,6 +33,7 @@ do
        # installkernel(8) says the parameters are like follows:
        #
        #   installkernel version zImage System.map [directory]
+       echo "$0 ${KERNELRELEASE} ${KBUILD_IMAGE} ${INSTALL_PATH}"
        exec "${file}" "${KERNELRELEASE}" "${KBUILD_IMAGE}" System.map "${INSTALL_PATH}"
 done
 
Quoted 9 lines
Quoted 3 lines

--
2.30.2

You said "useful for *my* flow",
so you can do whatever you think is useful in
${HOME}/bin/${INSTALLKERNEL}, can't you?

True. E.g., my kernel installer also shows me

a) the modules install path (e.g., /lib/modules/$KERNEL_RELEASE)
b) the number of modules installed

Quoted 27 lines

$ cat ~/bin/installkernel
#!/bin/sh

echo '== useful info for my workflow =='
echo "$@"
echo '================================='

exec /sbin/${INSTALLKERNEL} "$@"

$ chmod +x ~/bin/installkernel
$ make install
  INSTALL /boot
== useful info for my workflow ==
5.17.0 arch/x86/boot/bzImage System.map /boot
=================================
Signature · 1 line
~Randy
#3 lore raw
In reply to Masahiro Yamada
Quoted 4 lines · Masahiro Yamada

You said "useful for *my* flow",
so you can do whatever you think is useful in
${HOME}/bin/${INSTALLKERNEL}, can't you?

Thanks for the suggestion, that works for me!