Robert L Cochran wrote:
Hello,
I'm playing with building my own kernel using an rpm build tree in my
home directory. I want to be able to make a change to the stock kernel
and rebuild it using 'rpmbuild'. The kernel is installed there per the
instructions in
http://fedora.redhat.com/docs/release-notes/fc4/errata/#sn-kernel . I
have copied the config file from my currently running kernel and
executed 'make oldconfig'.
What are my next steps? I'm guessing that:
now the time to change the config file (using 'make xconfig')?
then rebuild the package? I just want to do this for the smp kernel,
isn't there an option such as '--arch=smp' I can use? Or will rpmbuild
build for my arch only by default?
I've attached a script I use to build a kernel with NFTS enabled. Its
input is a standard source rpm and its output a set of Fedora 3 binary rpms.
bs the Mozilla dialogue is a ppaling, simply app paling. I found the
script the easy way and copied the name into the clipboard, then had to
navigate the frigging filesystem again!..
--
Cheers
John
-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxxxxxxxxx Z1aaaaaaa@xxxxxxxxxxxxxxxxxxxxxxx
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/
do not reply off-list
#!/bin/bash
set -xe
rpmbuild=rpmbuild\ --define\ "_topdir${HOME}/redhat"
rpm=rpm\ --define\ "_topdir${HOME}/redhat"
if [ -n "$1" ] ; then
K=$1
else
K=$(dir -d1rt ~/Fedora/kernel*src.rpm ~/RH/FC3/updates/SRPMS/kernel*src.rpm | tail -1)
fi
DirName=$(rpm -qp --qf '%{name}-%{version}\n' ${K})
${rpm} -i ${K}
date=$(date "+%a %b %d %Y")
sed -r <redhat/SPECS/kernel-2.6.spec >redhat/SPECS/kernel-2.6-dl.spec \
-e 's=FC\>=dl=g' \
-e 's=FC2\>=dl2=g' \
-e 's=FC3\>=dl3=g' \
-e 's=%define builddoc 0=%define builddoc 1=' \
-e "s=%changelog=%changelog\n* ${date} John Summerfield <summer@xxxxxxxxxxxxxxxxxxxxxx>\n- autobuild for dl %{release}\n="
:
:
:
:
diff -u redhat/SPECS/kernel-2.6.spec redhat/SPECS/kernel-2.6-dl.spec || :
${rpmbuild} -bp --target i686 redhat/SPECS/kernel-2.6-dl.spec
echo Fixing configs
(
set -x
cd $(find ~/redhat -type d -name ${DirName})/lin*
ls -la
for f in configs/*.config
do :
make -s mrproper
sed < $f >.config \
-e 's+# CONFIG_NTFS_FS is not set+CONFIG_NTFS_FS=m\nCONFIG_NTFS_DEBUG=n\nCONFIG_NTFS_RW=y+'
grep -q 'CONFIG_NTFS_FS is not set' .config && exit
grep -4 NTFS .config
# make -s oldconfig
cp -bvp .config ~/redhat/SOURCES/$(basename $f)
head -9 $f .config ~/redhat/SOURCES/$(basename $f)
mv -b .config $f
done
)
echo Fixed configs
BO="-ba"
for arch in i686 i586
do :
${rpmbuild} ${BO} --clean --target ${arch} redhat/SPECS/kernel-2.6-dl.spec
BO="-bb --rmsource"
done