Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .config



"Stephen J. Turnbull" <turnbull@example.com> writes:

> >>>>> "Dan" == Dan Lindfield <dan.lindfield@example.com> writes:
> 
>     Dan> My Mandrake distro
> 
> Oh, joy.[1]  But I digress.
> 
>     Dan> How can I generate a .config file from my current setup that
>     Dan> I know works?
> 
> You have to find one.

Usually you can find it here:

    mfabian@example.com:/usr/src/linux$ ll /proc/config.gz 
    -r--r--r--    1 root     root            0  8月 17 11:20 /proc/config.gz
    mfabian@example.com:/usr/src/linux$ 

This is the .config from the currently running kernel.

You can compile a new kernel with these settings by calling

    mfabian@example.com:/usr/src/linux$ make cloneconfig    

Extract from the /usr/src/linux/Makefile:

    cloneconfig: symlinks
            @example.com [ -f "/proc/config.gz" ]; then \
                    mv -f .config .config.bak; \
                    gzip -d < /proc/config.gz > .config; \
                    $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in; \
            else \
                    echo "Sorry, your current kernel was built without cloning support."; \
            fi

> Most distros keep them around somewhere, Debian
> eg keeps them in /boot/config-<version>.  cp that to
> /usr/local/src/linux/.config (or wherever you keep your kernel sources).
> 
> Now, if you were using XEmacs as your kernel, you'd just type
> "describe-installation" and get the full configuration.  But you're
> not.  ;-)

Similar with Linux:

    ~$ zcat /proc/config.gz | less

-- 
Mike Fabian   <mfabian@example.com>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links