-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday 20 April 2003 01:38 am, Steven Shiau wrote: > Hi! > I am trying to make a kernel i586 and i386 binary rpm with devfs > enabled from src rpm. First for i586, > I tried to make a kernel-2.4.20-8.i586 with devfs enabled from > kernel-2.4.20-8.src.rpm. This is my procedure: > 1. fetch the kernel source rpm kernel-2.4.20-8.src.rpm. > 2. mkdir src; cd src; rpm2cpio ../kernel-2.4.20-8.src.rpm |cpio -idmv > 3. edit the kernel-2.4.20-i586.config, set > CONFIG_DEVFS_FS=y > CONFIG_DEVFS_MOUNT=y > 4. copy all the files to /usr/src/redhat/SOURCES > 5. run "rpmbuild -ba --target i586 --without BOOT --without smp --sign > \ kernel-2.4.spec" [snip errors] > Any idea ? Editing the config files manually doesn't always work. What I would try is this: (Note that I haven't actually done this, these commands are off the top of my head and may need adjusting) First, if your building rpms as 'root' set up a non-root rpm environment. I have directions and a script here: http://www.tuxfan.homeip.net:8080/hack.html (Everything below assumes a non-root environment setup in ~/rpmbuild) Once set up, I'd install the kernel*.src.rpm package. $ rpm -ivh kernel*.src.rpm $ cd ~/rpmbuild/SOURCES/kernel-2.4.20 $ rpmbuild -bp kernel-2.4.spec (Builds through the %prep stage, installing and patching the source.) $ cd ../../BUILD/kernel-2.4.20/linux-2.4.20/ $ mv configs/kernel-2.4.20-i586.config \ configs/kernel-2.4.20-i586.config.orig $ cp configs/kernel-2.4.20-i586.config.orig .config $ make config (making your changes) $ diff -Nau configs/kernel-2.4.20-i586.config.orig \ configs/kernel-2.4.20-i586.config > \ ../../../SOURCES/kernel-2.4.20/myi586patch.patch (and again for the changes to the i386 kernel) Add the needed 2 lines in the spec file to include each new patch: Patch12000: myi586patch.patch %patch12001 -p0 Patch12000: myi386patch.patch %patch12001 -p0 Perhaps try rpmbuild -bp again, make sure the patch applies properly. If so, then try building the package again. > Second, about i386 rpm, is that possible to make > kernel-2.4.20-8.i386.rpm instaed of kernel-BOOT-2.4.20-8.i386.rpm ? I > tried to use > "rpmbuild -ba --target i386 --without BOOT --without smp --sign > kernel-2.4.spec" but what I got are: > kernel-2.4.20-8.src.rpm > kernel-BOOT-2.4.20-8.i386.rpm > kernel-doc-2.4.20-8.i386.rpm > kernel-source-2.4.20-8.i386.rpm I use a similar command line, but I edited the specfile as well. Here's my patch: $ diff -Nau kernel-2.4.spec.orig kernel-2.4.spec - --- kernel-2.4.spec.orig 2003-03-13 15:55:48.000000000 -0500 +++ kernel-2.4.spec 2003-04-20 07:40:32.000000000 -0400 @@ -5,14 +5,11 @@ # no contrary --with/--without arguments are given on the command line. %define buildup 1 - -%define buildsmp 1 - -%define buildBOOT 1 - -%define buildbigmem 1 +%define buildsmp 0 +%define buildBOOT 0 +%define buildbigmem 0 %define buildjensen 0 - - - - - - # Versions of various parts # @@ -21,7 +18,7 @@ # that the kernel isn't the stock RHL kernel, for example by # adding some text to the end of the version number. # - -%define release 8 +%define release 8RULE %define sublevel 20 %define kversion 2.4.%{sublevel} # /usr/src/%{kslnk} -> /usr/src/linux-%{KVERREL} @@ -76,7 +73,6 @@ # Second, per-architecture exclusions (ifarch) %ifarch i386 %define buildsmp 0 - -%define buildup 0 %endif %ifarch i586 %define buildsmp 0 - -----------------End patch--------------- Then, I built with: rpmbuild -bb --target i386 -without BOOT --without smp --sign kernel-2.4.spec > Why there is no kernel-2.4.20-8.i386.rpm ? I ended up with: $ ls ../../RPMS/kernel-* ../../RPMS/kernel-2.4.20-8RULE.i386.rpm ../../RPMS/kernel-doc-2.4.20-8RULE.i386.rpm ../../RPMS/kernel-source-2.4.20-8RULE.i386.rpm Hope that's both understandable and helpful. ;) - -- - -Michael pgp key: http://www.tuxfan.homeip.net:8080/gpgkey.txt Red Hat Linux 7.{2,3}|8.0 in 8M of RAM: http://www.rule-project.org/ - -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+opIJn/07WoAb/SsRAsa6AJ9fA0lXNLHtl3syTdkaxcxWdk2aGwCdFJO5 x10EKetQkRG5hui3Rv37waY= =PvSi -----END PGP SIGNATURE-----