LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Recompile kernel: patches, as86 vs. as (https://www.linuxquestions.org/questions/linux-newbie-8/recompile-kernel-patches-as86-vs-as-20998/)

kdaru 05-15-2002 02:34 AM

Recompile kernel: patches, as86 vs. as
 
Hi. I'm trying to do my first kernel recompile, with 2.2.15 (Mandrake 7.1). Two questions:

1) The Mandrake sources include about 50 patches besides the 2.2.15 tarball, many of which seem to be for old kernel versions (e.g., 2.2.12). Is there any way to tell which of these I actually need?

2) When I tried to compile just the unpatched 2.2.15 files, I got as far as make zImage, which banged out with

make[1]: Entering directory /usr/src/linux-2.2.15b/linux/arch/i386/boot
gcc D_KERNEL (bunch of options) bootsect.S -o bootsect.s
as86 -O -a -o bootsect.o bootsect.s
Make[1]: as86: command not found
Make[1]: ***[bootsect.o] Error 127
make[1]: Leaving directory '/usr/src/blahblah'
make[1]: ***[zimiage] Error 2

The Makefile for this boot directory has the lines

AS86 = $(CROSS_COMPILE)as86 -O -a
LD86 = $(CROSS_COMPILE)ld86 -O

Now, I understand from a previous post that as86 = assembler for 8086-80386 systems, and ld86 presumably = linker for same. But I have a system with 2 800 MHz PIII's, and as/ld instead of as86/ld86. If I replace as86 and ld86 in the makefile with as and ld, respectively, will that be OK? Or will I be messing up something? Why does it want an ancient assembler anyway - did I screw up during make config? Any info appreciated.

kdaru 05-18-2002 05:05 PM

Answered my own question. Most info in ASSEMBLY-HOWTO. as86 != as, and as will likely not compile as86 source. as86 used mainly to generate bootloader for LILO, but may be used by other programs as well. Per HOWTO recs found stripped-down version of as86 and ld86 in bin86 v. 0.4 in my Mandrake distribution, specifically designed just for kernel compilation. Installed rpm and worked like a charm.

Re patches: found out which ones I needed the hard way - compiling a test kernel and seeing what no longer worked. Also looked at .config file and compared with Mandrake's .config files - if an option was missing from mine it probably came from a patch.

The whole kernel compilation exercise was time consuming but very educational - I highly recommend it to other newbies who want to learn more about their system.

C-Lo 05-19-2002 10:05 AM

I am using 7.1 but the gnome desktop...I have to upgrade my kernel as well...so I appreciate the info.


All times are GMT -5. The time now is 10:05 PM.