Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find Linux config options in menuconfig?

Various web pages tell me that to get full truthful stack backtraces in the Linux kernel, I need to set CONFIG_FRAME_POINTER=y in my .config file. So I run make menuconfig and try to find it in there, but it's hardly intuitive where to navigate to do so. I search the web and find lots of pages that say to enable it, but no pages that tell me what menu options to drill down into in order to do so. So I think maybe I could run make config and just hit [Enter] a million times to select the current configuration choice for everything, then copy-paste the whole command window buffer contents into a text file & search (case insensitive) for "frame_pointer" or "frame pointer", but still no luck; apparently I'd have to select 'y' for some submenu to even drill down to wherever it is.

How can I find such options in config or menuconfig? Is there an option configuration hierarchy listed somewhere?

Update:

I'm using Linux Kernel v2.6.30.4-uc0; that's what I'm given with the Lantronix XPort Pro SDK.

Based on answers I got, I use the / search option (not sure how I missed that before), but I'm not really able to get much farther. When I search for "FRAME_POINTER" this is what I see:

Symbol: ARCH_WANT_FRAME_POINTERS [=n]

Symbol: FRAME_POINTER [=n]
 Prompt: Compile the kernel with frame pointers
   Defined at lib/Kconfig.debug:620
   Depends on: DEBUG_KERNEL && (CRIS || M68K || M68KNOMMU || FRV || UML || AVR32 || SUPERH || BLACKFIN || MN10300) || ARCH_WANT_FRAME_POINTERS
   Location:
     -> Kernel hacking
   Selected by: LOCKDEP && DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT && !MIPS && !PPC && !ARM_UNWIND && !S390 || FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_

Note that the "Selected by:" line is longer than what I can see, even when I stretch the make menuconfig window as wide as the whole screen, and there's no option I can find to scroll the text to see it all. Very frustrating, as most of this ordeal has been. BTW, thanks a lot to whomever saw fit to downvote without leaving a helpful comment.

So I try to navigate to this option using the "search" information above, but it's still nowhere to be found!

When I go to the Kernel hacking ---> menu, there is no choice to enable stack frames. There is also no menu choice "Compile-time checks and compiler options" as indicated in @ShantanuAde's answer. I see these choices:

------- Kernel hacking -------------------------
[ ] Show timing information on printks
[ ] Enable __deprecated logic
[ ] Enable __must_check logic
(1024) Warn for stack frames larger than (needs gcc 4.4)
[ ] Magic SysRq key
[ ] Enable unused/obsolete exported symbols
[ ] Debug Filesystem
[ ] Run 'make headers_check' when building vmlinux
[ ] Kernel debugging
[ ] Debug memory initialisation
[ ] Check for stalled CPUs delaying RCU grace periods
[ ] Sysctl checks
[ ] Sample kernel code  --->
[ ] Full Symbolic/Source Debugging support
[ ] Use fast second timer for profiling
[ ] Compiled-in Kernel Boot Parameter
[ ] Suppress Kernel BUG Messages

The only thing I can think of that might get me closer to CONFIG_FRAME_POINTER is "Kernel debugging" but when I turn that on, the only extra options I get are:

[*] Kernel debugging
[ ]   Debug shared IRQ handlers (NEW)
[*]   Detect Soft Lockups (NEW)
[ ]     Panic (Reboot) On Soft Lockups (NEW)
[*]   Detect Hung Tasks (NEW)
[ ]     Panic (Reboot) On Hung Tasks (NEW)
[*]   Collect scheduler debugging info (NEW)
[ ]   Collect scheduler statistics (NEW)
[ ]   Collect kernel timers statistics (NEW)
[ ]   Debug object operations (NEW)
[ ]   Debug slab memory allocations (NEW)
[ ] Spinlock and rw-lock debugging: basic checks (NEW)
[ ] Mutex debugging: basic checks (NEW)
[ ] Spinlock debugging: sleep-inside-spinlock checking (NEW)
[ ] Locking API boot-time self-tests (NEW)
[ ] kobject debugging (NEW)
[ ] Verbose BUG() reporting (adds 70K) (NEW)
[ ] Compile the kernel with debug info (NEW)
[ ] Debug VM (NEW)
[ ] Debug the global anon/private NOMMU mapping region tree (NEW)
[ ] Debug filesystem writers count (NEW)

Very, very frustrating. And it doesn't help when jerks downvote without leaving any helpful info.

like image 998
phonetagger Avatar asked Oct 04 '17 21:10

phonetagger


3 Answers

In make menuconfig tool key / opens a search dialog. Input required option into it, and information about this option will be displayed. This information includes "path" in options tree.

Note, that an option appears in the options tree only when its Depends on expression is satisfied; you may check these options with additional / searches.

Some options are never shown in the tree (for such options "Location" section is absent), so they cannot be selected by a user. Usually, these options are defined by the architecture against which the kernel is compiled.

like image 152
Tsyvarev Avatar answered Sep 23 '22 00:09

Tsyvarev


the number is the index of seach results. u jump to the result quickly

like image 25
Joe Yin Avatar answered Sep 25 '22 00:09

Joe Yin


As pointed of above; search for "FRAME_POINTER" after make menuconfig by pressing '/' key. It'll display all the config option having this string. Press the number against the desired option. It'll take you to that specific configuration. Change configuration with a "space" key. Don't forget to save before exiting.

On my system, I got below output listed first

Symbol: FRAME_POINTER [=y]
Type : boolean
Prompt: Compile the kernel with frame pointers
Location:
-> Kernel hacking (1) -> Compile-time checks and compiler options

like image 23
Shantanu Ade Avatar answered Sep 24 '22 00:09

Shantanu Ade