I have an Android TV stck
I compiled Linux for IT from https://github.com/Galland/rk3x_kernel_3.0.36
But when I booted that Image I found /proc/config.gz is of 0 bytes
can some please explain how the command line params from .config file in kernel source get mounted to /proc.
I mean what goes in the background??
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Files in /proc do not have a file size in general, and are shown as having 0 size in ls -l, but you can read data from them anyway (see man 5 proc).
Try, for example:
zcat /proc/config.gz | wc
or:
$ ls -l /proc/cmdline -r--r--r-- 1 root root 0 Aug 4 10:16 /proc/cmdline
Looks empty. But:
$ cat /proc/cmdline | wc
1 5 114
it contains data. Let’s see:
$ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-3.13.0-24-generic root=UUID=fc48808f-8f06-47fc-a1fe-5d08ee9e0a50 ro noirqdebug nomodeset
feels like a normal file – except if you want to do anything special, like reading by blocks, seek(), or loking at the size.
In case you can not read /proc/config.gz, there is a file that normally contains the same:
less /lib/modules/$(uname -r)/build/.config
See man proc for details.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0