Find the answer to your Linux question:
Results 1 to 2 of 2
Hi. I downloaded a Linux Kernel 2.4.20 and compiled it and when i tried making a boot inage i get the error make: *** [init/main.o] Error 1 "I did the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    1

    Cant create boot inmage of kernel. Please Help


    Hi. I downloaded a Linux Kernel 2.4.20 and compiled it and when i tried making a boot inage i get the error

    make: *** [init/main.o] Error 1

    "I did the following"

    # make oldconfig
    # make dep
    # make bzImage

    gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/split-include scripts/split-include.c
    scripts/split-include include/linux/autoconf.h include/config
    gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
    In file included from /usr/src/linux-2.4.20/include/linux/kernel.h:16,
    from /usr/src/linux-2.4.20/include/linux/wait.h:14,
    from /usr/src/linux-2.4.20/include/linux/fs.h:13,
    from /usr/src/linux-2.4.20/include/linux/capability.h:18,
    from /usr/src/linux-2.4.20/include/linux/binfmts.h:6,
    from /usr/src/linux-2.4.20/include/linux/sched.h:10,
    from /usr/src/linux-2.4.20/include/linux/mm.h:5,
    from /usr/src/linux-2.4.20/include/linux/slab.h:15,
    from /usr/src/linux-2.4.20/include/linux/proc_fs.h:6,
    from init/main.c:16:
    /usr/src/linux-2.4.20/include/asm/byteorder.h:14: warning: type qualifiers ignored on function return type
    /usr/src/linux-2.4.20/include/asm/byteorder.h:28: warning: type qualifiers ignored on function return type
    In file included from /usr/src/linux-2.4.20/include/linux/byteorder/little_endian.h:12,
    from /usr/src/linux-2.4.20/include/asm/byteorder.h:46,
    from /usr/src/linux-2.4.20/include/linux/kernel.h:16,
    from /usr/src/linux-2.4.20/include/linux/wait.h:14,
    from /usr/src/linux-2.4.20/include/linux/fs.h:13,
    from /usr/src/linux-2.4.20/include/linux/capability.h:18,
    from /usr/src/linux-2.4.20/include/linux/binfmts.h:6,
    from /usr/src/linux-2.4.20/include/linux/sched.h:10,
    from /usr/src/linux-2.4.20/include/linux/mm.h:5,
    from /usr/src/linux-2.4.20/include/linux/slab.h:15,
    from /usr/src/linux-2.4.20/include/linux/proc_fs.h:6,
    from init/main.c:16:
    /usr/src/linux-2.4.20/include/linux/byteorder/swab.h:160: warning: type qualifiers ignored on function return type
    /usr/src/linux-2.4.20/include/linux/byteorder/swab.h:173: warning: type qualifiers ignored on function return type
    /usr/src/linux-2.4.20/include/linux/byteorder/swab.h:186: warning: type qualifiers ignored on function return type
    /usr/src/linux-2.4.20/include/linux/byteorder/swab.h:200: warning: type qualifiers ignored on function return type
    In file included from /usr/src/linux-2.4.20/include/linux/prefetch.h:14,
    from /usr/src/linux-2.4.20/include/linux/list.h:7,
    from /usr/src/linux-2.4.20/include/linux/wait.h:15,
    from /usr/src/linux-2.4.20/include/linux/fs.h:13,
    from /usr/src/linux-2.4.20/include/linux/capability.h:18,
    from /usr/src/linux-2.4.20/include/linux/binfmts.h:6,
    from /usr/src/linux-2.4.20/include/linux/sched.h:10,
    from /usr/src/linux-2.4.20/include/linux/mm.h:5,
    from /usr/src/linux-2.4.20/include/linux/slab.h:15,
    from /usr/src/linux-2.4.20/include/linux/proc_fs.h:6,
    from init/main.c:16:
    /usr/src/linux-2.4.20/include/asm/processor.h:74: error: array type has incomplete element type
    In file included from /usr/src/linux-2.4.20/include/linux/fs.h:319,
    from /usr/src/linux-2.4.20/include/linux/capability.h:18,
    from /usr/src/linux-2.4.20/include/linux/binfmts.h:6,
    from /usr/src/linux-2.4.20/include/linux/sched.h:10,
    from /usr/src/linux-2.4.20/include/linux/mm.h:5,
    from /usr/src/linux-2.4.20/include/linux/slab.h:15,
    from /usr/src/linux-2.4.20/include/linux/proc_fs.h:6,
    from init/main.c:16:
    /usr/src/linux-2.4.20/include/linux/ncp_fs_i.h:26: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp_fs_i.h:27: warning: ‘packed’ attribute ignored for field of type ‘__u8[6]’
    In file included from /usr/src/linux-2.4.20/include/linux/ncp_mount.h:13,
    from /usr/src/linux-2.4.20/include/linux/ncp_fs_sb.h:13,
    from /usr/src/linux-2.4.20/include/linux/fs.h:704,
    from /usr/src/linux-2.4.20/include/linux/capability.h:18,
    from /usr/src/linux-2.4.20/include/linux/binfmts.h:6,
    from /usr/src/linux-2.4.20/include/linux/sched.h:10,
    from /usr/src/linux-2.4.20/include/linux/mm.h:5,
    from /usr/src/linux-2.4.20/include/linux/slab.h:15,
    from /usr/src/linux-2.4.20/include/linux/proc_fs.h:6,
    from init/main.c:16:
    /usr/src/linux-2.4.20/include/linux/ncp.h:24: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:25: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:26: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:27: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:28: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:29: warning: ‘packed’ attribute ignored for field of type ‘__u8[]’
    /usr/src/linux-2.4.20/include/linux/ncp.h:37: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:38: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:39: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:40: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:41: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:42: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:43: warning: ‘packed’ attribute ignored for field of type ‘__u8[]’
    /usr/src/linux-2.4.20/include/linux/ncp.h:137: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    /usr/src/linux-2.4.20/include/linux/ncp.h:138: warning: ‘packed’ attribute ignored for field of type ‘__u8[256]’
    /usr/src/linux-2.4.20/include/linux/ncp.h:174: warning: ‘packed’ attribute ignored for field of type ‘__u8’
    In file included from /usr/src/linux-2.4.20/include/asm/smp.h:19,
    from /usr/src/linux-2.4.20/include/linux/smp.h:15,
    from /usr/src/linux-2.4.20/include/linux/sched.h:24,
    from /usr/src/linux-2.4.20/include/linux/mm.h:5,
    from /usr/src/linux-2.4.20/include/linux/slab.h:15,
    from /usr/src/linux-2.4.20/include/linux/proc_fs.h:6,
    from init/main.c:16:
    /usr/src/linux-2.4.20/include/asm/mpspec.h:86: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
    In file included from /usr/src/linux-2.4.20/include/linux/sched.h:24,
    from /usr/src/linux-2.4.20/include/linux/mm.h:5,
    from /usr/src/linux-2.4.20/include/linux/slab.h:15,
    from /usr/src/linux-2.4.20/include/linux/proc_fs.h:6,
    from init/main.c:16:
    /usr/src/linux-2.4.20/include/linux/smp.h:29: error: conflicting types for ‘smp_send_reschedule’
    /usr/src/linux-2.4.20/include/asm/smp.h:43: error: previous declaration of ‘smp_send_reschedule’ was here
    In file included from /usr/src/linux-2.4.20/include/linux/unistd.h:10,
    from init/main.c:18:
    /usr/src/linux-2.4.20/include/asm/unistd.h:375: warning: conflicting types for built-in function ‘_exit’
    make: *** [init/main.o] Error 1

    Please help me I m doing this to compile an RtLinux Kernel

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Are you using gcc 4.x? I guess some parts of a 2.4 kernel will not build with gcc 4.x, so you either need to install a 3.x compiler or use a 2.6 kernel instead (not sure if that's your problem, though).

    Is there any reason why you choose to use a 2.4 kernel instead of a 2.6 one?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •