From: Cesar Cardoso <cesarcardoso@skydome.net>
To: linux-kernel@vger.kernel.org
Cc: alan@redhat.com, alan@lxorguk.ukuu.org.uk
Subject: [PATCH] make rpm works on non-x86 platforms
Date: 07 May 2002 02:10:38 -0300 [thread overview]
Message-ID: <1020748240.1678.15.camel@zya.fudeba.int> (raw)
This is a small patch that we (my partners and I) at Opencon (a newly
formed Brazilian Free Software/Open Source consulting firm,
opencon@rio.skydome.net) made to let people using RPM on non-x86
architectures to compile their kernel with 'make rpm'.
It simply hacks the shell script at /usr/src/linux/scripts/mkspec - it
it finds a x86, it issues a 'make bzImage' and acts accordingly; if not,
it issues a 'make vmlinux'.
It's a simple hack, so please test it, especially on other
architectures. It worked on my PowerMac 5500 and one of my friends'
iBook.
Have fun.
- Cesar
---
*** /usr/src/linux/scripts/mkspec.old Tue May 7 01:47:08 2002
--- /usr/src/linux/scripts/mkspec Tue May 7 01:50:38 2002
***************
*** 7,10 ****
--- 7,20 ----
# stripping the symbols from files in the kernel which we want
#
+ # Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
+ #
+ # That's the voodoo to see if it's a x86.
+ ISX86=`arch | grep -ie i.86`
+ if [ ! -z $ISX86 ]; then
+ PC=1
+ else
+ PC=0
+ fi
+ # starting to output the spec
echo "Name: kernel"
echo "Summary: The Linux Kernel"
***************
*** 29,38 ****
echo ""
echo "%build"
! echo "make oldconfig dep clean bzImage modules"
echo ""
echo "%install"
echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'
echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install'
! echo 'cp arch/i386/boot/bzImage $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
echo ""
--- 39,60 ----
echo ""
echo "%build"
! # This is the first 'disagreement' between x86 and other archs.
! if [ $PC = 1 ]; then
! echo "make oldconfig dep clean bzImage modules"
! else
! echo "make oldconfig dep clean vmlinux modules"
! fi
! # Back on track
echo ""
echo "%install"
echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'
echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install'
! # And that's the second
! if [ $PC = 1 ]; then
! echo 'cp arch/i386/boot/bzImage $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
! else
! echo 'cp vmlinux $RPM_BUILD_ROOT'"/boot/vmlinux-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
! fi
! # Back on track, again
echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
echo ""
reply other threads:[~2002-05-07 5:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1020748240.1678.15.camel@zya.fudeba.int \
--to=cesarcardoso@skydome.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®