Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to read freebsd kernel source? Post 302212082 by Franklin52 on Sunday 6th of July 2008 08:10:07 AM
Old 07-06-2008
You can find the source code in /usr/src/sys directory. If there isn't such a directory on your system you can install it with sysinstall.
Run sysinstall as root, choose Configure, then Distributions, then src, then base and sys.

Regards

Last edited by Franklin52; 07-06-2008 at 09:40 AM..
 

9 More Discussions You Might Find Interesting

1. BSD

Need help on Kernel Configuration for FreeBSD

Does anyone know how to enter the Kernel Configuration program in FreeBSD before installation to resolve conflicts of hardware?:confused: (3 Replies)
Discussion started by: Enoch Chan
3 Replies

2. UNIX for Advanced & Expert Users

How to read freebsd kernel source?

I got the freebsd kernel source from the first install CD(in directory:\7.0-RELEASE\src\),isn't right? if so,how can i read it? Is there any tools? (1 Reply)
Discussion started by: zhouq3132
1 Replies

3. BSD

FreeBSD - Kernel Queries/Issues

All, I am a bit of a BSD newbie and haven't really played with it for years, but I have had a recent situation whereby someone attempted to load a custom kernel module and ended up breaking my BSD server. I managed to fix it by doing the following: Booting into loader mode: unload set... (3 Replies)
Discussion started by: drbabbers
3 Replies

4. BSD

FreeBSD Kernel Internals, Dr. Marshall Kirk McKusick

FreeBSD Kernel Internals, Dr. Marshall Kirk McKusick nwbqBdghh6E The first hour of Marshall Kirk McKusick's course on FreeBSD kernel internals based on his book, The Design and Implementation of the FreeBSD Operating System. (0 Replies)
Discussion started by: Neo
0 Replies

5. UNIX Benchmarks

FreeBSD 7.2 build kernel benchmarks

Just for fun: CPU/Speed: 2x AMD Opteron Model 2384 (2.7GHz/512KB) quad core processor Ram: 4 x2GB ECC DDR2-667 single rank memory in RAID 0 mode (strip 128KB, Read Caching enabled, Write Caching disabled) with 2 HDD, CPUTYPE=opteron, CFLAGS= -O2 -fno-strict-aliasing -pipe, CXXFLAGS+=... (0 Replies)
Discussion started by: Success_Tree
0 Replies

6. Solaris

Which file is read by kernel to set its default system kernel parameters values?

Hi gurus Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies

7. UNIX for Dummies Questions & Answers

Any tips/suggestions for a newbie beginning to read the Linux Kernel Source Code

Hi All, I recently downloaded the Linux kernel source code, added them all to a project in MS VC++ and plan to read through it so that I can improve the way I code, read/understand a large code database and hopefully contribute something to the development of the Linux OS. I have taken a... (3 Replies)
Discussion started by: clavian
3 Replies

8. UNIX for Dummies Questions & Answers

How to install kernel source?

During installation of one of driver i needed to Remove any earlier version drivers using make clean -r command. Where i m getting following error. # make clean -r Kernel source is not installed make: *** Error 1 My kernel version # uname -r 2.6.18-128.2.1.4.9.el5xen Where... (4 Replies)
Discussion started by: pinga123
4 Replies

9. UNIX for Dummies Questions & Answers

Create a tgz from source FreeBSD

Hello, i'm having a problem here with FreeBSD 9.2 . I've created a directory and downloaded the latest ntp-4.2.8p1-beta2 from ntp.org. Untar then into the directory and then ./configure all went OK. Then i had to modify some parameters in the config.h created with ./configure . Then make... (2 Replies)
Discussion started by: Board27
2 Replies
GLOBAL(1)						      General Commands Manual							 GLOBAL(1)

