LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-17-2005, 01:17 AM   #1
Yoyo302
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 36

Rep: Reputation: 15
problem while "make" kernel


hi,
i have a problem with "make" in kernel.
after tpying make menuconfig i enter make to compile it, but there were some errors:

root:/usr/src/linux-2.6.11# make
CHK include/linux/version.h
/bin/sh: cmp: command not found
UPD include/linux/version.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
CC arch/i386/kernel/asm-offsets.s
CHK include/asm-i386/asm_offsets.h
UPD include/asm-i386/asm_offsets.h
CC init/main.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
CHK usr/initramfs_list
UPD usr/initramfs_list
CPIO usr/initramfs_data.cpio
GZIP usr/initramfs_data.cpio.gz
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/i386/kernel/process.o
{standard input}: Assembler messages:
{standard input}:861: Error: suffix or operands invalid for `mov'
{standard input}:862: Error: suffix or operands invalid for `mov'
{standard input}:1055: Error: suffix or operands invalid for `mov'
{standard input}:1056: Error: suffix or operands invalid for `mov'
{standard input}:1122: Error: suffix or operands invalid for `mov'
{standard input}:1123: Error: suffix or operands invalid for `mov'
{standard input}:1190: Error: suffix or operands invalid for `mov'
{standard input}:1191: Error: suffix or operands invalid for `mov'
{standard input}:1300: Error: suffix or operands invalid for `mov'
{standard input}:1312: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/kernel/process.o] B d 1
make: *** [arch/i386/kernel] B d 2
root:/usr/src/linux-2.6.11#

i checked for "process.o" file and it doesn't exsist.
do you know what i should do now?

i'm using kernel 2.6.11

Last edited by Yoyo302; 07-17-2005 at 01:19 AM.
 
Old 07-17-2005, 05:52 AM   #2
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Re: problem while "make" kernel

Quote:
Originally posted by Yoyo302
hi,
i have a problem with "make" in kernel.
after tpying make menuconfig i enter make to compile it, but there were some errors:

root:/usr/src/linux-2.6.11# make
CHK include/linux/version.h
/bin/sh: cmp: command not found
UPD include/linux/version.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
CC arch/i386/kernel/asm-offsets.s
CHK include/asm-i386/asm_offsets.h
UPD include/asm-i386/asm_offsets.h
CC init/main.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
CHK usr/initramfs_list
UPD usr/initramfs_list
CPIO usr/initramfs_data.cpio
GZIP usr/initramfs_data.cpio.gz
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/i386/kernel/process.o
{standard input}: Assembler messages:
{standard input}:861: Error: suffix or operands invalid for `mov'
{standard input}:862: Error: suffix or operands invalid for `mov'
{standard input}:1055: Error: suffix or operands invalid for `mov'
{standard input}:1056: Error: suffix or operands invalid for `mov'
{standard input}:1122: Error: suffix or operands invalid for `mov'
{standard input}:1123: Error: suffix or operands invalid for `mov'
{standard input}:1190: Error: suffix or operands invalid for `mov'
{standard input}:1191: Error: suffix or operands invalid for `mov'
{standard input}:1300: Error: suffix or operands invalid for `mov'
{standard input}:1312: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/kernel/process.o] B d 1
make: *** [arch/i386/kernel] B d 2
root:/usr/src/linux-2.6.11#

i checked for "process.o" file and it doesn't exsist.
do you know what i should do now?

i'm using kernel 2.6.11
If you are using binutils>=2.16, you should apply this patch

Good luck,
GH
 
Old 07-17-2005, 08:07 AM   #3
Yoyo302
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 36

Original Poster
Rep: Reputation: 15
thx,
can u tell me if i'm applying patch in right way?

Quote:
root:/usr/src/linux# scripts/patch-kernel /usr/src/linux /usr/src/linux/linux-2.6.patch
Current kernel version is 2.6.11 (Woozy Numbat)
root:/usr/src/linux#
 
Old 07-17-2005, 10:07 AM   #4
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by Yoyo302
thx,
can u tell me if i'm applying patch in right way?
Code:
root:/usr/src/linux# wget www.kernel.org/pub/linux/devel/binutils/linux-2.6-seg-5.patch
root:/usr/src/linux# patch -Np1 -i linux-2.6-seg-5.patch
 
Old 07-17-2005, 10:49 AM   #5
Yoyo302
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 36

Original Poster
Rep: Reputation: 15
ok, now working, thx

ps.
i found in readme sth about [src dir]/scripts/patch-kernel so i though that i should use it, once again thx
 
