mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] make rpm works on non-x86 platforms
@ 2002-05-07  5:10 Cesar Cardoso
  0 siblings, 0 replies; only message in thread
From: Cesar Cardoso @ 2002-05-07  5:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: alan, alan

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 ""



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-05-07  5:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-07  5:10 [PATCH] make rpm works on non-x86 platforms Cesar Cardoso

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®