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 ""
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:28 EST