Old 10-29-2011, 04:50 AM   #6
ravidborse
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Rep: Reputation: 0
Error: suffix or operands invalid for `mov' with gcc 2.95 and linux kernel 2.2 or 2.4

I am trying to learn linux kernel from the scratch. I have downloaded the linux kernel 2.6.20. It is compiled fine on gcc 4.4.4. I am learning the linux kernel with the help of QEMU emulator. I am giving this information so that if any one is learning the linux kernel but don't know how to start. QEMU is the best way to learn it. You will find about it more on internet. My real intention was to build old linux kernel for i386 processor. Because as linux kernel is the fastest growing kernel so it is very difficult to understand the newer linux kernel until you know the basics of it. I chose the older kernel linux-2.2.26. To do so download 1) linux-2.2.26.tar.gz 2) binutils-2.10.0.18-1.i386.rpm 3) gcc-2.95-1.i386.rpm. You can found it on internet from the redhat website. GCC 2.95 can be found at http://rpm.pbone.net/index.php3/stat....i386.rpm.html. Please do not install directly any RPM.. Just extract this RPMs in any temporary directory. Then copy this binaries manually. Here I am showing my example. Below image shows how I extracted them in local directory(Say $extract_dir: In my case it is $extract_dir=/home/ravidborse/Downloads/Red-Hat-7.0/gcc). Now we have to copy this directory structure as it is shown in figure.

Do not copy other utilities until you use them. Do not copy $extract_dir/usr/bin/gcc as it will replace your system's gcc. Here I giving my example

Code:
             cp $extract_dir/usr/bin/i386-redhat-linux-gcc /usr/bin
             cp -r $extract_dir/usr/lib/gcc-lib/i386-redhat-linux/2.96/ /usr/lib/gcc-lib/i386-redhat-linux/
Now Enter in the linux-2.2.26 directory. Make changes in Makefile as shown in figure. I have commented the commands and changes to my own binutils. As shown in figure.

Then
Code:
             make menuconfig
             make
You will get errors. as shown

Code:
i386-redhat-linux-gcc -D__KERNEL__ -I/home/ravidborse/Downloads/Red-Hat-7.0/linux-2.2.26/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -m386 -DCPU=386   -c -o process.o process.c
{standard input}: Assembler messages:
{standard input}:343: Warning: using `%eax' instead of `%ax' due to `l' suffix
{standard input}:344: Warning: using `%eax' instead of `%ax' due to `l' suffix
{standard input}:345: Warning: using `%eax' instead of `%ax' due to `l' suffix
{standard input}:346: Warning: using `%eax' instead of `%ax' due to `l' suffix
{standard input}:347: Warning: using `%eax' instead of `%ax' due to `l' suffix
{standard input}:612: Warning: using `%eax' instead of `%ax' due to `l' suffix
{standard input}:612: Warning: using `%eax' instead of `%ax' due to `l' suffix
{standard input}:820: Error: suffix or operands invalid for `mov'
{standard input}:821: Error: suffix or operands invalid for `mov'
{standard input}:976: Error: suffix or operands invalid for `mov'
{standard input}:977: Error: suffix or operands invalid for `mov'
{standard input}:1035: Error: suffix or operands invalid for `mov'
{standard input}:1036: Error: suffix or operands invalid for `mov'
{standard input}:1056: Error: suffix or operands invalid for `mov'
{standard input}:1068: Error: suffix or operands invalid for `mov'
To resolve this you have to check your assembler.

Code:
[root@localhost linux-2.2.26]# /usr/bin/as --version
GNU assembler version 2.20.51.0.2-15.fc13 20091009
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `i686-redhat-linux'.
Now you to change your assembler from i686-redhat-linux to i386-redhat-linux


Code:
cp /usr/bin/as /usr/bin/as-old
cp /home/ravidborse/Downloads/Red-Hat-7.0/binutils/usr/bin/as /usr/src/as
Now check your assembler version

Code:
[root@localhost linux-2.2.26]# /usr/bin/as --version
GNU assembler 2.10.90
Copyright 2000 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `i386-redhat-linux'.
Now compile your 2.2.26 again using

Code:
make
Your kernel should compile properly. Please Check the Figures attached with this post.

Last edited by ravidborse; 10-31-2011 at 04:59 AM.
 
Old 10-29-2011, 06:11 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
@ravidborse:

- You revived a 6 year old thread (the OP hasn't been on-line for over a year),
- The info given by you doesn't have anything to do with LFS (biggest issue: rpm's cannot be used in LFS),
- You are talking about a 2.2.X kernel while the OP has issue's with a 2.6.X kernel.

Please pay a bit more attention when replying to threads or start a new thread with the above information if you think it is still relevant.
 
Old 10-31-2011, 05:08 AM   #8
ravidborse
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Rep: Reputation: 0
Above posted issue is the one for which most developers looking for. Because they always try to compile the old kernel with newer compilers. But they dont find how to do it?. So I have posted this issue with my solutions.But still reviewers want me to delete this post I am ready for it.
 
Old 10-31-2011, 05:26 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
@ravidborse: I'm not saying that your post (#6) isn't valuable for some people, what I am saying is that this doesn't have anything to do with LFS and your solution will not work on LFS.

The original issue wasn't with an old 2.2.X kernel, it (kernel 2.6.11) was a recent one at the moment the original problem was posted (6 years ago).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
So many errors when I typed the "make" and "make install" command Niceman2005 Linux - Software 23 07-22-2009 02:33 PM
problem "make"ing gtk+ "/usr/bin/env: perl -w" caid Linux - Newbie 8 07-29-2005 04:51 AM
kernel setup problem, "make mrproper" dwarf007 Fedora 6 10-18-2004 01:02 PM
Problem with "make" for rt8180" driver tdopko Linux - Wireless Networking 5 09-20-2004 01:17 AM
LFS 4.1: Stalled at Perl, "missing seperator" error from "make" SparceMatrix Linux From Scratch 1 06-07-2003 03:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 08:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration