LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-14-2003, 10:29 AM   #1
dekernel
LQ Newbie
 
Registered: Aug 2002
Posts: 5

Rep: Reputation: 0
Question Build the default kernel


I am having a problem rebuilding the default kernel in hopes to eventually build a P4-tuned kernel.
I copied the source directory locally and copied 'kernel-2.4.22-i586.config' from the config directory to '.config'. I then did a 'make dep bzImage' for which I receive a compile error:

gcc32 -D__KERNEL__ -I/home/tim/Projects/linux-2.4.22-1.2129.nptl/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=io_apic -c -o io_apic.o io_apic.c
io_apic.c:46: `dest_LowestPrio' undeclared here (not in a function)
io_apic.c: In function `__mask_IO_APIC_irq':
io_apic.c:141: warning: implicit declaration of function `io_apic_read'
io_apic.c:141: warning: implicit declaration of function `io_apic_write'
io_apic.c:141: warning: implicit declaration of function `io_apic_sync'
io_apic.c: In function `clear_IO_APIC_pin':
io_apic.c:170: storage size of `entry' isn't known
io_apic.c:178: `dest_SMI' undeclared (first use in this function)
io_apic.c:178: (Each undeclared identifier is reported only once
io_apic.c:178: for each function it appears in.)
io_apic.c:170: warning: unused variable `entry'
io_apic.c: In function `clear_IO_APIC':
io_apic.c:196: `nr_ioapics' undeclared (first use in this function)
io_apic.c: In function `send_IPI_self':
io_apic.c:223: warning: implicit declaration of function `apic_wait_icr_idle'
io_apic.c:228: warning: implicit declaration of function `apic_write_around'
io_apic.c: In function `find_irq_entry':
io_apic.c:364: `mp_irq_entries' undeclared (first use in this function)
io_apic.c:365: `mp_irqs' undeclared (first use in this function)
io_apic.c:366: `mp_ioapics' undeclared (first use in this function)
io_apic.c:367: `MP_APIC_ALL' undeclared (first use in this function)
io_apic.c: In function `find_isa_irq_pin':
io_apic.c:381: `mp_irq_entries' undeclared (first use in this function)
io_apic.c:382: `mp_irqs' undeclared (first use in this function)
io_apic.c:384: `mp_bus_id_to_type' undeclared (first use in this function)
io_apic.c:384: `MP_BUS_ISA' undeclared (first use in this function)
io_apic.c:385: `MP_BUS_EISA' undeclared (first use in this function)
io_apic.c:386: `MP_BUS_MCA' undeclared (first use in this function)
io_apic.c: In function `IO_APIC_get_PCI_irq_vector':
io_apic.c:405: warning: implicit declaration of function `Dprintk'
io_apic.c:407: `mp_bus_id_to_pci_bus' undeclared (first use in this function)
io_apic.c:411: `mp_irq_entries' undeclared (first use in this function)
io_apic.c:412: `mp_irqs' undeclared (first use in this function)
io_apic.c:414: `nr_ioapics' undeclared (first use in this function)
io_apic.c:415: `mp_ioapics' undeclared (first use in this function)
io_apic.c:416: `MP_APIC_ALL' undeclared (first use in this function)
io_apic.c:419: `mp_bus_id_to_type' undeclared (first use in this function)
io_apic.c:419: `MP_BUS_PCI' undeclared (first use in this function)
io_apic.c: In function `MPBIOS_polarity':
io_apic.c:482: `mp_irqs' undeclared (first use in this function)
io_apic.c:492: `mp_bus_id_to_type' undeclared (first use in this function)
io_apic.c:494: `MP_BUS_ISA' undeclared (first use in this function)
io_apic.c:499: `MP_BUS_EISA' undeclared (first use in this function)
io_apic.c:504: `MP_BUS_PCI' undeclared (first use in this function)
io_apic.c:509: `MP_BUS_MCA' undeclared (first use in this function)
io_apic.c: In function `MPBIOS_trigger':
io_apic.c:551: `mp_irqs' undeclared (first use in this function)
io_apic.c:561: `mp_bus_id_to_type' undeclared (first use in this function)
io_apic.c:563: `MP_BUS_ISA' undeclared (first use in this function)
io_apic.c:568: `MP_BUS_EISA' undeclared (first use in this function)
io_apic.c:573: `MP_BUS_PCI' undeclared (first use in this function)
io_apic.c:578: `MP_BUS_MCA' undeclared (first use in this function)
io_apic.c: In function `pin_2_irq':
io_apic.c:631: `mp_irqs' undeclared (first use in this function)
io_apic.c:639: `mp_bus_id_to_type' undeclared (first use in this function)
io_apic.c:641: `MP_BUS_ISA' undeclared (first use in this function)
io_apic.c:642: `MP_BUS_EISA' undeclared (first use in this function)
io_apic.c:643: `MP_BUS_MCA' undeclared (first use in this function)
io_apic.c:648: `MP_BUS_PCI' undeclared (first use in this function)
io_apic.c: In function `IO_APIC_irq_trigger':
io_apic.c:688: `nr_ioapics' undeclared (first use in this function)
io_apic.c:690: `mp_INT' undeclared (first use in this function)
io_apic.c: In function `setup_IO_APIC_irqs':
io_apic.c:731: storage size of `entry' isn't known
io_apic.c:737: `nr_ioapics' undeclared (first use in this function)
io_apic.c:745: `dest_LowestPrio' undeclared (first use in this function)
io_apic.c:750: `mp_INT' undeclared (first use in this function)
io_apic.c:753: `mp_ioapics' undeclared (first use in this function)
io_apic.c:731: warning: unused variable `entry'
io_apic.c: In function `setup_ExtINT_IRQ0_pin':
io_apic.c:813: storage size of `entry' isn't known
io_apic.c:830: `dest_LowestPrio' undeclared (first use in this function)
io_apic.c:813: warning: unused variable `entry'
io_apic.c: In function `print_IO_APIC':
io_apic.c:862: storage size of `reg_00' isn't known
io_apic.c:863: storage size of `reg_01' isn't known
io_apic.c:864: storage size of `reg_02' isn't known
io_apic.c:865: storage size of `reg_03' isn't known
io_apic.c:868: `mp_irq_entries' undeclared (first use in this function)
io_apic.c:869: `nr_ioapics' undeclared (first use in this function)
io_apic.c:871: `mp_ioapics' undeclared (first use in this function)
io_apic.c:958: storage size of `entry' isn't known
io_apic.c:958: warning: unused variable `entry'
io_apic.c:862: warning: unused variable `reg_00'
io_apic.c:863: warning: unused variable `reg_01'
io_apic.c:864: warning: unused variable `reg_02'
io_apic.c:865: warning: unused variable `reg_03'
io_apic.c: In function `print_APIC_bitfield':
io_apic.c:1010: warning: implicit declaration of function `apic_read'
io_apic.c: In function `print_local_APIC':
io_apic.c:1032: warning: implicit declaration of function `get_maxlvt'
io_apic.c:1065: warning: implicit declaration of function `apic_write'
io_apic.c: In function `enable_IO_APIC':
io_apic.c:1138: storage size of `reg_01' isn't known
io_apic.c:1153: `nr_ioapics' undeclared (first use in this function)
io_apic.c:1138: warning: unused variable `reg_01'
io_apic.c: In function `disable_IO_APIC':
io_apic.c:1176: warning: implicit declaration of function `disconnect_bsp_APIC'
io_apic.c: In function `setup_ioapic_ids_from_mpc':
io_apic.c:1188: storage size of `reg_00' isn't known
io_apic.c:1189: `phys_cpu_present_map' undeclared (first use in this function)
io_apic.c:1205: `nr_ioapics' undeclared (first use in this function)
io_apic.c:1212: `mp_ioapics' undeclared (first use in this function)
io_apic.c:1254: `mp_irq_entries' undeclared (first use in this function)
io_apic.c:1255: `mp_irqs' undeclared (first use in this function)
io_apic.c:1188: warning: unused variable `reg_00'
io_apic.c: In function `ack_edge_ioapic_irq':
io_apic.c:1371: warning: implicit declaration of function `ack_APIC_irq'
io_apic.c: In function `unlock_ExtINT_logic':
io_apic.c:1599: storage size of `entry0' isn't known
io_apic.c:1599: storage size of `entry1' isn't known
io_apic.c:1603: `mp_INT' undeclared (first use in this function)
io_apic.c:1618: `dest_ExtINT' undeclared (first use in this function)
io_apic.c:1599: warning: unused variable `entry0'
io_apic.c:1599: warning: unused variable `entry1'
io_apic.c: In function `check_timer':
io_apic.c:1682: `mp_INT' undeclared (first use in this function)
io_apic.c:1683: `mp_ExtINT' undeclared (first use in this function)
io_apic.c:1693: `nmi_watchdog' undeclared (first use in this function)
io_apic.c:1693: `NMI_IO_APIC' undeclared (first use in this function)
io_apic.c:1697: warning: implicit declaration of function `check_nmi_watchdog'
io_apic.c: In function `setup_IO_APIC':
io_apic.c:1794: warning: implicit declaration of function `sync_Arb_IDs'
io_apic.c: In function `io_apic_get_unique_id':
io_apic.c:1812: storage size of `reg_00' isn't known
io_apic.c:1827: `phys_cpu_present_map' undeclared (first use in this function)
io_apic.c:1812: warning: unused variable `reg_00'
io_apic.c: In function `io_apic_get_version':
io_apic.c:1889: storage size of `reg_01' isn't known
io_apic.c:1889: warning: unused variable `reg_01'
io_apic.c: In function `io_apic_get_redir_entries':
io_apic.c:1902: storage size of `reg_01' isn't known
io_apic.c:1902: warning: unused variable `reg_01'
io_apic.c: In function `io_apic_set_pci_routing':
io_apic.c:1915: storage size of `entry' isn't known
io_apic.c:1932: `dest_LowestPrio' undeclared (first use in this function)
io_apic.c:1945: `mp_ioapics' undeclared (first use in this function)
io_apic.c:1915: warning: unused variable `entry'
io_apic.c: At top level:
io_apic.c:254: warning: `move' defined but not used
make[1]: *** [io_apic.o] Error 1

I would have figured that the basic 586 would have compiled out of the box.
Any help would be appreciated.

Tim
 
Old 12-14-2003, 10:42 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Its not 'make dep bzImage' but more like:

make dep
make bzImage

And then the rest of the steps that follow.

Read the kernel howto at www.tldp.org for more details or search around this site, kernel compiling questions are asked all the time.
 
Old 12-14-2003, 02:58 PM   #3
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Before make dep you should first do make oldconfig
 
Old 12-14-2003, 04:49 PM   #4
dekernel
LQ Newbie
 
Registered: Aug 2002
Posts: 5

Original Poster
Rep: Reputation: 0
I tried 'make dep' and 'make bzImage' but to no avail. Out of curiosity, doesn't make accept multiple directives?
 
Old 12-14-2003, 05:23 PM   #5
LordMorgul
Member
 
Registered: Sep 2003
Location: Ca
Distribution: Fedora, RH 7.1-9.0
Posts: 68

Rep: Reputation: 15
After copying the source tree, make sure your new source tree name matches the name given in the first few lines of Makefile. The Makefile will have a -custom appended to the name, this causes issues if your sourcetree isn't in that directory.

Always make mrproper in a kernel source tree before beginning the build, then copy in the config, and make oldconfig.

If you're building the 2.4 kernel, make sure to have the gcc32 package installed, and export CC=gcc32.
 
Old 12-15-2003, 08:06 PM   #6
dekernel
LQ Newbie
 
Registered: Aug 2002
Posts: 5

Original Poster
Rep: Reputation: 0
Well, I tried changing my sourcetree to match the EXTRAVERSION in Makefile with the same outcome. Just to make sure, I did have gcc32 package installed.

Has anybody been able to build a kernel without modifing any source from the installed source? I find it hard to believe. With my SuSE, all I do is copy the sourcetree locally, run 'make xconfig', then type 'make dep bzImage'. I come back about 20 minutes and voila a kernel ready to boot.

What am I missing with Fedora?
 
Old 12-16-2003, 03:52 AM   #7
LordMorgul
Member
 
Registered: Sep 2003
Location: Ca
Distribution: Fedora, RH 7.1-9.0
Posts: 68

Rep: Reputation: 15
Yes I have done so, but I also had issues with a number of the kernels that they wouldn't compile. Have you checked the Fedora mail list? When a specific kernel had compilation issues there were postings to the Fedora test list, I imagine they were also made to the Fedora list. Nothing special should be required, just make sure you make mrproper in the tree first. I have never copied and renamed the source tree tho, since building in the installed directory doesn't mess anything up because of extraversion appended with -custom.
 
  


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
Default build architecture Haiyadragon Linux - Software 1 09-10-2005 12:28 PM
10.1 install kernel and kernel-source different - build fails Feebles Mandriva 2 06-10-2005 06:58 PM
kernel-source-2.6.5-7.src.rpm requires kernel-dummy to build!? fizzdandantilus SUSE / openSUSE 5 12-02-2004 12:48 PM
New FAQ topic: Should I edit my kernel configuration?/Should I build a custom kernel? chort *BSD 10 09-10-2004 11:15 PM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 04:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 11:59 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