Use embedded Linux and open-source software to build a networked audio appliance.
ZFS is often looked upon as an advanced, superior file-system and one of the strong points of the Solaris/OpenSolaris platform while most feel that only recently has Linux been able to catch-up on the file-system front with EXT4 and the still-experimental Btrfs.
It runs on computers based on the 32-bit Intel x86 architecture, or on 64-bit AMD processors in 32-bit mode.
By Source Seeker on Wed, 07/28/10 - 5:55pm. Yesterday SAP took another step into the open source world by signing on to use the Black Duck Suite .
WikiLeaks is currently in the news because its Afghan War logs comprise one of the largest and most controversial intelligence leaks to date.
Convirture has unveiled a management tool for open source hypervisors. It's been clear from the beginning of the server virtualization wave that eventually the hypervisor would become commoditized and that the real action, in terms of functionality as well as in money, would come with the management tools that wrap around the hypervisor and make it ...
May 4, 2009 ... As an alternative to downloading the files, the HCPM/HAI Synthesis Cost Proxy Model may be obtained from the FCC's duplicating contractor, ... http://www.fcc.gov/ccb/apd/hcpm/ Patent Database Notices and Status The database servers are now capable of processing approximately 300 simultaneous searches.
Marvell announced the availability of an open source installer, simplifying software deployment on its Linux-based Plug Computer reference design.
July 28, 2010, 09:59 AM - Computerworld - Google on Monday patched five vulnerabilities in Chrome by issuing a new "stable" build of the browser.
| Browse in : |
All
> Documents
> Man Pages
> Special Files (101)
|
Section N`34`InputDeviceN`34` Identifier N`34`idevnameN`34` Driver N`34`aiptekN`34` Option N`34`DeviceN`34` N`34`devpathN`34` ... EndSection
The aiptek driver functions as a pointer input device, and may be used as the X server`s core pointer.
Multiple instances of the Aiptek devices can cohabit. It can be useful to define multiple devices with different active zones. Each device supports the following entries:
This driver is currently Linux specific.
Sockets in the AppleTalk protocol family use the following address structure:
struct sockaddr_at { short sat_family; u_char sat_port; struct at_addr sat_addr; char sat_zero[ 8 ]; };
The port of a socket may be set with bind(2). The node for bind must always be ATADDR_ANYNODE: ``this node.`` The net may be ATADDR_ANYNET or ATADDR_LATENET. ATADDR_ANYNET coresponds to the machine`s ``primary`` address (the first configured). ATADDR_LATENET causes the address in outgoing packets to be determined when a packet is sent, i.e. determined late. ATADDR_LATENET is equivalent to opening one socket for each network interface. The port of a socket and either the primary address or ATADDR_LATENET are returned with getsockname(2).
Section N`34`DeviceN`34` Identifier N`34`devnameN`34` Driver N`34`cirrusN`34` ... EndSection
Before kernel version 1.1.54 the number of virtual consoles was compiled into the kernel (in tty.h: #define NR_CONSOLES 8) and could be changed by editing and recompiling. Since version 1.1.54 virtual consoles are created on the fly, as soon as they are needed.
Common ways to start a process on a console are: (a) tell init(8) (in inittab(5)) to start a getty(8) on the console; (b) ask openvt(1) to start a process on the console; (c) start X - it will find the first unused console, and display its output there. (There is also the ancient doshell(8).)
Common ways to switch consoles are: (a) use Alt+Fn or Ctrl+Alt+Fn to switch to console n; AltGr+Fn might bring you to console n+12 [here Alt and AltGr refer to the left and right Alt keys, respectively]; (b) use Alt+RightArrow or Alt+LeftArrow to cycle through the presently allocated consoles; (c) use the program chvt(1). (The key mapping is user settable, see loadkeys(1); the above mentioned key combinations are according to the default settings.)
The command deallocvt(1) (formerly disalloc) will free the memory taken by the screen buffers for consoles that no longer have any associated process.
LED_CAP 0x04 caps lock led
LEC_NUM 0x02 num lock led
LED_SCR 0x01 scroll lock led
Before 1.1.54, the LEDs just reflected the state of the corresponding keyboard flags, and KDGETLED/KDSETLED would also change the keyboard flags. Since 1.1.54 the leds can be made to display arbitrary information, but by default they display the keyboard flags. The following two ioctl`s are used to access the keyboard flags.
KD_TEXT 0x00
KD_GRAPHICS 0x01
struct consolefontdesc { u_short charcount; /* characters in font (256 or 512) */ u_short charheight; /* scan lines per character (1-32) */ char *chardata; /* font data in expanded form */ };
If necessary, the screen will be appropriately resized, and SIGWINCH sent to the appropriate processes. This call also invalidates the Unicode mapping. (Since 1.3.1.)
struct unimapdesc { u_short entry_ct; struct unipair *entries; };
where entries points to an array of
struct unipair { u_short unicode; u_short fontpos; };
(Since 1.1.92.)
struct unimapinit { u_short advised_hashsize; /* 0 if no opinion */ u_short advised_hashstep; /* 0 if no opinion */ u_short advised_hashlevel; /* 0 if no opinion */ };
(Since 1.1.92.)
K_RAW 0x00
K_XLATE 0x01
K_MEDIUMRAW 0x02
K_UNICODE 0x03
K_METABIT 0x03 set high order bit
K_ESCPREFIX 0x04 escape prefix
struct kbentry { u_char kb_table; u_char kb_index; u_short kb_value; };
with the first two members filled in: kb_table selects the key table (0 <= kb_table < MAX_NR_KEYMAPS), and kb_index is the keycode (0 <= kb_index < NR_KEYS). kb_value is set to the corresponding action code, or K_HOLE if there is no such key, or K_NOSUCHMAP if kb_table is invalid.
struct kbsentry { u_char kb_func; u_char kb_string[512]; };
kb_string is set to the (NULL terminated) string corresponding to the kb_functh function key action code.
struct kbdiacrs { unsigned int kb_cnt; struct kbdiacr kbdiacr[256]; };
where kb_cnt is the number of entries in the array, each of which is a
struct kbdiacr { u_char diacr, base, result; };
struct kbkeycode { unsigned int scancode, keycode; };
keycode is set to correspond to the given scancode. (89 <= scancode <= 255 only. For 1 <= scancode <= 88, keycode==scancode.) (Since 1.1.63.)
struct vt_mode { char mode; /* vt mode */ char waitv; /* if set, hang on writes if not active */ short relsig; /* signal to raise on release req */ short acqsig; /* signal to raise on acquisition */ short frsig; /* unused (set to 0) */ };
mode is set to one of these values:
VT_AUTO auto vt switching
VT_PROCESS process controls switching
VT_ACKACQ acknowledge switch
struct vt_stat { ushort v_active; /* active vt */ ushort v_signal; /* signal to send */ ushort v_state; /* vt bitmask */ };
For each vt in use, the corresponding bit in the v_state member is set. (Kernels 1.0 through 1.1.92.)
struct vt_sizes { ushort v_rows; /* # rows */ ushort v_cols; /* # columns */ ushort v_scrollsize; /* no longer used */ };
Note that this does not change the videomode. See resizecons(8). (Since 1.1.54.)
struct vt_consize { ushort v_rows; /* number of rows */ ushort v_cols; /* number of columns */ ushort v_vlin; /* number of pixel rows on screen */ ushort v_clin; /* number of pixel rows per character */ ushort v_vcol; /* number of pixel columns on screen */ ushort v_ccol; /* number of pixel columns per character */ };
Any parameter may be set to zero, indicating ``no change``, but if multiple parameters are set, they must be self-consistent. Note that this does not change the videomode. See resizecons(8). (Since 1.3.3.)
The action of the following ioctls depends on the first byte in the struct pointed to by argp, referred to here as the subcode. These are legal only for the superuser or the owner of the current tty.
struct {char subcode;
short xs, ys, xe, ye;
short sel_mode;
}
xs and ys are the starting column and row. xe and ye are the ending column and row. (Upper left corner is row=column=1.) sel_mode is 0 for character-by-character selection, 1 for word-by-word selection, or 2 for line-by-line selection. The indicated screen characters are highlighted and saved in the static array sel_buffer in devices/char/console.c.
0: Screen blanking is disabled.
1: The current video adapter register settings are saved, then the controller is programmed to turn off the vertical synchronization pulses. This puts the monitor into "standby" mode. If your monitor has an Off_Mode timer, then it will eventually power down by itself.
2: The current settings are saved, then both the vertical and horizontal synchronization pulses are turned off. This puts the monitor into "off" mode. If your monitor has no Off_Mode timer, or if you want your monitor to power down immediately when the blank_timer times out, then you choose this option. (Caution: Powering down frequently will damage the monitor.)
(Since 1.1.76.)
Programs using these ioctl`s will not be portable to other versions of Unix, will not work on older versions of Linux, and will not work on future versions of Linux.
Use POSIX functions.
The dmc driver functions as a pointer input device, and may be used as the X server`s core pointer. THIS MAN PAGE NEEDS TO BE FILLED IN.
Section N`34`InputDeviceN`34` Identifier N`34`idevnameN`34` Driver N`34`dynaproN`34` Option N`34`DeviceN`34` N`34`devpathN`34` ... EndSection
The dynapro driver functions as a pointer input device, and may be used as the X server`s core pointer. THIS MAN PAGE NEEDS TO BE FILLED IN.
In the following discussion of the flags, let # and @ be "variables" that can stand for any letter. Upper case letters are constants. "..." stands for any string of zero or more letters, but note that no word may exist in the dictionary which is not at least 2 letters long, so, for example, "fly" may not be produced by placing the "Y" flag on "f". Also, no flag is effective unless the word that it creates is at least 4 letters long, so, for example, "wed" may not be produced by placing the "D" flag on "we".
In the following list, an asterisk indicates that a flag participates in cross-product formation (see okspell(4)).
The meaning of the prefix flags is as follows:
The meaning of the suffix flags is as follows:
To summarize more briefly:
Prefixes:
*A - re *I - in *U - un
Suffixes:
V - ive *N - ion, tion, en *X - ions, ications, ens H - th, ieth *Y - ly *G - ing *J - ings *D - ed T - est *R - er *Z - ers *S - s, es, ies *P - ness, iness *M - `s
Section N`34`DeviceN`34` Identifier N`34`devnameN`34` Driver N`34`fbdevN`34` BusID N`34`pci:bus:dev:funcN`34` ... EndSection
For this driver it is not required to specify modes in the screen section of the config file. The fbdev driver can pick up the currently used video mode from the framebuffer driver and will use it if there are no video modes configured.
For PCI boards you might have to add a BusID line to the Device section. See above for a sample line. You can use N`34`Xorg -scanpciN`34` to figure out the correct values.
The following driver Options are supported:
Warning: If you use formats with more tracks than supported by your drive, you may cause it mechanical damage. Trying once if more tracks than the usual 40/80 are supported should not damage it, but no warranty is given for that. Don`t create device entries for those formats to prevent their usage if you are not sure.
Drive independent device files which automatically detect the media format and capacity:
| Name | Base minor # |
| fdn | 0 |
5.25 inch double density device files:
| Name | Capac. | Cyl. | Sect. | Heads | Base minor # |
| fdnd360 | 360K | 40 | 9 | 2 | 4 |
5.25 inch high density device files:
| Name | Capac. | Cyl. | Sect. | Heads | Base minor # |
| fdnh360 | 360K | 40 | 9 | 2 | 20 |
| fdnh410 | 410K | 41 | 10 | 2 | 48 |
| fdnh420 | 420K | 42 | 10 | 2 | 64 |
| fdnh720 | 720K | 80 | 9 | 2 | 24 |
| fdnh880 | 880K | 80 | 11 | 2 | 80 |
| fdnh1200 | 1200K | 80 | 15 | 2 | 8 |
| fdnh1440 | 1440K | 80 | 18 | 2 | 40 |
| fdnh1476 | 1476K | 82 | 18 | 2 | 56 |
| fdnh1494 | 1494K | 83 | 18 | 2 | 72 |
| fdnh1600 | 1600K | 80 | 20 | 2 | 92 |
3.5 inch double density device files:
| Name | Capac. | Cyl. | Sect. | Heads | Base minor # |
| fdnD360 | 360K | 80 | 9 | 1 | 12 |
| fdnD720 | 720K | 80 | 9 | 2 | 16 |
| fdnD800 | 800K | 80 | 10 | 2 | 120 |
| fdnD1040 | 1040K | 80 | 13 | 2 | 84 |
| fdnD1120 | 1120K | 80 | 14 | 2 | 88 |
3.5 inch high density device files:
| Name | Capac. | Cyl. | Sect. | Heads | Base minor # |
| fdnH360 | 360K | 40 | 9 | 2 | 12 |
| fdnH720 | 720K | 80 | 9 | 2 | 16 |
| fdnH820 | 820K | 82 | 10 | 2 | 52 |
| fdnH830 | 830K | 83 | 10 | 2 | 68 |
| fdnH1440 | 1440K | 80 | 18 | 2 | 28 |
| fdnH1600 | 1600K | 80 | 20 | 2 | 124 |
| fdnH1680 | 1680K | 80 | 21 | 2 | 44 |
| fdnH1722 | 1722K | 82 | 21 | 2 | 60 |
| fdnH1743 | 1743K | 83 | 21 | 2 | 76 |
| fdnH1760 | 1760K | 80 | 22 | 2 | 96 |
| fdnH1840 | 1840K | 80 | 23 | 2 | 116 |
| fdnH1920 | 1920K | 80 | 24 | 2 | 100 |
3.5 inch extra density device files:
| Name | Capac. | Cyl. | Sect. | Heads | Base minor # |
| fdnE2880 | 2880K | 80 | 36 | 2 | 32 |
| fdnCompaQ | 2880K | 80 | 36 | 2 | 36 |
| fdnE3200 | 3200K | 80 | 40 | 2 | 104 |
| fdnE3520 | 3520K | 80 | 44 | 2 | 108 |
| fdnE3840 | 3840K | 80 | 48 | 2 | 112 |
For more precise information, consult also the <linux/fd.h> and <linux/fdreg.h> include files, as well as the manual page for floppycontrol.
Section N`34`InputDeviceN`34` Identifier N`34`idevnameN`34` Driver N`34`fpitN`34` Option N`34`DeviceN`34` N`34`devpathN`34` ... EndSection
The fpit driver functions as a pointer input device, and may be used as the X server`s core pointer.
Under Linux the Fujitsus serial port is not, by default, detected. Therefore the following must be added to one of your start-up scripts. (Either one of the X scripts, or to rc.local or similar).
The device supports the following options:
Example, for Stylistic LT setup is:
Section N`34`InputDeviceN`34` Identifier N`34`mouse0N`34` Driver N`34`fpitN`34` Option N`34`DeviceN`34` N`34`/dev/ttyS3N`34` EndSection
And for other Stylistic devices try:
Section N`34`InputDeviceN`34` Identifier N`34`mouse0N`34` Driver N`34`fpitN`34` Option N`34`DeviceN`34` N`34`/dev/ttyS3N`34` Option N`34`BaudRateN`34` N`34`19200N`34` Option N`34`MaximumXPositionN`34` N`34`6250N`34` Option N`34`MaximumYPositionN`34` N`34`4950N`34` Option N`34`MinimumXPositionN`34` N`34`130N`34` Option N`34`MinimumYPositionN`34` N`34`0N`34` Option N`34`InvertYN`34` EndSection
X4 Port: Richard Miller-Smith <richard.miller-smith@philips.com>, based on Elographics code from: Patrick Lecoanet
X4.2 Cleanup: Alan Cox
#include <linux/futex.h>
The Linux kernel provides futexes (`Fast Userspace muTexes`) as a building block for fast userspace locking and semaphores. Futexes are very basic and lend themselves well for building higher level locking abstractions such as POSIX mutexes.
This page does not set out to document all design decisions but restricts itself to issues relevant for application and library development. Most programmers will in fact not be using futexes directly but instead rely on system libraries built on them, such as the NPTL pthreads implementation.
A futex is identified by a piece of memory which can be shared between different processes. In these different processes, it need not have identical addresses. In its bare form, a futex has semaphore semantics; it is a counter that can be incremented and decremented atomically; processes can wait for the value to become positive.
Futex operation is entirely userspace for the non-contended case. The kernel is only involved to arbitrate the contended case. As any sane design will strive for non-contension, futexes are also optimised for this situation.
In its bare form, a futex is an aligned integer which is only touched by atomic assembler instructions. Processes can share this integer over mmap, via shared segments or because they share memory space, in which case the application is commonly called multithreaded.
Any futex operation starts in userspace, but it may necessary to communicate with the kernel using the futex(2) system call.
To `up` a futex, execute the proper assembler instructions that will cause the host CPU to atomically increment the integer. Afterwards, check if it has in fact changed from 0 to 1, in which case there were no waiters and the operation is done. This is the non-contended case which is fast and should be common.
In the contended case, the atomic increment changed the counter from -1 (or some other negative number). If this is detected, there are waiters. Userspace should now set the counter to 1 and instruct the kernel to wake up any waiters using the FUTEX_WAKE operation.
Waiting on a futex, to `down` it, is the reverse operation. Atomically decrement the counter and check if it changed to 0, in which case the operation is done and the futex was uncontended. In all other circumstances, the process should set the counter to -1 and request that the kernel wait for another process to up the futex. This is done using the FUTEX_WAIT operation.
The futex system call can optionally be passed a timeout specifying how long the kernel should wait for the futex to be upped. In this case, semantics are more complex and the programmer is referred to futex(2) for more details. The same holds for asynchronous futex waiting.
To reiterate, bare futexes are not intended as an easy to use abstraction for end-users. Implementors are expected to be assembly literate and to have read the sources of the futex userspace library referenced below.
This man page illustrates the most common use of the futex(2) primitives: it is by no means the only one.
Futexes were designed and worked on by Hubertus Franke (IBM Thomas J. Watson Research Center), Matthew Kirkwood, Ingo Molnar (Red Hat) and Rusty Russell (IBM Linux Technology Center). This page written by bert hubert.
Initial futex support was merged in Linux 2.5.7 but with different semantics from those described above. Current semantics are available from Linux 2.5.40 onwards.
futex(2), `Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux` (proceedings of the Ottawa Linux Symposium 2002), futex example library, futex-*.tar.bz2 <URL:ftp://ftp.kernel.org:/pub/linux/kernel/people/rusty/>.
Section N`34`DeviceN`34` Identifier N`34`devnameN`34` Driver N`34`glintN`34` ... EndSection
The driver auto-detects the chipset type, but the following ChipSet names may optionally be specified in the config file N`34`DeviceN`34` section, and will override the auto-detection:
The driver will try to auto-detect the amount of video memory present for all chips. If it`s not detected correctly, the actual amount of video memory should be specified with a VideoRam entry in the config file N`34`DeviceN`34` section.
Additionally, you may need to specify the bus ID of your card with a BusID entry in the config file N`34`DeviceN`34` section, especially with FBDev support.
The following driver Options are supported:
Section N`34`DeviceN`34` Identifier N`34`devnameN`34` Driver N`34`i128N`34` ... EndSection
The driver auto-detects the chipset type and may not be overridden.
The driver auto-detects the amount of video memory present for all chips and may not be overridden.
The following driver Options are supported:
Section N`34`DeviceN`34` Identifier N`34`devnameN`34` Driver N`34`i810N`34` ... EndSection
The Intel 8xx family of integrated graphics chipsets has a unified memory architecture and uses system memory for video ram. For the i810 and i815 familiy of chipset, operating system support for allocating system memory for video use is required in order to use this driver. For the 830M and later, this is required in order for the driver to use more video ram than has been pre-allocated at boot time by the BIOS. This is usually achieved with an "agpgart" or "agp" kernel driver. Linux, and recent versions of FreeBSD, OpenBSD and NetBSD have such kernel drivers available.
By default 8 Megabytes of system memory are used for graphics. For the 830M and later, the default is 8 Megabytes when DRI is not enabled and 32 Megabytes with DRI is enabled. This amount may be changed with the VideoRam entry in the config file Device section. It may be set to any reasonable value up to 64MB for older chipsets or 128MB for newer chipets. It is advisable to check the Xorg log file to check if any features have been disabled because of insufficient video memory. In particular, DRI support or tiling mode may be disabled with insufficient video memory. Either of these being disabled will reduce performance for 3D applications. Note however, that increasing this value too much will reduce the amount of system memory available for other applications.
The driver makes use of the video BIOS to program video modes for the 830M and later. This limits the video modes that can be used to those provided by the video BIOS, and to those that will fit into the amount of video memory that the video BIOS is aware of.
The following driver Options are supported
The following driver Options are supported for the i810 and i815 chipsets:
The following driver Options are supported for the 830M and later chipsets:
In the first boot-up phase, the kernel starts up and mounts an initial root file-system from the contents of /dev/initrd (e.g. RAM disk initialized by the boot loader). In the second phase, additional drivers or other modules are loaded from the initial root device`s contents. After loading the additional modules, a new root file system (i.e. the normal root file system) is mounted from a different device.
1. The boot loader loads the kernel program and /dev/initrd`s contents into memory.
2. On kernel startup, the kernel uncompresses and copies the contents of the device /dev/initrd onto device /dev/ram0 and then frees the memory used by /dev/initrd.
3. The kernel then read-write mounts device /dev/ram0 as the initial root file system.
4. If the indicated normal root file system is also the initial root file-system (e.g. /dev/ram0 ) then the kernel skips to the last step for the usual boot sequence.
5. If the executable file /linuxrc is present in the initial root file-system, /linuxrc is executed with uid 0. (The file /linuxrc must have executable permission. The file /linuxrc can be any valid executable, including a shell script.)
6. If /linuxrc is not executed or when /linuxrc terminates, the normal root file system is mounted. (If /linuxrc exits with any file-systems mounted on the initial root file-system, then the behavior of the kernel is UNSPECIFIED. See the NOTES section for the current kernel behavior.)
7. If the normal root file has directory /initrd, device /dev/ram0 is moved from / to /initrd. Otherwise if directory /initrd does not exist device /dev/ram0 is unmounted. (When moved from / to /initrd, /dev/ram0 is not unmounted and therefore processes can remain running from /dev/ram0. If directory /initrd does not exist on the normal root file-system and any processes remain running from /dev/ram0 when /linuxrc exits, the behavior of the kernel is UNSPECIFIED. See the NOTES section for the current kernel behavior.)
8. The usual boot sequence (e.g. invocation of /sbin/init) is performed on the normal root file system.
It is also possible for the /linuxrc executable to change the normal root device. For /linuxrc to change the normal root device, /proc must be mounted. After mounting /proc, /linuxrc changes the normal root device by writing into the proc files /proc/sys/kernel/real-root-dev, /proc/sys/kernel/nfs-root-name, and /proc/sys/kernel/nfs-root-addrs. For a physical root device, the root device is changed by having /linuxrc write the new root file system device number into /proc/sys/kernel/real-root-dev. For a NFS root file system, the root device is changed by having /linuxrc write the NFS setting into files /proc/sys/kernel/nfs-root-name and /proc/sys/kernel/nfs-root-addrs and then writing 0xff (e.g. the pseudo-NFS-device number) into file /proc/sys/kernel/real-root-dev. For example, the following shell command line would change the normal root device to /dev/hdb1:
echo 0x365 >/proc/sys/kernel/real-root-dev
For a NFS example, the following shell command lines would change the normal root device to the NFS directory /var/nfsroot on a local networked NFS server with IP number 193.8.232.7 for a system with IP number 193.8.232.7 and named `idefix`:echo /var/nfsroot >/proc/sys/kernel/nfs-root-name echo 193.8.232.2:193.8.232.7::255.255.255.0:idefix >/proc/sys/kernel/nfs-root-addrs echo 255 >/proc/sys/kernel/real-root-dev
A possible system installation scenario is as follows:
1. The loader program boots from floppy or other media with a minimal kernel (e.g. support for /dev/ram, /dev/initrd, and the ext2 file-system) and loads /dev/initrd with a gzipped version of the initial file-system.
2. The executable /linuxrc determines what is needed to (1) mount the normal root file-system (i.e. device type, device drivers, file system) and (2) the distribution media (e.g. CD-ROM, network, tape, ...). This can be done by asking the user, by auto-probing, or by using a hybrid approach.
3. The executable /linuxrc loads the necessary modules from the initial root file-system.
4. The executable /linuxrc creates and populates the root file system. (At this stage the normal root file system does not have to be a completed system yet.)
5. The executable /linuxrc sets /proc/sys/kernel/real-root-dev, unmount /proc, the normal root file system and any other file systems it has mounted, and then terminates.
6. The kernel then mounts the normal root file system.
7. Now that the file system is accessible and intact, the boot loader can be installed.
8. The boot loader is configured to load into /dev/initrd a file system with the set of modules that was used to bring up the system. (e.g. Device /dev/ram0 can be modified, then unmounted, and finally, the image is written from /dev/ram0 to a file.)
9. The system is now bootable and additional installation tasks can be performed.
The key role of /dev/initrd in the above is to re-use the configuration data during normal system operation without requiring initial kernel selection, a large generic kernel or, recompiling the kernel.
A second scenario is for installations where Linux runs on systems with different hardware configurations in a single administrative network. In such cases, it may be desirable to use only a small set of kernels (ideally only one) and to keep the system-specific part of configuration information as small as possible. In this case, create a common file with all needed modules. Then, only the the /linuxrc file or a file executed by /linuxrc would be different.
A third scenario is more convenient recovery disks. Because information like the location of the root file-system partition is not needed at boot time, the system loaded from /dev/initrd can use a dialog and/or auto-detection followed by a possible sanity check.
Last but not least, Linux distributions on CD-ROM may use initrd for easy installation from the CD-ROM. The distribution can use LOADLIN to directly load /dev/initrd from CD-ROM without the need of any floppies. The distribution could also use a LILO boot floppy and then bootstrap a bigger ram disk via /dev/initrd from the CD-ROM.
mknod -m 400 /dev/initrd b 1 250 chown root:disk /dev/initrd
Also, support for both "RAM disk" and "Initial RAM disk" (e.g. CONFIG_BLK_DEV_RAM=y and CONFIG_BLK_DEV_INITRD=y ) support must be compiled directly into the Linux kernel to use /dev/initrd. When using /dev/initrd, the RAM disk driver cannot be loaded as a module.2. With the current kernel, if directory /initrd does not exist, then /dev/ram0 will NOT be fully unmounted if /dev/ram0 is used by any process or has any file-system mounted on it. If /dev/ram0 is NOT fully unmounted, then /dev/ram0 will remain in memory.
3. Users of /dev/initrd should not depend on the behavior give in the above notes. The behavior may change in future versions of the Linux kernel.
IrNET is a protocol allowing to create TCP/IP connections between two IrDA peers in an efficient fashion, and generally to enable standard networking over IrDA. It is a thin layer, passing PPP packets to IrTTP and vice versa. It uses PPP in synchronous mode, because IrTTP offer a reliable sequenced packet service (as opposed to a byte stream). In fact, you could see IrNET as carrying TCP/IP in a IrDA socket, using PPP to provide the glue.
The main difference with traditional PPP over IrCOMM is that it avoids the framing and serial emulation which are a performance bottleneck. It also allows multipoint communications in a sensible fashion. And finally, it can automatically handle incomming connections through irnetd.
The main difference with IrLAN is that we use PPP for the link management, which is more standard, interoperable and flexible than the IrLAN protocol. For example, PPP adds authentication, encryption, compression, header compression and automated routing setup. And, as IrNET let PPP do the hard work, the implementation is much simpler than IrLAN.
IrNET connections are initiated and managed with pppd(8). File /dev/irnet also offer a control channel. Reads from /dev/irnet will return various IrNET events. Write to /dev/irnet allow to configure the IrNET connection.
mknod -m 644 /dev/irnet c 10 187 chown root:root /dev/irnet
You will also need to have IrNET support in your kernel or as module and the Linux-IrDA stack installed and configured (see irattach(8)).
File /dev/irnet is supposed to only be used with the PPP line discipline or for accessing the control channel, other use are unsupported. IrNET support multiple concurent connections (limited by the IrDA stack), all those connections are multiplexed on a single /dev/irnet device (as opposed to IrCOMM which as one device per connection).
File /proc/net/irda/irnet will also show the current state of the various IrNET connections.
Start a IrNET client connecting to any IrDA peer:
pppd /dev/irnet 9600 local noauth nolock
Start a IrNET client connecting to the IrDA peer called
MyIrDANode:
pppd /dev/irnet 9600 local noauth nolock connect echo name MyIrDANode
Start a IrNET server accepting incomming connection from peer with IrDA address 0x12345678 only on IrDA port 0x87654321:
pppd /dev/irnet 9600 local noauth nolock passive connect echo daddr 0x12345678 , saddr 0x87654321
Other constants, necessary for ioctl`s on /dev/isdnctrl are listed in isdnctrl(4).
Ispell(1) requires two files to define the language that it is spell-checking. The first file is a dictionary containing words for the language, and the second is an "affix" file that defines the meaning of special flags in the dictionary. The two files are combined by buildhash (see ispell(1)) and written to a hash file which is not described here.
A raw ispell dictionary (either the main dictionary or your own personal dictionary) contains a list of words, one per line. Each word may optionally be followed by a slash ("/") and one or more flags, which modify the root word as explained below. Depending on the options with which ispell was built, case may or may not be significant in either the root word or the flags, independently. Specifically, if the compile-time option CAPITALIZATION is defined, case is significant in the root word; if not, case is ignored in the root word. If the compile-time option MASKBITS is set to a value of 32, case is ignored in the flags; otherwise case is significant in the flags. Contact your system administrator or ispell maintainer for more information (or use the -vv flag to find out). The dictionary should be sorted with the -f flag of sort(1) before the hash file is built; this is done automatically by munchlist(1), which is the normal way of building dictionaries.
If the dictionary contains words that have string characters (see the affix-file documentation below), they must be written in the format given by the defstringtype statement in the affix file. This will be the case for most non-English languages. Be careful to use this format, rather than that of your favorite formatter, when adding words to a dictionary. (If you add words to your personal dictionary during an ispell session, they will automatically be converted to the correct format. This feature can be used to convert an entire dictionary if necessary:)
echo qqqqq > dummy.dict buildhash dummy.dict affix-file dummy.hash awk `{print "*"}END{print "#"}` old-dict-file | ispell -a -T old-dict-string-type -d ./dummy.hash -p ./new-dict-file > /dev/null rm dummy.*
The case of the root word controls the case of words accepted by ispell, as follows:
Redundant capitalizations (e.g., bob and Bob) will be combined by buildhash and by ispell (for personal dictionaries), and can be removed from a raw dictionary by munchlist.
For example, the dictionary:
bob Robert UNIX ITcorp ITCorp
will accept bob, Bob, BOB, Robert, ROBERT, UNIX, ITcorp, ITCorp, and ITCORP, and will reject all others. Some of the unacceptable forms are bOb, robert, Unix, and ItCorp.
As mentioned above, root words in any dictionary may be extended by flags. Each flag is a single alphabetic character, which represents a prefix or suffix that may be added to the root to form a new word. For example, in an English dictionary the D flag can be added to bathe to make bathed. Since flags are represented as a single bit in the hashed dictionary, this results in significant space savings. The munchlist script will reduce an existing raw dictionary by adding flags when possible.
When a word is extended with an affix, the affix will be accepted only if it appears in the same case as the initial (prefix) or final (suffix) letter of the word. Thus, for example, the entry UNIX/M in the main dictionary (M means add an apostrophe and an "s" to make a possessive) would accept UNIX`S but would reject UNIX`s. If UNIX`s is legal, it must appear as a separate dictionary entry, and it will not be combined by munchlist. (In general, you don`t need to worry about these things; munchlist guarantees that its output dictionary will accept the same set of words as its input, so all you have to do is add words to the dictionary and occasionally run munchlist to reduce its size).
As mentioned, the affix definition file describes the affixes associated with particular flags. It also describes the character set used by the language.
Although the affix-definition grammar is designed for a line-oriented layout, it is actually a free-format yacc grammar and can be laid out weirdly if you want. Comments are started by a pound (sharp) sign (#), and continue to the end of the line. Backslashes are supported in the usual fashion (nnn, plus specials , , , v, f, , and the new hex format xnn). Any character with special meaning to the parser can be changed to an uninterpreted token by backslashing it; for example, you can declare a flag named `asterisk` or `colon` with flag *: or flag ::.
The grammar will be presented in a top-down fashion, with discussion of each element. An affix-definition file must contain exactly one table:
table : [headers] [prefixes] [suffixes]
At least one of prefixes and suffixes is required. They can appear in either order.
headers : [ options ] char-sets
The headers describe options global to this dictionary and language. These include the character sets to be used and the formatter, and the defaults for certain ispell flags.
options : { fmtr-stmt | opt-stmt | flag-stmt | num-stmt }
The options statements define the defaults for certain ispell flags and for the character sets used by the formatters.
fmtr-stmt : { nroff-stmt | tex-stmt }
A fmtr-stmt describes characters that have special meaning to a formatter. Normally, this statement is not necessary, but some languages may have preempted the usual defaults for use as language-specific characters. In this case, these statements may be used to redefine the special characters expected by the formatter.
nroff-stmt : { nroffchars | troffchars } string
The nroffchars statement allows redefinition of certain nroff control characters. The string given must be exactly five characters long, and must list substitutions for the left and right parentheses ("()") , the period ("."), the backslash (""), and the asterisk ("*"). (The right parenthesis is not currently used, but is included for completeness.) For example, the statement:
nroffchars {}.\*
would replace the left and right parentheses with left and right curly braces for purposes of parsing nroff/troff strings, with no effect on the others (admittedly a contrived example). Note that the backslash is escaped with a backslash.
tex-stmt : { TeXchars | texchars } string
The TeXchars statement allows redefinition of certain TeX/LaTeX control characters. The string given must be exactly thirteen characters long, and must list substitutions for the left and right parentheses ("()") , the left and right square brackets ("[]"), the left and right curly braces ("{}"), the left and right angle brackets ("<>"), the backslash (""), the dollar sign ("$"), the asterisk ("*"), the period or dot ("."), and the percent sign ("%"). For example, the statement:
texchars ()[]<><>\$*.%
would replace the functions of the left and right curly braces with the left and right angle brackets for purposes of parsing TeX/LaTeX constructs, while retaining their functions for the tib bibliographic preprocessor. Note that the backslash, the left square bracket, and the right angle bracket must be escaped with a backslash.
opt-stmt : { cmpnd-stmt | aff-stmt } cmpnd-stmt : compoundwords compound-opt aff-stmt : allaffixes on-or-off on-or-off : { on | off } compound-opt : { on-or-off | controlled character }
An opt-stmt controls certain ispell defaults that are best made language-specific. The allaffixes statement controls the default for the -P and -m options to ispell. If allaffixes is turned off (the default), ispell will default to the behavior of the -P flag: root/affix suggestions will only be made if there are no "near misses". If allaffixes is turned on, ispell will default to the behavior of the -m flag: root/affix suggestions will always be made. The compoundwords statement controls the default for the -B and -C options to ispell. If compoundwords is turned off (the default), ispell will default to the behavior of the -B flag: run-together words will be reported as errors. If compoundwords is turned on, ispell will default to the behavior of the -C flag: run-together words will be considered as compounds if both are in the dictionary. This is useful for languages such as German and Norwegian, which form large numbers of compound words. Finally, if compoundwords is set to controlled, only words marked with the flag indicated by character (which should not be otherwise used) will be allowed to participate in compound formation. Because this option requires the flags to be specified in the dictionary, it is not available from the command line.
flag-stmt : flagmarker character
The flagmarker statement describes the character which is used to separate affix flags from the root word in a raw dictionary file. This must be a character which is not found in any word (including in string characters; see below). The default is "/" because this character is not normally used to represent special characters in any language.
num-stmt : compoundmin digit
The compoundmin statement controls the length of the two components of a compound word. This only has an effect if compoundwords is turned on or if the -C flag is given to ispell. In that case, only words at least as long as the given minimum will be accepted as components of a compound. The default is 3 characters.
char-sets : norm-sets [ alt-sets ]
The character-set section describes the characters that can be part of a word, and defines their collating order. There must always be a definition of "normal" character sets; in addition, there may be one or more partial definitions of "alternate" sets which are used with various text formatters.
norm-sets : [ deftype ] charset-group
A "normal" character set may optionally begin with a definition of the file suffixes that make use of this set. Following this are one or more character-set declarations.
deftype : defstringtype name deformatter suffix*
The defstringtype declaration gives a list of file suffixes which should make use of the default string characters defined as part of the base character set; it is only necessary if string characters are being defined. The name parameter is a string giving the unique name associated with these suffixes; often it is a formatter name. If the formatter is a member of the troff family, "nroff" should be used for the name associated with the most popular macro package; members of the TeX family should use "tex". Other names may be chosen freely, but they should be kept simple, as they are used in ispell `s -T switch to specify a formatter type. The deformatter parameter specifies the deformatting style to use when processing files with the given suffixes. Currently, this must be either tex or nroff. The suffix parameters are a whitespace-separated list of strings which, if present at the end of a filename, indicate that the associated set of string characters should be used by default for this file. For example, the suffix list for the troff family typically includes suffixes such as ".ms", ".me", ".mm", etc.
charset-group : { char-stmt | string-stmt | dup-stmt}*
A char-stmt describes single characters; a string-stmt describes characters that must appear together as a string, and which usually represent a single character in the target language. Either may also describe conversion between upper and lower case. A dup-stmt is used to describe alternate forms of string characters, so that a single dictionary may be used with several formatting programs that use different conventions for representing non-ASCII characters.
char-stmt : wordchars character-range | wordchars lowercase-range uppercase-range | boundarychars character-range | boundarychars lowercase-range uppercase-range string-stmt : stringchar string | stringchar lowercase-string uppercase-string
Characters described with the boundarychars statement are considered part of a word only if they appear singly, embedded between characters declared with the wordchars or stringchar statements. For example, if the hyphen is a boundary character (useful in French), the string "foo-bar" would be a single word, but "-foo" would be the same as "foo", and "foo--bar" would be two words separated by non-word characters.
If two ranges or strings are given in a char-stmt or string-stmt, the first describes characters that are interpreted as lowercase and the second describes uppercase. In the case of a stringchar statement, the two strings must be of the same length. Also, in a stringchar statement, the actual strings may contain both uppercase and characters themselves without difficulty; for instance, the statement
stringchar "\*(sS" "\*(Ss"
is legal and will not interfere with (or be interfered with by) other declarations of of "s" and "S" as lower and upper case, respectively.
A final note on string characters: some languages collate certain special characters as if they were strings. For example, the German "a-umlaut" is traditionally sorted as if it were "ae". Ispell is not capable of this; each character must be treated as an individual entity. So in certain cases, ispell will sort a list of words into a different order than the standard "dictionary" order for the target language.
alt-sets : alttype [ alt-stmt* ]
Because different formatters use different notations to represent non-ASCII characters, ispell must be aware of the representations used by these formatters. These are declared as alternate sets of string characters.
alttype : altstringtype name suffix*
The altstringtype statement introduces each set by declaring the associated formatter name and filename suffix list. This name and list are interpreted exactly as in the defstringtype statement above. Following this header are one or more alt-stmts which declare the alternate string characters used by this formatter.
alt-stmt : altstringchar alt-string std-string
The altstringchar statement describes alternate representations for string characters. For example, the -mm macro package of troff represents the German "a-umlaut" as a*:, while TeX uses the sequence "a. If the troff versions are declared as the standard versions using stringchar, the TeX versions may be declared as alternates by using the statement
altstringchar \"a a\*:
When the altstringchar statement is used to specify alternate forms, all forms for a particular formatter must be declared together as a group. Also, each formatter or macro package must provide a complete set of characters, both upper- and lower-case, and the character sequences used for each formatter must be completely distinct. Character sequences which describe upper- and lower-case versions of the same printable character must also be the same length. It may be necessary to define some new macros for a given formatter to satisfy these restrictions. (The current version of buildhash does not enforce these restrictions, but failure to obey them may result in errors being introduced into files that are processed with ispell.)
An important minor point is that ispell assumes that all characters declared as wordchars or boundarychars will occupy exactly one position on the terminal screen.
A single character-set statement can declare either a single character or a contiguous range of characters. A range is given as in egrep and the shell: [a-z] means lowercase alphabetics; [^a-z] means all but lowercase, etc. All character-set statements are combined (unioned) to produce the final list of characters that may be part of a word. The collating order of the characters is defined by the order of their declaration; if a range is used, the characters are considered to have been declared in ASCII order. Characters that have case are collated next to each other, with the uppercase character first.
The character-declaration statements have a rather strange behavior caused by its need to match each lowercase character with its uppercase equivalent. In any given wordchars or boundarychars statement, the characters in each range are first sorted into ASCII collating sequence, then matched one-for-one with the other range. (The two ranges must have the same number of characters). Thus, for example, the two statements:
wordchars [aeiou] [AEIOU] wordchars [aeiou] [UOIEA]
would produce exactly the same effect. To get the vowels to match up "wrong", you would have to use separate statements:
wordchars a U wordchars e O wordchars i I wordchars o E wordchars u A
which would cause uppercase `e` to be `O`, and lowercase `O` to be `e`. This should normally be a problem only with languages which have been forced to use a strange ASCII collating sequence. If your uppercase and lowercase letters both collate in the same order, you shouldn`t have to worry about this "feature".
The prefixes and suffixes sections have exactly the same syntax, except for the introductory keyword.
prefixes : prefixes flagdef* suffixes : suffixes flagdef* flagdef : flag [*|~] char : repl*
A prefix or suffix table consists of an introductory keyword and a list of flag definitions. Flags can be defined more than once, in which case the definitions are combined. Each flag controls one or more repls (replacements) which are conditionally applied to the beginnings or endings of various words.
Flags are named by a single character char. Depending on a configuration option, this character can be either any uppercase letter (the default configuration) or any 7-bit ASCII character. Most languages should be able to get along with just 26 flags.
A flag character may be prefixed with one or more option characters. (If you wish to use one of the option characters as a flag character, simply enclose it in double quotes.)
The asterisk (*) option means that this flag participates in cross-product formation. This only matters if the file contains both prefix and suffix tables. If so, all prefixes and suffixes marked with an asterisk will be applied in all cross-combinations to the root word. For example, consider the root fix with prefixes pre and in, and suffixes es and ed. If all flags controlling these prefixes and suffixes are marked with an asterisk, then the single root fix would also generate prefix, prefixes, prefixed, infix, infixes, infixed, fix, fixes, and fixed. Cross-product formation can produce a large number of words quickly, some of which may be illegal, so watch out. If cross-products produce illegal words, munchlist will not produce those flag combinations, and the flag will not be useful.
repl : condition* > [ - strip-string , ] append-string
The ~ option specifies that the associated flag is only active when a compound word is being formed. This is useful in a language like German, where the form of a word sometimes changes inside a compound.
A repl is a conditional rule for modifying a root word. Up to 8 conditions may be specified. If the conditions are satisfied, the rules on the right-hand side of the repl are applied, as follows:
For example, the condition . means "any word", and the condition Y means "any word ending in Y". The following (suffix) replacements:
. > MENT Y > -Y,IES
would change induce to inducement and fly to flies. (If they were controlled by the same flag, they would also change fly to flyment, which might not be what was wanted. Munchlist can be used to protect against this sort of problem; see the command sequence given below.)
No matter how much you might wish it, the strings on the right must be strings of specific characters, not ranges. The reasons are rooted deeply in the way ispell works, and it would be difficult or impossible to provide for more flexibility. For example, you might wish to write:
[EY] > -[EY],IES
This will not work. Instead, you must use two separate rules:
E > -E,IES Y > -Y,IES
The application of repls can be restricted to certain words with conditions:
condition : { . | character | range }
A condition is a restriction on the characters that adjoin, and/or are replaced by, the right-hand side of the repl. Up to 8 conditions may be given, which should be enough context for anyone. The right-hand side will be applied only if the conditions in the repl are satisfied. The conditions also implicitly define a length; roots shorter than the number of conditions will not pass the test. (As a special case, a condition of a single dot "." defines a length of zero, so that the rule applies to all words indiscriminately). This length is independent of the separate test that insists that all flags produce an output word length of at least four.
Conditions that are single characters should be separated by white space. For example, to specify words ending in "ED", write:
E D > -ED,ING # As in covered > covering
If you write:
ED > -ED,ING
the effect will be the same as:
[ED] > -ED,ING
As a final minor, but important point, it is sometimes useful to rebuild a dictionary file using an incompatible suffix file. For example, suppose you expanded the "R" flag to generate "er" and "ers" (thus making the Z flag somewhat obsolete). To build a new dictionary newdict that, using newaffixes, will accept exactly the same list of words as the old list olddict did using oldaffixes, the -c switch of munchlist is useful, as in the following example:
$ munchlist -c oldaffixes -l newaffixes olddict > newdict
If you use this procedure, your new dictionary will always accept the same list the original did, even if you badly screwed up the affix file. This is because munchlist compares the words generated by a flag with the original word list, and refuses to use any flags that generate illegal words. (But don`t forget that the munchlist step takes a long time and eats up temporary file space).
As an example of conditional suffixes, here is the specification of the S flag from the English affix file:
flag *S: [^AEIOU]Y > -Y,IES # As in imply > implies [AEIOU]Y > S # As in convey > conveys [SXZH] > ES # As in fix > fixes [^SXZHY] > S # As in bat > bats
The first line applies to words ending in Y, but not in vowel-Y. The second takes care of the vowel-Y words. The third then handles those words that end in a sibilant or near-sibilant, and the last picks up everything else.
Note that the conditions are written very carefully so that they apply to disjoint sets of words. In particular, note that the fourth line excludes words ending in Y as well as the obvious SXZH. Otherwise, it would convert "imply" into "implys".
Although the English affix file does not do so, you can also have a flag generate more than one variation on a root word. For example, we could extend the English "R" flag as follows:
flag *R: E > R # As in skate > skater E > RS # As in skate > skaters [^AEIOU]Y > -Y,IER # As in multiply > multiplier [^AEIOU]Y > -Y,IERS # As in multiply > multipliers [AEIOU]Y > ER # As in convey > conveyer [AEIOU]Y > ERS # As in convey > conveyers [^EY] > ER # As in build > builder [^EY] > ERS # As in build > builders
This flag would generate both "skater" and "skaters" from "skate". This capability can be very useful in languages that make use of noun, verb, and adjective endings. For instance, one could define a single flag that generated all of the German "weak" verb endings.
Section N`34`InputDeviceN`34` Identifier N`34`idevnameN`34` Driver N`34`kbdN`34` ... EndSection
The kbd driver functions as a keyboard input device, and may be used as the X server`s core keyboard.
The following driver Options are supported:
Some other XKB-related options are available, but they are incompatible with the ones listed above and are not recommended, so they are not documented here.
Byte addresses in mem are interpreted as physical memory addresses. References to non-existent locations cause errors to be returned.
Examining and patching is likely to lead to unexpected results when read-only or write-only bits are present.
It is typically created by:
mknod -m 660 /dev/mem c 1 1
chown root:mem /dev/mem
The file kmem is the same as mem, except that the kernel virtual memory rather than physical memory is accessed.
It is typically created by:
mknod -m 640 /dev/kmem c 1 2
chown root:mem /dev/kmem
Port is similar to mem, but the IO ports are accessed.
It is typically created by:
mknod -m 660 /dev/port c 1 4
chown root:mem /dev/port
Each line of the file specifies a test to be performed. A test compares the data starting at a particular offset in the file with a 1-byte, 2-byte, or 4-byte numeric value or a string. If the test succeeds, a message is printed. The line consists of the following fields:
The numeric types may optionally be followed by & and a numeric value, to specify that the value is to be AND`ed with the numeric value before any comparisons are done. Prepending a u to the type indicates that ordered comparisons should be unsigned.