You are not logged in.

#1 2018-08-11 10:20:30

vorlket
Member
Registered: 2017-09-30
Posts: 10

How to write program to extract nconfig kernel configuration syminfo

How do you write a program extracting nconfig kernel configuration syminfo, e.g. kernel configuration parameters as headers and syminfos as bodies?

Offline

#2 2018-08-11 13:38:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,755
Website

Re: How to write program to extract nconfig kernel configuration syminfo

What do you mean by "headers" and "bodies"?  Can you give an example of the format you want out?  You can read the current kernel config directly from /proc/config.gz.

I see this is an exact duplicate of a previous thread of yours that received no replies.  If you receive no replies it's becuase your question is not well formed.  What are you trying to do?

Last edited by Trilby (2018-08-11 13:40:11)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-08-11 14:34:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,063

Re: How to write program to extract nconfig kernel configuration syminfo

I have closed and dust binned your other thread.  In the future, if you want a thread to be moved, please use the Report link and leave a note asking that a moderator move your thread.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2018-08-11 16:30:38

vorlket
Member
Registered: 2017-09-30
Posts: 10

Re: How to write program to extract nconfig kernel configuration syminfo

I am trying to write a document with the aforementioned kernel configuration information with further information from research to aid kernel configuration.

As far as I am aware /proc does not contain parameters not configured in. Please correct me if I am wrong.

A wanted format would be:

Parameter a
syminfo for a
\return
Parameter b
syminfo for b

for example (a manual extract from .(n)config of 4.17.3-1) :

64-bit kernel
CONFIG_64BIT: Say yes to build a 64-bit kernel - formerly known as x86_64.

General setup

Kernel compression mode (XZ)
The linux kernel is a kind of self-extracting executable. Several compression algorithms are available, which differ in efficiency, compression and decompression speed. Compression speed is only relevant when building a kernel. Decompression speed is relevant at each boot.
XZ uses the LZMA2 algorithm and instruction set specific BCJ filters which can improve compression ratio of executable code. The size of the kernel is about 30% smaller with XZ in comparison to gzip. On architectures for which there is a BCJ filter (i386, x86_64, ARM, IA-64, PowerPC, and SPARC), XZ will create a few percent smaller kernel than plain LZMA.The speed is about the same as with LZMA: The decompression speed of XZ is better than that of bzip2 but worse than gzip and LZO. Compression is slow.

Support for paging of anonymous memory (swap)
This option allows you to choose whether you want to have support for so called swap devices or swap files in your kernel that are used to provide more virtual memory than the actual RAM present in your computer.

Offline

#5 2018-08-11 17:09:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,755
Website

Re: How to write program to extract nconfig kernel configuration syminfo

Why do you want to "extract" this, and why in this format?  You are basically recreating the kconfig files with a slightly different format.

If you are trying to make your own menuconfig/nconfig replacement tool, then use the kconfig files.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2018-08-19 06:43:29

vorlket
Member
Registered: 2017-09-30
Posts: 10

Re: How to write program to extract nconfig kernel configuration syminfo

Yes. I looked at Kconfig files. Where do I find the table nconfig looks up to construct configuration menu mapped to the Kconfig files?

Last edited by vorlket (2018-08-19 07:35:08)

Offline

#7 2018-08-19 16:36:39

loqs
Member
Registered: 2014-03-06
Posts: 5,530

Re: How to write program to extract nconfig kernel configuration syminfo

vorlket wrote:

Yes. I looked at Kconfig files. Where do I find the table nconfig looks up to construct configuration menu mapped to the Kconfig files?

Which kernel source files did you read through in your search?  (such as scripts/kconfig/nconf.c)

Offline

#8 Yesterday 04:41:25

vorlket
Member
Registered: 2017-09-30
Posts: 10

Re: How to write program to extract nconfig kernel configuration syminfo

Kconfig files. Not nconf files yet.

Offline

Board footer

Powered by FluxBB