This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Source files used for creating the kernel for OMAP3530 evm ???

Other Parts Discussed in Thread: OMAP3530

Hello,

I am working with an OMAP3530 and i build a new kernel with the default configuration. With this configuration, the drivers wich are enabled in the kernel are: USB, ethernet, MMC/SD ....

So my question is: which source files are used for building the kernel? For exemple, for ethernet, wich source files are used for having the driver ethernet in the kernel?

Thank you in advance!

  • The kernel source can be found under the PSP directory, which looks something like <install path>/OMAP35x-PSP-SDK-03.##.##.##/src/kernel/linux-##.##.##.##.

    For instructions on rebuilding the kernel, including changes to the default configuration, refer to the appropriate section of the Getting Started Guide http://wiki.davincidsp.com/index.php/GSG:_OMAP35x_DVEVM_Software_Setup#Rebuilding_the_Linux_Kernel.

  • This is a pretty though question, especially as it pertains to ethernet driver... there are some common legacy pieces which make up the kernel network stack that are hardware independant and then you have your hardware dependant portion... all in all, to many files to list.  I hope I can point you in the right direction though...

    At the root kernel directory, you will find a .config file (hidden file since it is preceeded by a dot); this file pretty much captures your current kernel settings (default or as set by tools such as menuconfig).  Based on this configuration file, the build system goes down the tree looking for corresponding Konfig files (define module dependancies) and makefiles (specify source files associated with particular module) and build the kernel.  Hence by looking at .config file, along with Konfig and makefile files, you can figure out which source files are part of your kernel.

  • Thank you Juan Gonzalesfor. The informations help me a lot.

    So I find the .config file and many Kconfig and makefiles files. In the .config i have informations like:

    #
    # Automatically generated make config: don't edit
    # Linux kernel version: 2.6.29-rc3-omap1
    # Wed Feb 24 10:05:30 2010
    #
    CONFIG_ARM=y
    CONFIG_SYS_SUPPORTS_APM_EMULATION=y
    CONFIG_GENERIC_GPIO=y
    CONFIG_GENERIC_TIME=y
    CONFIG_GENERIC_CLOCKEVENTS=y
    CONFIG_MMU=y
    # CONFIG_NO_IOPORT is not set
    CONFIG_GENERIC_HARDIRQS=y
    CONFIG_STACKTRACE_SUPPORT=y
    CONFIG_HAVE_LATENCYTOP_SUPPORT=y
    CONFIG_LOCKDEP_SUPPORT=y

    and my questions are what the meaning of the variables (CONFIG_ARM, CONFIG_MMU...) and where are they declared?

    in one of the makefiles wich is in linux-02.01.03.11/drivers i have:

    #
    # Makefile for the Linux kernel device drivers.
    #
    # 15 Sep 2000, Christoph Hellwig <hch@infradead.org>
    # Rewritten to use lists instead of if-statements.
    #

    obj-y                += gpio/
    obj-$(CONFIG_PCI)        += pci/
    obj-$(CONFIG_PARISC)        += parisc/
    obj-$(CONFIG_RAPIDIO)        += rapidio/
    obj-y                += video/
    obj-$(CONFIG_ACPI)        += acpi/
    # PnP must come after ACPI since it will eventually need to check if acpi
    # was used and do nothing if so
    obj-$(CONFIG_PNP)        += pnp/
    obj-$(CONFIG_ARM_AMBA)        += amba/

    obj-$(CONFIG_XEN)        += xen/

    # regulators early, since some subsystems rely on them to initialize
    obj-$(CONFIG_REGULATOR)        += regulator/

    and my questions are : what's the meaning of those informations : ( obj-y                += gpio/,   obj-$(CONFIG_PCI)        += pci/)?

                                              where are defined the variables CONFIG_PCI,  CONFIG_PARISC....?

    Thank you in advance!