Kernel Compilation Problem - autoconf.h,processor.h - Embedded

This is a discussion on Kernel Compilation Problem - autoconf.h,processor.h - Embedded ; Hi, I have SBC 104+ with installed White Dwarf Linux on it. I have installed all dev_tools properly as mentioned on site. I had written a simple Kernel init & cleanup module for device driver. My code is as follows: ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Kernel Compilation Problem - autoconf.h,processor.h

  1. Kernel Compilation Problem - autoconf.h,processor.h

    Hi,
    I have SBC 104+ with installed White Dwarf Linux on it.
    I have installed all dev_tools properly as mentioned on site.
    I had written a simple Kernel init & cleanup module for device
    driver.
    My code is as follows:
    -----------------------------------------------------------------
    #include
    #include

    int init_module(void)
    {
    printk(" Kernel Speaking....");
    return 0;
    }

    void cleanup_module(void)
    {
    printk(" Kernel Gudbye....");
    }
    --------------------------------------------------------------

    I am compiling above using following command:

    gcc -O2 -I /usr/src/linux-2.4.29/include -DMODULE__ -D__KERNEL__
    -DMODVERSIONS -c filename.c

    Now, I am facing belowed errors:


    /usr/src/linux-2.4.29/include/asm/processor.h:56:'CONFIG_X86_L1_CACHE_SHIFT'
    undeclared here
    ( not in a function
    )
    /usr/src/linux-2.4.29/include/asm/processor.h:56: requested alignment
    is not a constant

    /usr/src/linux-2.4.29/include/linux/config.h:4:28: linux/autoconfig.h
    : No such file or directory


    Please, Reply as soon as possible. I am waiting a positive reply from
    your side.

    Thanks & Regards.


  2. Re: Kernel Compilation Problem - autoconf.h,processor.h

    Hi,

    you need some linux kernel specific header files such as autoconf.h.
    This file is generated dynamically when you build the linux kernel.
    Within this file the configuration of the kernel is stored.

    This means you should have the kernel sources, the kernel configuration
    ..config and you should build the kernel to get the appropriate autoconf.h.

    Hope this will help


    Bye
    quitschn


    neerajchy@gmail.com wrote:
    > Hi,
    > I have SBC 104+ with installed White Dwarf Linux on it.
    > I have installed all dev_tools properly as mentioned on site.
    > I had written a simple Kernel init & cleanup module for device
    > driver.
    > My code is as follows:
    > -----------------------------------------------------------------
    > #include
    > #include
    >
    > int init_module(void)
    > {
    > printk(" Kernel Speaking....");
    > return 0;
    > }
    >
    > void cleanup_module(void)
    > {
    > printk(" Kernel Gudbye....");
    > }
    > --------------------------------------------------------------
    >
    > I am compiling above using following command:
    >
    > gcc -O2 -I /usr/src/linux-2.4.29/include -DMODULE__ -D__KERNEL__
    > -DMODVERSIONS -c filename.c
    >
    > Now, I am facing belowed errors:
    >
    >
    > /usr/src/linux-2.4.29/include/asm/processor.h:56:'CONFIG_X86_L1_CACHE_SHIFT'
    > undeclared here
    > ( not in a function
    > )
    > /usr/src/linux-2.4.29/include/asm/processor.h:56: requested alignment
    > is not a constant
    >
    > /usr/src/linux-2.4.29/include/linux/config.h:4:28: linux/autoconfig.h
    > : No such file or directory
    >
    >
    > Please, Reply as soon as possible. I am waiting a positive reply from
    > your side.
    >
    > Thanks & Regards.
    >


+ Reply to Thread