NAME
global - print the locations of specified object. SYNOPSIS
global [-aGilnqrstTvx][-e] pattern global -c[qrsv] prefix global -f[anqrstvx] files global -g[aGilnoOqtvx][-e] pattern global -I[ailnqtvx][-e] pattern global -P[aGilnoOqtvx][-e] pattern global -p[qrv] global -u[qv] DESCRIPTION
Global find the locations of specified object in C, C++, Yacc, Java, PHP and Assembly source files. Global can treat a source tree, that is, a directory that has sub-directories and source files as a project. You can get the relative path of objects from anywhere within the project. Global can locate not only object definitions but also object references and other symbols. In advance of using this command, you must execute gtags(1) at the root directory of the project to make tag files. Then you can execute this command at anywhere in the project. COMMANDS
The following commands are available: <no command> pattern Print object which match to the pattern. Extended regular expressions which are the same as those accepted by egrep(1) are avail- able. -c, --completion [prefix] Print the candidates of object names which start with the specified prefix. Prefix is not specified, print all object names. -f, --file files Print all tags in the files. This option implies the -x option. -g, --grep pattern Print all lines which match to the pattern. --help Show help. -I, --idutils pattern Print all lines which match to the pattern. This function use idutils(1) as a search engine. To use this command, you need to install idutils(1) in your system and you must execute gtags(1) with the -I option. -P, --path [pattern] Print the paths which match to the pattern. If no pattern specified, print all paths in the project. -p, --print-dbpath Print the location of 'GTAGS'. -u, --update Locate tag files and update them incrementally. --version Show version number. OPTIONS
The following options are available: -a, --absolute Print absolute path name. By default, print relative path name. --from-here context Decide tag type by the context. The context must be 'lineno:path'. If this option is specified then the -s and -r are ignored. Regular expression is not allowed in the pattern. This option is assumes use in conversational environments such as editors and IDEs. -e, --regexp pattern Use pattern as the pattern; useful to protect patterns beginning with '-'. -G, --basic-regexp Interpret pattern as a basic regular expression. The default is extended regular expression. -i, --ignore-case ignore case distinctions in pattern. -l, --local Print just objects which exist under the current directory. -n, --nofilter Suppress sort filter and path conversion filter. -O, --only-other Search pattern only in other than source files like 'README'. This option is valid only with -g or -P command. This option over- ride the -o option. -o, --other Search pattern in not only source files but also other files like 'README'. This option is valid only with -g or -P command. -q, --quiet Quiet mode. -r, --reference, --rootdir Print the locations of object references. By default, print object definitions. With the -p option, print the root directory of source tree. --result format format may be 'path', `ctags', `ctags-x', `grep' or 'cscope'. The --result=ctags and --result=ctags-x are equivalent to the -t and -x respectively. The --result option is given to priority more than the -t and -x option. -s, --symbol Print the locations of specified symbol other than definitions. -T, --through Go through all the tag files listed in GTAGSLIBPATH. By default, stop searching when tag is found. This option is ignored when either -s, -r or -l option is specified. -t, --tags Print with standard ctags format. -v, --verbose Verbose mode. -x, --cxref In addition to the default output, produce the line number and the line contents. EXAMPLES
$ ls -F Makefile src/ lib/ $ gtags $ global main src/main.c $ global -x main main 10 src/main.c main (argc, argv) { $ global -x '^[sg]et' set_num 20 lib/util.c set_num(values) get_num 30 lib/util.c get_num() { $ global -rx '^[sg]et' set_num 113 src/op.c set_num(32); set_num 225 src/opop.c if (set_num(0) > 0) { get_num 90 src/op.c while (get_num() > 0) { $ cd lib $ global -rx '^[sg]et' set_num 113 ../src/op.c set_num(32); set_num 225 ../src/opop.c if (set_num(0) > 0) { get_num 90 ../src/op.c while (get_num() > 0) { $ global strlen $ (cd /usr/src/sys; gtags) $ export GTAGSLIBPATH=/usr/src/sys $ global strlen ../../../usr/src/sys/libkern/strlen.c $ (cd /usr/src/lib; gtags) $ GTAGSLIBPATH=/usr/src/lib:/usr/src/sys $ global strlen ../../../usr/src/lib/libc/string/strlen.c FILES
'GTAGS' Tag file for object definitions. 'GRTAGS' Tag file for object references. 'GSYMS' Tag file for other symbols. 'GPATH' Tag file for path of source files. 'GTAGSROOT' If environment variable GTAGSROOT is not set and 'GTAGSROOT' exist in the same directory with 'GTAGS' then use the value as GTAGS- ROOT. '/etc/gtags.conf', '$HOME/.globalrc' Configuration file. ENVIRONMENT
The following environment variables affect the execution of global: GTAGSROOT The directory which is the root of source code. GTAGSDBPATH The directory on which gtags database exist. This value is ignored when GTAGSROOT is not defined. GTAGSLIBPATH If this variable is set, it is used as the path to search for library functions. If the specified function is not found in the source project, global also search in these paths. GTAGSLABEL If this variable is set, its value is used as the label of configuration file. The default is default. MAKEOBJDIRPREFIX If this variable is set, '$MAKEOBJDIRPREFIX<current directory>' is used as the candidate directory for tag files. CONFIGURATION
The following configuration variables affect the execution of global: icase_path(boolean) Ignore case distinctions in the pattern. DIAGNOSTICS
Global exits with a non 0 value if an error occurred, 0 otherwise. SEE ALSO
gtags-parser(1), gtags(1), htags(1), less(1). GNU GLOBAL source code tag system (http://www.gnu.org/software/global/). AUTHOR
Tama Communications Corporation. HISTORY
The global command appeared in FreeBSD 2.2.2. GNU Project March 2008 GLOBAL(1)
All times are GMT -4. The time now is 05:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy