Commit a23a3454 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] arch fixes for make rpm

Not all arch's behave the same way as x86 during
the build process, so this makes make rpm adjust
for non-x86
parent d97e32d5
...@@ -6,6 +6,16 @@ ...@@ -6,6 +6,16 @@
# The only gothic bit here is redefining install_post to avoid # The only gothic bit here is redefining install_post to avoid
# stripping the symbols from files in the kernel which we want # 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
if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
PROVIDES=kernel-drm PROVIDES=kernel-drm
fi fi
...@@ -35,12 +45,24 @@ echo "%prep" ...@@ -35,12 +45,24 @@ echo "%prep"
echo "%setup -q" echo "%setup -q"
echo "" echo ""
echo "%build" echo "%build"
echo "make oldconfig dep clean bzImage modules" # 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 ""
echo "%install" echo "%install"
echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules' 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 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install'
echo 'cp arch/i386/boot/bzImage $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" # 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 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
echo "" echo ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment