LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-01-2012, 11:14 AM   #1
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Rep: Reputation: Disabled
Error while making OCTEON kernel on Fedora 17, patch command missing


Hi,
I am new to linux. I am building kernel for MIPS64 octeon processor.
I used the command "make kernel" in the /usr/local/Cavium_Networks/OCTEON-SDK/linux directory. During the process, it gives error:

make -C /usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs/build -f /usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs/pkg_makefiles/busybox.mk
make[3]: Entering directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs/build'
which patch || (echo "Error: 'patch' command is required, please install and rebuild"; exit -1)
which: no patch in (/usr/local/Cavium_Networks/OCTEON-SDK/tools/bin:/usr/local/Cavium_Networks/OCTEON-SDK/host/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/aisha/.local/bin:/home/aisha/bin)
Error: 'patch' command is required, please install and rebuild
make[3]: *** [busybox-1.18.4] Error 255
make[3]: Leaving directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs/build'
make[2]: *** [busybox] Error 2

make[2]: Leaving directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs'
make[1]: *** [.root_complete] Error 2
make[1]: Leaving directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs'
make: *** [kernel] Error 2


since, i am new to linux, /i cannot clearly interpret where I am making the mistake. I cannot fully understand the above errors as well.

Any help in this regard will be much appreciated !!!

regards,
Ash Angel
 
Old 07-02-2012, 12:09 AM   #2
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
You might have to install the package patch using yum

yum install patch
 
1 members found this post helpful.
Old 07-02-2012, 01:06 PM   #3
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Original Poster
Rep: Reputation: Disabled
Wooohhhoooooooooooo!!

thank you so much bsat. It worked.
but I have encountered another error. Here is the portion of the process of making kernel which was halt due to the error:

make[3]: Entering directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs/build'
tar -zxf /usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs/storage/libpcap-0.9.4.tar.gz
cd libpcap-0.9.4 && ac_cv_linux_vers=2 ./configure --quiet --prefix=/tmp/_usr_local_Cavium_Networks_OCTEON-SDK_linux_embedded_rootfs-rootfs/usr --host=mips64-octeon-linux-gnu CFLAGS="-mabi=64 -march=octeon -Os -fomit-frame-pointer" LDFLAGS="" --with-pcap=linux --enable-ipv6
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
configure: error: Your operating system's lex is insufficient to compile
libpcap. flex is a lex replacement that has many advantages, including
being able to compile libpcap. For more information, see
http://www.gnu.org/software/flex/flex.html .
make[3]: *** [libpcap-0.9.4/Makefile] Error 1
make[3]: Leaving directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs/build'
make[2]: *** [libpcap] Error 2
make[2]: Leaving directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs'
make[1]: *** [.root_complete] Error 2
make[1]: Leaving directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs'
make: *** [kernel] Error 2
[root@ash linux]#

I have this host system on which i have to compile linux and generate code for my target system which is an embedded system environment (OCTEON MIPS64 processor). That means i have to cross-compile.

The help files that come with the embedded system aren't of much help for a naive like me. My advisor has told me to compile the linux whereas the help files have only used the word BUILD everywhere. Does compile and build mean the same thing?

Regards,

Ash Angel
 
Old 07-02-2012, 03:22 PM   #4
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Original Poster
Rep: Reputation: Disabled
I have installed flex and again did the make kernel process. this time it stuck at some other command missing: yacc command not found

configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
configure: WARNING: don't have both flex and bison; reverting to lex/yacc
make -C libpcap-0.9.4
make[4]: Entering directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs/build/libpcap-0.9.4'
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./pcap-linux.c
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./fad-getad.c
sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' ./VERSION > version.h
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./pcap.c
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./inet.c
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./gencode.c
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./optimize.c
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./nametoaddr.c
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./etherent.c
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./savefile.c
rm -f bpf_filter.c
ln -s ./bpf/net/bpf_filter.c bpf_filter.c
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c bpf_filter.c
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./bpf_image.c
mips64-octeon-linux-gnu-gcc -O2 -mabi=64 -march=octeon -Os -fomit-frame-pointer -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./bpf_dump.c
lex -t scanner.l > $$.scanner.c; mv $$.scanner.c scanner.c
yacc -d grammar.y
make[4]: yacc: Command not found
make[4]: *** [grammar.c] Error 127
make[4]: Leaving directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs/build/libpcap-0.9.4'
make[3]: *** [build] Error 2
make[3]: Leaving directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs/build'
make[2]: *** [libpcap] Error 2
make[2]: Leaving directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs'
make[1]: *** [.root_complete] Error 2
make[1]: Leaving directory `/usr/local/Cavium_Networks/OCTEON-SDK/linux/embedded_rootfs'
make: *** [kernel] Error 2
[root@ash linux]#
 
Old 07-03-2012, 01:11 AM   #5
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
for yacc install the package bison
 
1 members found this post helpful.
Old 07-04-2012, 08:06 AM   #6
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Original Poster
Rep: Reputation: Disabled
Yes, i did that.

Thanks bsat !! My work is done.
 
  


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
Alternative to 200 lines kernel patch, /sys/fs/cgroup/cpu missing Linux.tar.gz Slackware 27 11-29-2010 09:40 AM
Does a linux-2.6 kernel from kernel.org has support for cavium octeon fzansari Linux - Kernel 2 08-11-2008 10:40 PM
patch command missing hippo88 Linux - Newbie 4 08-31-2004 12:11 AM
Is this command OK for making a PATCH? theYinYeti Programming 2 08-10-2004 02:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:11 AM.

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