Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi All , Let Me know is there anyway to determine kernel configuration from its single image file !? i have an image file that i want to know its ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4

    Extracting Kernel Configuration


    Hi All , Let Me know is there anyway to determine kernel configuration from its single image file !? i have an image file that i want to know its conf and make it again with my modifications . can be done ?!

  2. #2
    Just Joined! hunter_thom's Avatar
    Join Date
    Apr 2010
    Posts
    89
    The file should be:

    /usr/src/$(uname -r)/.config

    You could copy the whole /usr/src/$(uname -r) directory and then make changes to that .config file with 'make config' or 'make xconfig' or 'make menuconfig'. Or you could just rename the .config file to .config.old and do a 'make config' to get a fresh .config file.

    Does that help?

  3. #3
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    thanks , but i am looking for dirffrent way . i just have a vmlinuz kernel file and nothing more ...

    i able to boot this kernel , but i want to modify the configs and make my own kernel based on that kernel.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! hunter_thom's Avatar
    Join Date
    Apr 2010
    Posts
    89
    I don't believe there is any way, with only a vmlinuz image. If you obtain the source for your image, you can compile it with your configurations, but I don't think there is any way to pull a .config out of a compiled kernel.

    Correct me if I am wrong.

  6. #5
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i concur

    vmlinuz is binary file, even supposing the kernel config was compiled into this, you would have to decompile it, but I don't think the config is included

  7. #6
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    how to decompile vmlinuz bin ?!

  8. #7
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i don't think there is any point to this exercise, i don't think they include the config file in it, and i am not sure it is even possible to decompile

  9. #8
    Just Joined! hunter_thom's Avatar
    Join Date
    Apr 2010
    Posts
    89
    I don't think you will find a good way (or any way) to decompile the kernel. Maybe if you are experienced with assembly code, you could try, but I'm not sure how it would work out.

    Why can't you simply recompile the kernel? I know you won't get the exact same .config file, but why not recompile the kernel with the default configuration, and use it to see if you have what you need?

  10. #9
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    i have a kernel wich compiled for embedded systems , but i dont want networking and such other stuffs and i want to recompile it and remove them from the kernel .

    so , the kernel is binary file . any part of kernel have a c or asm code , i think there is point , analysing the binary should be helpfull . how we can decompile kernel and it asm's ?!

    ----

    is there any website that related to embedded kernels or such staffs ?!

  11. #10
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    again, you will have to recreate the config, you won't find any useful information by decompiling the kernel (which by quick research seems not possible)

    you should just start from scratch, in the time you have tried to decompile it, you could have scoured every single tiny little config detail for the kernel and recompiled it already

Page 1 of 2 1 2 LastLast

Posting Permissions

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