* [RFC MIPS] Update buildtar for MIPS
@ 2010-10-08 1:45 Stuart Longland
2010-10-16 6:17 ` Maciej W. Rozycki
0 siblings, 1 reply; 3+ messages in thread
From: Stuart Longland @ 2010-10-08 1:45 UTC (permalink / raw)
To: linux-mips, linux-mips; +Cc: ralf, linux-kernel
A lot of 64-bit systems supported by Linux/MIPS have boot firmware or
bootloaders that only understand 32-bit ELF files, and as such, the vmlinux.32
target exists to support these systems. Therefore, it'd be nice if the tar-pkg
target recognised this, and included the right version when packaging up a
binary of the kernel.
This updates buildtar to support MIPS targets. MIPS may use 'vmlinux'
or 'vmlinux.32' depending on the target system. This uses 'vmlinux.32'
in preference to 'vmlinux' where present (although I should check which
is newer), including either file as /boot/vmlinux-${version}.
---
scripts/package/buildtar | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index 51b2aa0..988c3bd 100644
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -83,6 +83,13 @@ case "${ARCH}" in
[ -f "${objtree}/vmlinux.SYS" ] && cp -v -- "${objtree}/vmlinux.SYS" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}.SYS"
[ -f "${objtree}/vmlinux.dsk" ] && cp -v -- "${objtree}/vmlinux.dsk" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}.dsk"
;;
+ mips)
+ if [ -f "${objtree}/vmlinux.32" ] ; then
+ cp -v -- "${objtree}/vmlinux.32" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+ elif [ -f "${objtree}/vmlinux" ] ; then
+ cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+ fi
+ ;;
*)
[ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
echo "" >&2
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [RFC MIPS] Update buildtar for MIPS
2010-10-08 1:45 [RFC MIPS] Update buildtar for MIPS Stuart Longland
@ 2010-10-16 6:17 ` Maciej W. Rozycki
2013-07-31 16:25 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2010-10-16 6:17 UTC (permalink / raw)
To: Stuart Longland; +Cc: linux-mips, Ralf Baechle, linux-kernel
On Fri, 8 Oct 2010, Stuart Longland wrote:
> This updates buildtar to support MIPS targets. MIPS may use 'vmlinux'
> or 'vmlinux.32' depending on the target system.
Or vmlinux.64 -- why don't you handle that too?
Maciej
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC MIPS] Update buildtar for MIPS
2010-10-16 6:17 ` Maciej W. Rozycki
@ 2013-07-31 16:25 ` Ralf Baechle
0 siblings, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2013-07-31 16:25 UTC (permalink / raw)
To: Maciej W. Rozycki
Cc: Stuart Longland, linux-mips, linux-kernel, Michal Marek,
linux-kbuild
On Sat, Oct 16, 2010 at 07:17:45AM +0100, Maciej W. Rozycki wrote:
> > This updates buildtar to support MIPS targets. MIPS may use 'vmlinux'
> > or 'vmlinux.32' depending on the target system.
>
> Or vmlinux.64 -- why don't you handle that too?
Patchwork is patient, nothing gets lost :-) I've updated Stuart's original
patch http://patchwork.linux-mips.org/patch/1673/ to also handle compressed
kernel images, how about below patch.
Michal, when testing this by building "make targz-pkg" for a particular MIPS
platform I get
tar: lib/*: Cannot stat: No such file or directory
and I assume that's because CONFIG_MODULES is not enabled for my test
configuration.
Ralf
kbuild: Add MIPS specific files to generated package.
A lot of 64-bit systems supported by Linux/MIPS have boot firmware or
bootloaders that only understand 32-bit ELF files, and as such, the vmlinux.32
target exists to support these systems. Therefore, it'd be nice if the tar-pkg
target recognised this, and included the right version when packaging up a
binary of the kernel.
This updates buildtar to support MIPS targets. MIPS may use 'vmlinux'
or 'vmlinux.32' depending on the target system. This uses 'vmlinux.32'
in preference to 'vmlinux' where present (although I should check which
is newer), including either file as /boot/vmlinux-${version}.
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---
scripts/package/buildtar | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index cdd9bb9..aa22f94 100644
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -87,6 +87,27 @@ case "${ARCH}" in
[ -f "${objtree}/vmlinux.SYS" ] && cp -v -- "${objtree}/vmlinux.SYS" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}.SYS"
[ -f "${objtree}/vmlinux.dsk" ] && cp -v -- "${objtree}/vmlinux.dsk" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}.dsk"
;;
+ mips)
+ if [ -f "${objtree}/arch/mips/boot/compressed/vmlinux.bin" ]; then
+ cp -v -- "${objtree}/arch/mips/boot/compressed/vmlinux.bin" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
+ elif [ -f "${objtree}/arch/mips/boot/compressed/vmlinux.ecoff" ]; then
+ cp -v -- "${objtree}/arch/mips/boot/compressed/vmlinux.ecoff" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
+ elif [ -f "${objtree}/arch/mips/boot/compressed/vmlinux.srec" ]; then
+ cp -v -- "${objtree}/arch/mips/boot/compressed/vmlinux.srec" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
+ elif [ -f "${objtree}/vmlinux.32" ]; then
+ cp -v -- "${objtree}/vmlinux.32" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+ elif [ -f "${objtree}/vmlinux.64" ]; then
+ cp -v -- "${objtree}/vmlinux.64" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+ elif [ -f "${objtree}/arch/mips/boot/vmlinux.bin" ]; then
+ cp -v -- "${objtree}/arch/mips/boot/vmlinux.bin" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+ elif [ -f "${objtree}/arch/mips/boot/vmlinux.ecoff" ]; then
+ cp -v -- "${objtree}/arch/mips/boot/vmlinux.ecoff" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+ elif [ -f "${objtree}/arch/mips/boot/vmlinux.srec" ]; then
+ cp -v -- "${objtree}/arch/mips/boot/vmlinux.srec" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+ elif [ -f "${objtree}/vmlinux" ]; then
+ cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+ fi
+ ;;
*)
[ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
echo "" >&2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-31 16:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08 1:45 [RFC MIPS] Update buildtar for MIPS Stuart Longland
2010-10-16 6:17 ` Maciej W. Rozycki
2013-07-31 16:25 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox