Merge pull request #41 from martin-a-brown/master
another batch of validation improvements in all DocBook XML 4.x documents
|
@ -387,7 +387,7 @@ Fail safe Boot ROM [Disabled]
|
||||||
<para>Even though Step 1 and Step 2 seem to be the same, the only difference being that Step 1 is done from Linux and Step 2 from Windows XP, they both have to be done.</para>
|
<para>Even though Step 1 and Step 2 seem to be the same, the only difference being that Step 1 is done from Linux and Step 2 from Windows XP, they both have to be done.</para>
|
||||||
<!--FIXME: reason being?-->
|
<!--FIXME: reason being?-->
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2 id="patch+compile"><title>Step 3: Patch and Compile the kernel 2.4.18</title>
|
<sect2 id="patch-compile"><title>Step 3: Patch and Compile the kernel 2.4.18</title>
|
||||||
<para>This has to be performed in exactly the same manner as described in <xref linkend="step1" /> and <xref linkend="step2" />.</para>
|
<para>This has to be performed in exactly the same manner as described in <xref linkend="step1" /> and <xref linkend="step2" />.</para>
|
||||||
<para>Also add an entry for the new kernel in <filename>/boot/grub/menu.lst</filename> as described in <xref linkend="step4" />.</para>
|
<para>Also add an entry for the new kernel in <filename>/boot/grub/menu.lst</filename> as described in <xref linkend="step4" />.</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
@ -506,7 +506,7 @@ fl: _init:registed device at major 62
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2 id="lilo"><title>Step 11: Compile lilo-22.3.2</title>
|
<sect2 id="lilo"><title>Step 11: Compile lilo-22.3.2</title>
|
||||||
<para>We are going to use LILO as the boot loader since this is the only BootLoader that can read an INFTL device without many changes to be done to the BootLoader source code.</para>
|
<para>We are going to use LILO as the boot loader since this is the only BootLoader that can read an INFTL device without many changes to be done to the BootLoader source code.</para>
|
||||||
<para>For more information on how LILO and other boot loaders operate, refer to <xref linkend="booklist" />.</para>
|
<para>For more information on how LILO and other boot loaders operate, refer to <xref linkend="refs" />.</para>
|
||||||
<para>We need to compile the lilo-22-3.2 source code to get the executable file for LILO.</para>
|
<para>We need to compile the lilo-22-3.2 source code to get the executable file for LILO.</para>
|
||||||
<para>We will use the source code from <filename>linux_binary.5_1_4/doc-linux-5_1_4_20/lilo/lilo-22.3.2</filename>.</para>
|
<para>We will use the source code from <filename>linux_binary.5_1_4/doc-linux-5_1_4_20/lilo/lilo-22.3.2</filename>.</para>
|
||||||
<para>Before starting the build we need to do the following:</para>
|
<para>Before starting the build we need to do the following:</para>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version = '1.0' encoding = 'UTF-8'?>
|
<?xml version = '1.0' encoding = 'UTF-8'?>
|
||||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
<?xml-stylesheet type = 'text/xsl' href = 'file:///usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl' ?>
|
<?xml-stylesheet type = 'text/xsl' href = 'file:///usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl' ?>
|
||||||
<article version="1.0">
|
<article>
|
||||||
<articleinfo>
|
<articleinfo>
|
||||||
<title>Optimal Use of Fonts on Linux</title>
|
<title>Optimal Use of Fonts on Linux</title>
|
||||||
<copyright>
|
<copyright>
|
||||||
|
@ -15,12 +15,12 @@
|
||||||
<author>
|
<author>
|
||||||
<firstname>Avi</firstname>
|
<firstname>Avi</firstname>
|
||||||
<surname>Alkalay</surname>
|
<surname>Alkalay</surname>
|
||||||
<email>avi unix sh</email>
|
|
||||||
<affiliation>
|
<affiliation>
|
||||||
<orgdiv>Linux, Open Standards consultant :: IT and Software Architect</orgdiv>
|
|
||||||
<orgname>IBM Linux Impact Team :: <ulink url="http://ibm.com/linux" >ibm.com/linux</ulink>
|
<orgname>IBM Linux Impact Team :: <ulink url="http://ibm.com/linux" >ibm.com/linux</ulink>
|
||||||
</orgname>
|
</orgname>
|
||||||
|
<orgdiv>Linux, Open Standards consultant :: IT and Software Architect</orgdiv>
|
||||||
</affiliation>
|
</affiliation>
|
||||||
|
<email>avi unix sh</email>
|
||||||
</author>
|
</author>
|
||||||
<author>
|
<author>
|
||||||
<firstname>Donovan</firstname>
|
<firstname>Donovan</firstname>
|
||||||
|
@ -68,8 +68,10 @@
|
||||||
<revnumber>2005-07-19</revnumber>
|
<revnumber>2005-07-19</revnumber>
|
||||||
<date>19 May 2005</date>
|
<date>19 May 2005</date>
|
||||||
<authorinitials>avi</authorinitials>
|
<authorinitials>avi</authorinitials>
|
||||||
<revremark>Renamed Microsoft Fonts to Webcore Fonts, and links updated.</revremark>
|
<revdescription>
|
||||||
<revremark>Added X.org Subsystems section.</revremark>
|
<remark>Renamed Microsoft Fonts to Webcore Fonts, and links updated.</remark>
|
||||||
|
<remark>Added X.org Subsystems section.</remark>
|
||||||
|
</revdescription>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>2005-05-25</revnumber>
|
<revnumber>2005-05-25</revnumber>
|
||||||
|
@ -81,25 +83,31 @@
|
||||||
<revnumber>2005-05-10</revnumber>
|
<revnumber>2005-05-10</revnumber>
|
||||||
<date>10 May 2005</date>
|
<date>10 May 2005</date>
|
||||||
<authorinitials>avi</authorinitials>
|
<authorinitials>avi</authorinitials>
|
||||||
<revremark>Old section-based glossary converted to real DocBook glossary.</revremark>
|
<revdescription>
|
||||||
<revremark>Modernized terms and explanations on the glossary.</revremark>
|
<remark>Old section-based glossary converted to real DocBook glossary.</remark>
|
||||||
<revremark>Included concepts as charsets, Unicode and UTF-8 in the glossary.</revremark>
|
<remark>Modernized terms and explanations on the glossary.</remark>
|
||||||
|
<remark>Included concepts as charsets, Unicode and UTF-8 in the glossary.</remark>
|
||||||
|
</revdescription>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>2005-03-31</revnumber>
|
<revnumber>2005-03-31</revnumber>
|
||||||
<date>31 Mar 2005</date>
|
<date>31 Mar 2005</date>
|
||||||
<authorinitials>avi</authorinitials>
|
<authorinitials>avi</authorinitials>
|
||||||
<revremark>Desktop configuration guidelines improved for higher resolution screens.</revremark>
|
<revdescription>
|
||||||
<revremark>Better layout for authors.</revremark>
|
<remark>Desktop configuration guidelines improved for higher resolution screens.</remark>
|
||||||
|
<remark>Better layout for authors.</remark>
|
||||||
|
</revdescription>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>2005-02-18</revnumber>
|
<revnumber>2005-02-18</revnumber>
|
||||||
<date>18 Feb 2005</date>
|
<date>18 Feb 2005</date>
|
||||||
<authorinitials>avi</authorinitials>
|
<authorinitials>avi</authorinitials>
|
||||||
<revremark>Included BCI support status for Mandrake and Gentoo.</revremark>
|
<revdescription>
|
||||||
<revremark>Added link to Firefox configuration hack.</revremark>
|
<remark>Included BCI support status for Mandrake and Gentoo.</remark>
|
||||||
<revremark>Included link to Scribus site.</revremark>
|
<remark>Added link to Firefox configuration hack.</remark>
|
||||||
<revremark>Removed broken and outdated info links.</revremark>
|
<remark>Included link to Scribus site.</remark>
|
||||||
|
<remark>Removed broken and outdated info links.</remark>
|
||||||
|
</revdescription>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>2005-01-12</revnumber>
|
<revnumber>2005-01-12</revnumber>
|
||||||
|
@ -117,25 +125,31 @@
|
||||||
<revnumber>2004-12-12</revnumber>
|
<revnumber>2004-12-12</revnumber>
|
||||||
<date>12 Dec 2004</date>
|
<date>12 Dec 2004</date>
|
||||||
<authorinitials>avi</authorinitials>
|
<authorinitials>avi</authorinitials>
|
||||||
<revremark>Typos correction by Scott Brayban (sgrayban borgnet us).</revremark>
|
<revdescription>
|
||||||
<revremark>Finished links to msfonts and freetype RPMs.</revremark>
|
<remark>Typos correction by Scott Brayban (sgrayban borgnet us).</remark>
|
||||||
|
<remark>Finished links to msfonts and freetype RPMs.</remark>
|
||||||
|
</revdescription>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>2004-12-05</revnumber>
|
<revnumber>2004-12-05</revnumber>
|
||||||
<date>5 Dec 2004</date>
|
<date>5 Dec 2004</date>
|
||||||
<authorinitials>avi</authorinitials>
|
<authorinitials>avi</authorinitials>
|
||||||
<revremark>Merged with FDU-HOWTO.</revremark>
|
<revdescription>
|
||||||
<revremark>Finished RPM sections.</revremark>
|
<remark>Merged with FDU-HOWTO.</remark>
|
||||||
<revremark>Added "need help" appendix.</revremark>
|
<remark>Finished RPM sections.</remark>
|
||||||
<revremark>Finished "About this doc" appendix.</revremark>
|
<remark>Added "need help" appendix.</remark>
|
||||||
<revremark>Ready for peer revision.</revremark>
|
<remark>Finished "About this doc" appendix.</remark>
|
||||||
|
<remark>Ready for peer revision.</remark>
|
||||||
|
</revdescription>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>2004-11-27</revnumber>
|
<revnumber>2004-11-27</revnumber>
|
||||||
<date>27 Nov 2004</date>
|
<date>27 Nov 2004</date>
|
||||||
<authorinitials>avi</authorinitials>
|
<authorinitials>avi</authorinitials>
|
||||||
<revremark>Created first sections.</revremark>
|
<revdescription>
|
||||||
<revremark>Merged with Font-HOWTO.</revremark>
|
<remark>Created first sections.</remark>
|
||||||
|
<remark>Merged with Font-HOWTO.</remark>
|
||||||
|
</revdescription>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
<keywordset>
|
<keywordset>
|
||||||
|
@ -222,7 +236,7 @@
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
<para>Over time, fontconfig/Xft will replace the core X font subsystem. At the present time, applications using the Qt 3 or GTK 2 toolkits (which would include KDE and GNOME applications) use the fontconfig and Xft font subsystem; most everything else uses the core X fonts.</para>
|
<para>Over time, fontconfig/Xft will replace the core X font subsystem. At the present time, applications using the Qt 3 or GTK 2 toolkits (which would include KDE and GNOME applications) use the fontconfig and Xft font subsystem; most everything else uses the core X fonts.</para>
|
||||||
<para>In the future, Linux distributions may support only fontconfig/Xft in place of the XFS font server as the default local font access method.</para>
|
<para>In the future, Linux distributions may support only fontconfig/Xft in place of the XFS font server as the default local font access method.</para>
|
||||||
<note>An exception to the font subsystem usage outlined above is OpenOffice.org (which uses its own font rendering technology).</note>
|
<note><para>An exception to the font subsystem usage outlined above is OpenOffice.org (which uses its own font rendering technology).</para></note>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section id="fix" >
|
<section id="fix" >
|
||||||
|
@ -544,7 +558,7 @@ myfonts/myfonts/font3.ttf
|
||||||
<para>To build an <acronym>RPM</acronym> package you'll have to create a <filename>.spec</filename> file that provides instructions to the package builder on how to organize the files, package description, author, copyright, etc. We provide a template <ulink url="template.spec" >here</ulink> that you can use to start your work. The template looks like this:</para>
|
<para>To build an <acronym>RPM</acronym> package you'll have to create a <filename>.spec</filename> file that provides instructions to the package builder on how to organize the files, package description, author, copyright, etc. We provide a template <ulink url="template.spec" >here</ulink> that you can use to start your work. The template looks like this:</para>
|
||||||
<example id="spectemplate" >
|
<example id="spectemplate" >
|
||||||
<title>The <filename>.spec</filename> file template</title>
|
<title>The <filename>.spec</filename> file template</title>
|
||||||
<programlistingco>
|
<!-- <programlistingco> -->
|
||||||
<programlisting>
|
<programlisting>
|
||||||
Name: myfonts <co id="spectemplate.name" />
|
Name: myfonts <co id="spectemplate.name" />
|
||||||
Summary: Collection of My Funny Fonts <co id="spectemplate.summary" />
|
Summary: Collection of My Funny Fonts <co id="spectemplate.summary" />
|
||||||
|
@ -701,7 +715,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
<para>The evolution history of this package here. Must follow this layout.</para>
|
<para>The evolution history of this package here. Must follow this layout.</para>
|
||||||
</callout>
|
</callout>
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
</programlistingco>
|
<!-- </programlistingco> -->
|
||||||
</example>
|
</example>
|
||||||
<para>This file must be named as the name of the package - <filename>myfonts.spec</filename> in our example. And you must put it under the main directory of the package. So in the end we'll have something like this:</para>
|
<para>This file must be named as the name of the package - <filename>myfonts.spec</filename> in our example. And you must put it under the main directory of the package. So in the end we'll have something like this:</para>
|
||||||
<screen>
|
<screen>
|
||||||
|
@ -745,7 +759,7 @@ myfonts/myfonts/font3.ttf
|
||||||
<title>Classifications of Typefaces</title>
|
<title>Classifications of Typefaces</title>
|
||||||
<section>
|
<section>
|
||||||
<title>Fixed versus variable width</title>
|
<title>Fixed versus variable width</title>
|
||||||
<para>There are several classifications of typefaces. Firstly, there are <literal remap="tt" moreinfo="NONE" >fixed width</literal> fonts, and variable width fonts. The fixed width fonts look like typewriter text, because each character is the same width. This quality is desirable for something like a text editor or a computer console, but not desirable for the body text of a long document. The other class is variable width. Most of the fonts you will use are variable width, though fixed width can be useful also (for example, all the example shell commands in this document are illustrated with a fixed width font). The most well known fixed width font is Courier.</para>
|
<para>There are several classifications of typefaces. Firstly, there are <literal remap="tt" moreinfo="none" >fixed width</literal> fonts, and variable width fonts. The fixed width fonts look like typewriter text, because each character is the same width. This quality is desirable for something like a text editor or a computer console, but not desirable for the body text of a long document. The other class is variable width. Most of the fonts you will use are variable width, though fixed width can be useful also (for example, all the example shell commands in this document are illustrated with a fixed width font). The most well known fixed width font is Courier.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="serif" >
|
<section id="serif" >
|
||||||
<title>To serif or not to serif ?</title>
|
<title>To serif or not to serif ?</title>
|
||||||
|
@ -888,21 +902,21 @@ small caps fonts, and swash capitals (fancy, calligraphic letters).</para>
|
||||||
<section id="bitmap" >
|
<section id="bitmap" >
|
||||||
<title>Bitmap Fonts</title>
|
<title>Bitmap Fonts</title>
|
||||||
<para>A bitmap is a matrix of dots. Bitmap fonts are represented in precisely this way -- as matrices of dots. Because of this, they are <emphasis>device dependent</emphasis> -- they are only useful at a particular resolution. A 75 DPI screen bitmap font is still 75 DPI on your 1200 DPI printer.</para>
|
<para>A bitmap is a matrix of dots. Bitmap fonts are represented in precisely this way -- as matrices of dots. Because of this, they are <emphasis>device dependent</emphasis> -- they are only useful at a particular resolution. A 75 DPI screen bitmap font is still 75 DPI on your 1200 DPI printer.</para>
|
||||||
<para>There are two types of bitmap fonts -- bitmap printer fonts, such as the <literal remap="tt" moreinfo="NONE" >pk</literal> fonts generated by dvips, and bitmap screen fonts, used by X and the console. The bitmap screen fonts typically have a <literal remap="tt" moreinfo="NONE" >bdf</literal> or <literal remap="tt" moreinfo="NONE" >pcf</literal> extension. Bitmap screen fonts are most useful for terminal windows, consoles and text editors, where the lack of scalability and the fact that they are unprintable is not an issue.</para>
|
<para>There are two types of bitmap fonts -- bitmap printer fonts, such as the <literal remap="tt" moreinfo="none" >pk</literal> fonts generated by dvips, and bitmap screen fonts, used by X and the console. The bitmap screen fonts typically have a <literal remap="tt" moreinfo="none" >bdf</literal> or <literal remap="tt" moreinfo="none" >pcf</literal> extension. Bitmap screen fonts are most useful for terminal windows, consoles and text editors, where the lack of scalability and the fact that they are unprintable is not an issue.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="truetype" >
|
<section id="truetype" >
|
||||||
<title>TrueType Fonts</title>
|
<title>TrueType Fonts</title>
|
||||||
<para>TrueType fonts were developed by Apple. They made the format available to Microsoft, and successfully challenged Adobe's grip on the font market. True type fonts store the metric and shape information in a single file (usually one with a <literal remap="tt" moreinfo="NONE" >ttf</literal> extension). Recently, font servers have been developed that make TrueType available to X. And PostScript and ghostscript have supported TrueType fonts for some time. Because of this, TrueType fonts are becoming more popular on linux.</para>
|
<para>TrueType fonts were developed by Apple. They made the format available to Microsoft, and successfully challenged Adobe's grip on the font market. True type fonts store the metric and shape information in a single file (usually one with a <literal remap="tt" moreinfo="none" >ttf</literal> extension). Recently, font servers have been developed that make TrueType available to X. And PostScript and ghostscript have supported TrueType fonts for some time. Because of this, TrueType fonts are becoming more popular on linux.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="type1" >
|
<section id="type1" >
|
||||||
<title>Type 1 Fonts</title>
|
<title>Type 1 Fonts</title>
|
||||||
<para>The Type 1 font standard was devised by Adobe, and Type 1 fonts are supported by Adobe's PostScript standard. Because of this, they are also well supported under linux. They are supported by X and ghostscript. Postscript fonts have traditionally been the choice of font for anything on UNIX that involves printing.</para>
|
<para>The Type 1 font standard was devised by Adobe, and Type 1 fonts are supported by Adobe's PostScript standard. Because of this, they are also well supported under linux. They are supported by X and ghostscript. Postscript fonts have traditionally been the choice of font for anything on UNIX that involves printing.</para>
|
||||||
<para>Typically, a UNIX Type 1 font is distributed as an <literal remap="tt" moreinfo="NONE" >afm</literal> (adobe font metric) file, and an outline file, which is usually a <literal remap="tt" moreinfo="NONE" >pfb</literal> (printer font binary) or <literal remap="tt" moreinfo="NONE" >pfa</literal> (printer font ascii) file. The outline file contains all the glyphs, while the metric file contains the metrics. </para>
|
<para>Typically, a UNIX Type 1 font is distributed as an <literal remap="tt" moreinfo="none" >afm</literal> (adobe font metric) file, and an outline file, which is usually a <literal remap="tt" moreinfo="none" >pfb</literal> (printer font binary) or <literal remap="tt" moreinfo="none" >pfa</literal> (printer font ascii) file. The outline file contains all the glyphs, while the metric file contains the metrics. </para>
|
||||||
<para>Type 1 fonts for other platforms may be distributed in different formats. For example, PostScript fonts for windows often use a different format (<literal remap="tt" moreinfo="NONE" >pfm</literal>) for the metric file.</para>
|
<para>Type 1 fonts for other platforms may be distributed in different formats. For example, PostScript fonts for windows often use a different format (<literal remap="tt" moreinfo="none" >pfm</literal>) for the metric file.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="type3" >
|
<section id="type3" >
|
||||||
<title>Type3 Fonts</title>
|
<title>Type3 Fonts</title>
|
||||||
<para>These fonts are distributed in a similar manner to Type 1 files -- in groups of <literal remap="tt" moreinfo="NONE" >afm</literal> font metrics, and <literal remap="tt" moreinfo="NONE" >pfa</literal> files. While they are supported by the PostScript standard, they are not supported by X, and hence have limited use.</para>
|
<para>These fonts are distributed in a similar manner to Type 1 files -- in groups of <literal remap="tt" moreinfo="none" >afm</literal> font metrics, and <literal remap="tt" moreinfo="none" >pfa</literal> files. While they are supported by the PostScript standard, they are not supported by X, and hence have limited use.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="type42" >
|
<section id="type42" >
|
||||||
<title>Type 42 Fonts </title>
|
<title>Type 42 Fonts </title>
|
||||||
|
@ -941,8 +955,8 @@ small caps fonts, and swash capitals (fancy, calligraphic letters).</para>
|
||||||
<title>Type 1 Fonts and Metafont</title>
|
<title>Type 1 Fonts and Metafont</title>
|
||||||
<section>
|
<section>
|
||||||
<title>Dealing With Mac and Windows Formats</title>
|
<title>Dealing With Mac and Windows Formats</title>
|
||||||
<para>Many foundries ship fonts with Windows and Mac users in mind. This can sometimes pose a problem. Typically, the ``Windows fonts'' are fairly easy to handle, because they are packed in a <literal remap="tt" moreinfo="NONE" >zip</literal> file. The only work to be done is converting the <literal remap="tt" moreinfo="NONE" >pfm</literal> file to and <literal remap="tt" moreinfo="NONE" >afm</literal> file (using <literal remap="tt" moreinfo="NONE" >pfm2afm</literal>).</para>
|
<para>Many foundries ship fonts with Windows and Mac users in mind. This can sometimes pose a problem. Typically, the ``Windows fonts'' are fairly easy to handle, because they are packed in a <literal remap="tt" moreinfo="none" >zip</literal> file. The only work to be done is converting the <literal remap="tt" moreinfo="none" >pfm</literal> file to and <literal remap="tt" moreinfo="none" >afm</literal> file (using <literal remap="tt" moreinfo="none" >pfm2afm</literal>).</para>
|
||||||
<para>Macintosh fonts are more problematic, because they are typically made available in <literal remap="tt" moreinfo="NONE" >.sit.bin</literal> format -- stuffit archives. Unfortunately, there is no tool for Linux that can unpack stuffit archives created with the newer version of stuffit. The only way to do it is run Executor (Mac emulator), or try running stuffit in dosemu or Wine. Once the <literal remap="tt" moreinfo="NONE" >sit.bin</literal> file is unpacked, the Macintosh files can be converted using <literal remap="tt" moreinfo="NONE" >t1unmac</literal> which comes with the <literal remap="tt" moreinfo="NONE" >t1utils</literal> package.</para>
|
<para>Macintosh fonts are more problematic, because they are typically made available in <literal remap="tt" moreinfo="none" >.sit.bin</literal> format -- stuffit archives. Unfortunately, there is no tool for Linux that can unpack stuffit archives created with the newer version of stuffit. The only way to do it is run Executor (Mac emulator), or try running stuffit in dosemu or Wine. Once the <literal remap="tt" moreinfo="none" >sit.bin</literal> file is unpacked, the Macintosh files can be converted using <literal remap="tt" moreinfo="none" >t1unmac</literal> which comes with the <literal remap="tt" moreinfo="none" >t1utils</literal> package.</para>
|
||||||
<para>Unfortunately, some vendors only ship Type 1 fonts in Macintosh format (stuffit archives). However, according to font expert <ulink url="http://cgm.cs.mcgill.ca/~luc/" >Luc Devroye</ulink>, all major foundries make Type 1 fonts available for Mac and Windows.</para>
|
<para>Unfortunately, some vendors only ship Type 1 fonts in Macintosh format (stuffit archives). However, according to font expert <ulink url="http://cgm.cs.mcgill.ca/~luc/" >Luc Devroye</ulink>, all major foundries make Type 1 fonts available for Mac and Windows.</para>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1038,7 +1052,7 @@ small caps fonts, and swash capitals (fancy, calligraphic letters).</para>
|
||||||
<para>There are several font packages for Linux. Many of them are obsolete, or you really will never have to use them.</para>
|
<para>There are several font packages for Linux. Many of them are obsolete, or you really will never have to use them.</para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>chkfontpath is a utility for manipulating the <literal remap="tt" moreinfo="NONE" >xfs</literal> configuration file.</para>
|
<para>chkfontpath is a utility for manipulating the <literal remap="tt" moreinfo="none" >xfs</literal> configuration file.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
@ -1054,7 +1068,7 @@ small caps fonts, and swash capitals (fancy, calligraphic letters).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<ulink url="http://pegasus.rutgers.edu/~elflord/font_howto/pfm2afm.tgz" >pfm2afm</ulink> is a utility for converting windows <literal remap="tt" moreinfo="NONE" >pfm</literal> font metric files into <literal remap="tt" moreinfo="NONE" >afm</literal> metrics that can be used for Linux. This is based on the original version available at CTAN, and includes modifications from Rod Smith to make it compile under Linux.</para>
|
<ulink url="http://pegasus.rutgers.edu/~elflord/font_howto/pfm2afm.tgz" >pfm2afm</ulink> is a utility for converting windows <literal remap="tt" moreinfo="none" >pfm</literal> font metric files into <literal remap="tt" moreinfo="none" >afm</literal> metrics that can be used for Linux. This is based on the original version available at CTAN, and includes modifications from Rod Smith to make it compile under Linux.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
@ -1066,11 +1080,11 @@ small caps fonts, and swash capitals (fancy, calligraphic letters).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<ulink url="ftp://ftp.dcs.ed.ac.uk/pub/jek/programs/ttfps.tar.gz" >ttfps</ulink> converts <literal remap="tt" moreinfo="NONE" >.ttf</literal> TrueType font files into Type42 files.</para>
|
<ulink url="ftp://ftp.dcs.ed.ac.uk/pub/jek/programs/ttfps.tar.gz" >ttfps</ulink> converts <literal remap="tt" moreinfo="none" >.ttf</literal> TrueType font files into Type42 files.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<ulink url="http://pegasus.rutgers.edu/~elflord/font_howto/ttfutils-0.2.tar.gz" >ttfutils</ulink> A package of utilities for handling TrueType fonts. This package requires <literal remap="tt" moreinfo="NONE" >ttf2pt1</literal>. Useful if not essential. </para>
|
<ulink url="http://pegasus.rutgers.edu/~elflord/font_howto/ttfutils-0.2.tar.gz" >ttfutils</ulink> A package of utilities for handling TrueType fonts. This package requires <literal remap="tt" moreinfo="none" >ttf2pt1</literal>. Useful if not essential. </para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
@ -1078,11 +1092,11 @@ small caps fonts, and swash capitals (fancy, calligraphic letters).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<ulink url="ftp://ftp.metalab.unc.edu/pub/Linux/X11/fonts/" >xfstt</ulink> is a TrueType font server for Linux. It's useful, but <literal remap="tt" moreinfo="NONE" >xfs</literal> is probably a better choice.</para>
|
<ulink url="ftp://ftp.metalab.unc.edu/pub/Linux/X11/fonts/" >xfstt</ulink> is a TrueType font server for Linux. It's useful, but <literal remap="tt" moreinfo="none" >xfs</literal> is probably a better choice.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<ulink url="http://www.dcs.ed.ac.uk/home/jec/programs/xfsft/" >xfsft</ulink> The xfsft font server. Note that this is included in <literal remap="tt" moreinfo="NONE" >xfs</literal>.</para>
|
<ulink url="http://www.dcs.ed.ac.uk/home/jec/programs/xfsft/" >xfsft</ulink> The xfsft font server. Note that this is included in <literal remap="tt" moreinfo="none" >xfs</literal>.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
@ -1321,7 +1335,7 @@ contains a lot of links to sites on PostScript and fonts.</para>
|
||||||
<para>If your distribution appears in the list on <xref linkend="freetype"/> but you can't find the binary package for your platform (for example x86_64), you can easily create the RPM compatible with your system following this steps:</para>
|
<para>If your distribution appears in the list on <xref linkend="freetype"/> but you can't find the binary package for your platform (for example x86_64), you can easily create the RPM compatible with your system following this steps:</para>
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Have installed compiler and development packages on your system</para></listitem>
|
<listitem><para>Have installed compiler and development packages on your system</para></listitem>
|
||||||
<listitem><para>Download the source RPM file (<filename>.src.rpm</filename> extension) for your distribution from <xref linkend="freetype"/>. For example, on Fedora 5, the correct source package is <ulink href="http://avi.alkalay.net/software/freetype.bci/FC5/freetype-2.1.10-5.2.1.bci.src.rpm">this one</ulink>.</para></listitem>
|
<listitem><para>Download the source RPM file (<filename>.src.rpm</filename> extension) for your distribution from <xref linkend="freetype"/>. For example, on Fedora 5, the correct source package is <ulink url="http://avi.alkalay.net/software/freetype.bci/FC5/freetype-2.1.10-5.2.1.bci.src.rpm">this one</ulink>.</para></listitem>
|
||||||
<listitem><para>As root, do this command:</para>
|
<listitem><para>As root, do this command:</para>
|
||||||
<programlisting>bash# rpmbuild --rebuild [the .src.rpm file you just downloaded]</programlisting>
|
<programlisting>bash# rpmbuild --rebuild [the .src.rpm file you just downloaded]</programlisting>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
|
@ -156,7 +156,7 @@
|
||||||
|
|
||||||
<para>Let's make some exercise with separation using as example a system called <acronym>MySoftware</acronym>, in which the <link linkend="software.body">business logic</link> is in <xref linkend="example.body"/> and the configuration is in <xref linkend="example.soul"/>.</para>
|
<para>Let's make some exercise with separation using as example a system called <acronym>MySoftware</acronym>, in which the <link linkend="software.body">business logic</link> is in <xref linkend="example.body"/> and the configuration is in <xref linkend="example.soul"/>.</para>
|
||||||
<example id="example.body"><title>A Shell program referring an external configuration file</title>
|
<example id="example.body"><title>A Shell program referring an external configuration file</title>
|
||||||
<programlistingco>
|
<!-- <programlistingco> -->
|
||||||
&externalconf;
|
&externalconf;
|
||||||
<calloutlist>
|
<calloutlist>
|
||||||
<callout arearefs="ex.body.const.c1">
|
<callout arearefs="ex.body.const.c1">
|
||||||
|
@ -172,17 +172,17 @@
|
||||||
<para>After reading the configuration file, all content directories -- user's + product's -- goes together in the <envar>$CONTENT_PATH</envar>, that will be used from now on.</para>
|
<para>After reading the configuration file, all content directories -- user's + product's -- goes together in the <envar>$CONTENT_PATH</envar>, that will be used from now on.</para>
|
||||||
</callout>
|
</callout>
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
</programlistingco>
|
<!-- </programlistingco> -->
|
||||||
</example>
|
</example>
|
||||||
<example id="example.soul"><title>File containing only the configurations for <acronym>MySoftware</acronym></title>
|
<example id="example.soul"><title>File containing only the configurations for <acronym>MySoftware</acronym></title>
|
||||||
<programlistingco>
|
<!-- <programlistingco> -->
|
||||||
&conffile;
|
&conffile;
|
||||||
<calloutlist>
|
<calloutlist>
|
||||||
<callout arearefs="ex.soul.c1 ex.soul.c2 ex.soul.c3">
|
<callout arearefs="ex.soul.c1 ex.soul.c2 ex.soul.c3">
|
||||||
<para>These are user defined parameters.</para>
|
<para>These are user defined parameters.</para>
|
||||||
</callout>
|
</callout>
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
</programlistingco>
|
<!-- </programlistingco> -->
|
||||||
</example>
|
</example>
|
||||||
</section>
|
</section>
|
||||||
<section id="bodysouls"><title>One Body, Many Souls</title>
|
<section id="bodysouls"><title>One Body, Many Souls</title>
|
||||||
|
@ -531,7 +531,7 @@
|
||||||
<section id="boot.script"><title>Turning Your Software Into a Subsystem</title>
|
<section id="boot.script"><title>Turning Your Software Into a Subsystem</title>
|
||||||
<para>Your Software's files will spread across the filesystems, but you'll want to provide a simple and consistent interface to let the user at least start and stop it. Subsystems architecture promotes this ease-of-use, also providing a way (non obrigatoria) to be automatically started on system initialization. You just have to create your <filename class="directory">/etc/init.d</filename> script following a standard to make it functional.</para>
|
<para>Your Software's files will spread across the filesystems, but you'll want to provide a simple and consistent interface to let the user at least start and stop it. Subsystems architecture promotes this ease-of-use, also providing a way (non obrigatoria) to be automatically started on system initialization. You just have to create your <filename class="directory">/etc/init.d</filename> script following a standard to make it functional.</para>
|
||||||
<example><title>Skeleton of a Subsystem control program in <filename class="directory">/etc/init.d</filename></title>
|
<example><title>Skeleton of a Subsystem control program in <filename class="directory">/etc/init.d</filename></title>
|
||||||
<programlistingco>
|
<!-- <programlistingco> -->
|
||||||
&initscript;
|
&initscript;
|
||||||
<calloutlist>
|
<calloutlist>
|
||||||
<callout arearefs="ex.init.chkconfig">
|
<callout arearefs="ex.init.chkconfig">
|
||||||
|
@ -554,7 +554,7 @@
|
||||||
<para>Here you put your Software's specific command.</para>
|
<para>Here you put your Software's specific command.</para>
|
||||||
</callout>
|
</callout>
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
</programlistingco>
|
<!-- </programlistingco> -->
|
||||||
</example>
|
</example>
|
||||||
<para>The <command>mysystem</command> subsystem methods you implemented will be called by users with the <command>service</command> command like this example:</para>
|
<para>The <command>mysystem</command> subsystem methods you implemented will be called by users with the <command>service</command> command like this example:</para>
|
||||||
<example><title><command>service</command> command usage</title>
|
<example><title><command>service</command> command usage</title>
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
<firstname>Avi</firstname>
|
<firstname>Avi</firstname>
|
||||||
<surname>Alkalay</surname>
|
<surname>Alkalay</surname>
|
||||||
<affiliation>
|
<affiliation>
|
||||||
|
<orgname>IBM Linux Impact Team :: <ulink url="http://ibm.com/linux">ibm.com/linux</ulink></orgname>
|
||||||
|
<orgdiv>Senior IT and Software Architect :: Linux Market Developer</orgdiv>
|
||||||
<address>
|
<address>
|
||||||
<email>avi at br.ibm.com</email>
|
<email>avi at br.ibm.com</email>
|
||||||
<email>avi at unix.sh</email>
|
<email>avi at unix.sh</email>
|
||||||
</address>
|
</address>
|
||||||
<orgdiv>Senior IT and Software Architect :: Linux Market Developer</orgdiv>
|
|
||||||
<orgname>IBM Linux Impact Team :: <ulink url="http://ibm.com/linux">ibm.com/linux</ulink></orgname>
|
|
||||||
</affiliation>
|
</affiliation>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
@ -20,9 +20,11 @@
|
||||||
<revnumber>2.1</revnumber>
|
<revnumber>2.1</revnumber>
|
||||||
<date>24 Aug 2002</date>
|
<date>24 Aug 2002</date>
|
||||||
<authorinitials>avi</authorinitials>
|
<authorinitials>avi</authorinitials>
|
||||||
<revremark>Rewrite of the /opt /usr/local section.</revremark>
|
<revdescription>
|
||||||
<revremark>Cosmetics on graphical user interface and plugins sections.</revremark>
|
<remark>Rewrite of the /opt /usr/local section.</remark>
|
||||||
<revremark>Fixed screens and programlistings width.</revremark>
|
<remark>Cosmetics on graphical user interface and plugins sections.</remark>
|
||||||
|
<remark>Fixed screens and programlistings width.</remark>
|
||||||
|
</revdescription>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>2.0</revnumber>
|
<revnumber>2.0</revnumber>
|
||||||
|
|
|
@ -25,10 +25,8 @@
|
||||||
</articleinfo>
|
</articleinfo>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<para>
|
<title>Partitions-Mass-Storage-Definitions-Naming-HOWTO</title>
|
||||||
<emphasis role='strong'>
|
<para>Copyright (c) 2009 Jean-Daniel Dodin</para>
|
||||||
Partitions-Mass-Storage-Definitions-Naming-HOWTO</emphasis>,
|
|
||||||
copyright (c) 2009 Jean-Daniel Dodin</para>
|
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<title>Copyright and Licence</title>
|
<title>Copyright and Licence</title>
|
||||||
|
@ -264,21 +262,21 @@ major minor #blocks name
|
||||||
<section>
|
<section>
|
||||||
<title>Old IDE Names</title>
|
<title>Old IDE Names</title>
|
||||||
<para>By convention, IDE drives where given device names
|
<para>By convention, IDE drives where given device names
|
||||||
<code>/dev/hda</code>to
|
<filename class="devicefile">/dev/hda</filename>to
|
||||||
<code>/dev/hdd</code>.
|
<filename class="devicefile">/dev/hdd</filename>.
|
||||||
<emphasis>H</emphasis>ard
|
<emphasis>H</emphasis>ard
|
||||||
<emphasis>D</emphasis>rive
|
<emphasis>D</emphasis>rive
|
||||||
<emphasis>A</emphasis>(
|
<emphasis>A</emphasis>(
|
||||||
<code>/dev/hda</code>) is the first drive and
|
<filename class="devicefile">/dev/hda</filename>) is the first drive and
|
||||||
<emphasis>H</emphasis>ard
|
<emphasis>H</emphasis>ard
|
||||||
<emphasis>D</emphasis>rive
|
<emphasis>D</emphasis>rive
|
||||||
<emphasis>C</emphasis>(
|
<emphasis>C</emphasis>(
|
||||||
<code>/dev/hdc</code>) is the third.</para>
|
<filename class="devicefile">/dev/hdc</filename>) is the third.</para>
|
||||||
<para>A typical PC has two IDE controllers, each of which
|
<para>A typical PC has two IDE controllers, each of which
|
||||||
can have two drives connected to it. For example,
|
can have two drives connected to it. For example,
|
||||||
<code>/dev/hda</code>is the first drive (master) on the
|
<filename class="devicefile">/dev/hda</filename>is the first drive (master) on the
|
||||||
first IDE controller and
|
first IDE controller and
|
||||||
<code>/dev/hdd</code>is the second (slave) drive on the
|
<filename class="devicefile">/dev/hdd</filename>is the second (slave) drive on the
|
||||||
second controller (the fourth IDE drive in the
|
second controller (the fourth IDE drive in the
|
||||||
computer).</para>
|
computer).</para>
|
||||||
<para>So, typically, a computer with IDE controller can
|
<para>So, typically, a computer with IDE controller can
|
||||||
|
@ -501,7 +499,7 @@ major minor #blocks name
|
||||||
brw-rw---- 1 root disk 8, 0 mars 9 07:56 /dev/sda]]>
|
brw-rw---- 1 root disk 8, 0 mars 9 07:56 /dev/sda]]>
|
||||||
</screen>
|
</screen>
|
||||||
<para>Shows permissions (
|
<para>Shows permissions (
|
||||||
<code>brw-rw----</code>), owner (root), group (disk), major
|
<systemitem>brw-rw----</systemitem>), owner (root), group (disk), major
|
||||||
device number (8), minor device number (0), date (mars 9 -
|
device number (8), minor device number (0), date (mars 9 -
|
||||||
french, no year), hour (07:56) and device name (guess
|
french, no year), hour (07:56) and device name (guess
|
||||||
:-).</para>
|
:-).</para>
|
||||||
|
@ -522,8 +520,8 @@ brw-rw---- 1 root disk 8, 0 mars 9 07:56 /dev/sda]]>
|
||||||
swap space, or even foreign file systems like (Microsoft)
|
swap space, or even foreign file systems like (Microsoft)
|
||||||
NTFS or (Sun) UFS. There is a numerical code associated with
|
NTFS or (Sun) UFS. There is a numerical code associated with
|
||||||
each partition type. For example, the code for ext2 is
|
each partition type. For example, the code for ext2 is
|
||||||
<code>0x83</code>and linux swap is
|
<constant>0x83</constant> and linux swap is
|
||||||
<code>0x82</code>(0x mean hexadecimal).</para>
|
<constant>0x82</constant> (0x mean hexadecimal).</para>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<title>Foreign Partition Types</title>
|
<title>Foreign Partition Types</title>
|
||||||
|
|
|
@ -1,609 +0,0 @@
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
|
||||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
|
||||||
"http://www.docbook.org/xml/4.2/docbookx.dtd">
|
|
||||||
<article>
|
|
||||||
<articleinfo>
|
|
||||||
<author>
|
|
||||||
<firstname>Jean-Daniel</firstname>
|
|
||||||
<surname>Dodin</surname>
|
|
||||||
<affiliation>
|
|
||||||
<!-- A valid email is required. You may add a spam blocker, or get a Yahoo/Gmail/etc account. --> <address>
|
|
||||||
<email>jdd@dodin.org</email>
|
|
||||||
</address>
|
|
||||||
</affiliation>
|
|
||||||
</author>
|
|
||||||
|
|
||||||
<title>Partitions-Mass-Storage-Definitions-Naming-HOWTO</title>
|
|
||||||
<revhistory>
|
|
||||||
<revision>
|
|
||||||
<revnumber>V0.1</revnumber>
|
|
||||||
<date>2009-05-09</date>
|
|
||||||
<authorinitials>jdd</authorinitials>
|
|
||||||
</revision>
|
|
||||||
</revhistory>
|
|
||||||
</articleinfo>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<para>
|
|
||||||
<emphasis role='strong'>
|
|
||||||
Partitions-Mass-Storage-Definitions-Naming-HOWTO</emphasis>,
|
|
||||||
copyright (c) 2009 Jean-Daniel Dodin</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Copyright and Licence</title>
|
|
||||||
<para>The copyright of this document is to the author,
|
|
||||||
Jean-Daniel Dodin, according to the following licence.</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[ Permission is granted to copy, distribute and/or modify this
|
|
||||||
document under the terms of the GNU Free Documentation License,
|
|
||||||
Version 1.2 or any later version published by the Free Software
|
|
||||||
Foundation; with no Invariant Sections, no Front-Cover Texts and
|
|
||||||
no Back-Cover Texts. A copy of the license is included in the
|
|
||||||
section entitled "GNU Free Documentation License".]]>
|
|
||||||
</screen>
|
|
||||||
<para>
|
|
||||||
<ulink url='http://wiki.tldp.org/LdpWikiDefaultLicence#GNUFreeDocumentationLicense'>
|
|
||||||
GNU Free Documentation License</ulink>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Mass Storage Involved Here</title>
|
|
||||||
<para>Mass storage involved in the present HOWTO are rewritable
|
|
||||||
random access ones. Most of them are magnetic rotating disks
|
|
||||||
(floppies, Hard Drive) or flash memory (USB key or any kind of
|
|
||||||
memory card).</para>
|
|
||||||
<para>For example, cdroms and dvds are
|
|
||||||
<emphasis role='strong'>not</emphasis>concerned by this HOWTO (
|
|
||||||
<ulink url='http://en.wikipedia.org/wiki/Cdrom'>see
|
|
||||||
Wikipedia</ulink>). Tapes are not either.</para>
|
|
||||||
<para>Mass storage are used by the kernel, so the basic doc can
|
|
||||||
be found on
|
|
||||||
<ulink url='http://kernel.org/pub/linux/docs/device-list/devices-2.6+.txt'>
|
|
||||||
the kernel Web site</ulink></para>
|
|
||||||
<para>Reference site should be
|
|
||||||
<ulink url='http://www.idema.org'>the International Disk drive
|
|
||||||
Equipment and Materials Association</ulink>.
|
|
||||||
<emphasis>Should</emphasis>because this Web site is not very
|
|
||||||
friendly.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Definitions</title>
|
|
||||||
<section>
|
|
||||||
<title>Warning</title>
|
|
||||||
<para>Many definitions about drives are only virtual. That is
|
|
||||||
they are used, but the hardware is often quite different from
|
|
||||||
the expected description. Usually this have no odd result,
|
|
||||||
any mass storage have to be seen as a
|
|
||||||
<emphasis>black box</emphasis>.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Bytes</title>
|
|
||||||
<para>Computers counts with binaries, 1 & 0,
|
|
||||||
1111100001110... To be able to read this better, humans uses
|
|
||||||
nibbles (4 bits) often shown as Hexadecimal numbers from 0 to
|
|
||||||
f (0123456789abcdef). Nibbles are usually grouped by two and
|
|
||||||
this gives a byte. The most used memory unit is byte and it's
|
|
||||||
multiples, KiB (Kilo Bytes), MiB (Mega Bytes), GiB
|
|
||||||
(Gigabytes). The "i" denotes the binary use (0ne Ki is 1024,
|
|
||||||
not 1000), the uppercase "B" denotes Bytes, not bits.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Sectors</title>
|
|
||||||
<para>Sometime, the word
|
|
||||||
<emphasis>block</emphasis>is used in place of
|
|
||||||
<emphasis>sectors</emphasis>.</para>
|
|
||||||
<para>Mass storage devices (at least the ones we are dealing
|
|
||||||
with here) store bytes in "Sectors" of 512 Bytes. This is
|
|
||||||
uneven, because any sector count have to be divided by two to
|
|
||||||
have the KiB number, so most partitonning software accepts
|
|
||||||
letters k (KiB), m (MiB), g... as options. Wise ones do not
|
|
||||||
make any case difference.</para>
|
|
||||||
<para>Sector size is the available byte count. The true
|
|
||||||
sector is bigger, as it have to include housekeeping data.
|
|
||||||
You don't have to worry about that.</para>
|
|
||||||
<para>Notice that as of 03-22-2006, the IDEMA annouced a new
|
|
||||||
sector size of 4kiB (4096 Bytes):
|
|
||||||
<ulink url='http://www.idema.org/_smartsite/modules/local/data_file/show_file.php?cmd=download&data_file_id=1446' />-
|
|
||||||
doc file, can be openned with OpenOffice.org.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Heads</title>
|
|
||||||
<para>Rotating mass storage devices uses
|
|
||||||
<emphasis>heads</emphasis>. True heads are the physical
|
|
||||||
electromechanical device that writes and read the magnetic
|
|
||||||
track. Drives being made of rotating plates, the plates have
|
|
||||||
two sides, so disks can have two head by plate. Having two
|
|
||||||
plates (frequent) you have four heads.</para>
|
|
||||||
<para>Heads are writing through very complex system, see
|
|
||||||
detailed info here:
|
|
||||||
<ulink url='http://www.spmtips.com/library/data_storage' />.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Tracks</title>
|
|
||||||
<para>Plates are rotating. When a head is still, the plate
|
|
||||||
rotation and the width of the head are defining a
|
|
||||||
track.</para>
|
|
||||||
<para>Heads are moving from the external part of the plate to
|
|
||||||
the inner part, step by steps. Each step defines a new
|
|
||||||
track.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Cylinders</title>
|
|
||||||
<para>Heads are moving together, all at the same time. They
|
|
||||||
may rotate - on they own center, not the plate center, of
|
|
||||||
course. They also may have a linear move. You can see an
|
|
||||||
example of linear moving head in any cdreader, looking at the
|
|
||||||
move of the laser head. Most disks are as shown by this
|
|
||||||
wikipedia image
|
|
||||||
<ulink url='http://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Hard_disk_platters_and_head.jpg/200px-Hard_disk_platters_and_head.jpg' />.</para>
|
|
||||||
<para>When you think of all the tracks defined by each head
|
|
||||||
at the same time, you have a cylinder. So on a rotating
|
|
||||||
drive, all the tracks of the same cylinder are read or
|
|
||||||
written at the same time. The actual data is spread on all
|
|
||||||
the plates. The way the data is actually written is up to the
|
|
||||||
drive manufacturer, not the user.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Disks</title>
|
|
||||||
<para>Small disks are used directly as a hole bunch of
|
|
||||||
sectors. Basic programs can access data directly on sectors.
|
|
||||||
Many do (like dd or any partitionning programm).</para>
|
|
||||||
<para>But we live in a world of extremely high capacity mass
|
|
||||||
storage. Terabytes is normal nowaday (2009), when a complete
|
|
||||||
Linux system can live on a floppy (1440 bytes). So there is a
|
|
||||||
need of making several parts from a mass storage device,
|
|
||||||
though the partitions.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Partitions</title>
|
|
||||||
<para>Partitioning is a means to divide a single drive into
|
|
||||||
many logical drives. A partition is a contiguous set of
|
|
||||||
sectors. To lessen the heads travel, partitions can be
|
|
||||||
"aligned" on the cylinder size, that is use an integer number
|
|
||||||
of cylinder. This is not always done, but should as it have
|
|
||||||
many other advantages for recovery.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Partition Table</title>
|
|
||||||
<para>As you can have many partitions, you need to have a
|
|
||||||
partition table. This partition table is stored in the very
|
|
||||||
beginning of the drive. It's very unlikely that you will have
|
|
||||||
to change this table directly writing bytes with an
|
|
||||||
hexadecimal editor, so we wont say more on the position of
|
|
||||||
the table.</para>
|
|
||||||
<para>There are many Operating Systems all around that all
|
|
||||||
share similar hardware and as many partition systems. We will
|
|
||||||
look only at what one can find in a PC, even if it's not easy
|
|
||||||
to define that nowaday. Say, for us, a PC is any computer
|
|
||||||
able to run Linux (I know, it's not always true).</para>
|
|
||||||
<para>Each of these partition kinds are noted in the table by
|
|
||||||
a special flag called "type" ("t" in fdisk). Most known are
|
|
||||||
type 83 for Linux partitions and 82 for Linux swap (hex
|
|
||||||
numbers).</para>
|
|
||||||
<para>Notice that most Operating Systems can share partition
|
|
||||||
tables. At least, if a disk is hardware compatible with
|
|
||||||
several systems, these systems should be able to see what the
|
|
||||||
others have done, not to erase a drive by accident. I can't
|
|
||||||
say for sure that its true in the real life.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>File Systems</title>
|
|
||||||
<para>Partitions can be accessed directly as sectors, as any
|
|
||||||
part of the disk, but are usually filled with a
|
|
||||||
<emphasis role='strong'>file system</emphasis>. File system
|
|
||||||
and partitions are related only because a file system is in a
|
|
||||||
partition, but that's all. You can have a disk without
|
|
||||||
partition but with a file system or have partitions without
|
|
||||||
file system (the swap partition beeing the most well known).
|
|
||||||
For details on file systems,
|
|
||||||
<ulink url='http://en.wikipedia.org/wiki/File_system'>see
|
|
||||||
Wikipedia</ulink>.</para>
|
|
||||||
<para>In summary, file systems allow storing data in files
|
|
||||||
with human readable names and to sort the files in a friendly
|
|
||||||
way, for example as directories, subdirectories, text,
|
|
||||||
images...</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Files and Nodes</title>
|
|
||||||
<para>Nearly all what you can find on a mass storage
|
|
||||||
partition, beside sectors, from an user point of view, is a
|
|
||||||
file. But computers are curious geeks and you can treat files
|
|
||||||
like disks if you want. Using the "loop" system, default in
|
|
||||||
most Linux kernels, one can partition the inside of the file,
|
|
||||||
create file systems on it and mount it. This is specially
|
|
||||||
handy for experiments.</para>
|
|
||||||
<para>Some of these files are
|
|
||||||
<emphasis>devices</emphasis>or
|
|
||||||
<emphasis>nodes</emphasis>. Partitions are not files and are
|
|
||||||
accessed via special nodes we will see later. These nodes are
|
|
||||||
not created by touch but by
|
|
||||||
<emphasis>mknode</emphasis>. Use with caution. Nodes need a
|
|
||||||
type (
|
|
||||||
<emphasis>c</emphasis>for "character" or "b" for
|
|
||||||
<emphasis>block</emphasis>) and major and minor numbers. For
|
|
||||||
what we need, major numbers are disk numbers and minor
|
|
||||||
numbers are partition numbers. The list is visible in
|
|
||||||
/proc/partitions</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[cat /proc/partitions
|
|
||||||
major minor #blocks name
|
|
||||||
|
|
||||||
8 0 488386584 sda
|
|
||||||
8 1 52436128 sda1
|
|
||||||
8 2 1 sda2
|
|
||||||
8 5 2104483 sda5
|
|
||||||
8 6 20972826 sda6
|
|
||||||
8 7 52436128 sda7
|
|
||||||
8 8 360434308 sda8]]>
|
|
||||||
</screen>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[#mknod b 8 9 /dev/sda9]]>
|
|
||||||
</screen>
|
|
||||||
<para>Creates a /dev/sda9 node of no nuse, given this don't
|
|
||||||
create partition, only the node. In a usual Linux
|
|
||||||
distribution, nodes are dynamically created at boot time, so
|
|
||||||
nobody should have to do so. However, sometime the automatic
|
|
||||||
system fails.</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Drive Naming in Linux</title>
|
|
||||||
<para>There is a special nomenclature that linux uses to refer
|
|
||||||
to mass storage that must be understood.</para>
|
|
||||||
<section>
|
|
||||||
<title>Naming Convention</title>
|
|
||||||
<para>Linux used to deal with two kind of drives, depending
|
|
||||||
of the electronic interface (controller), IDE and SCSI.
|
|
||||||
Oldtimers remember the day where cdwriters where acccessed
|
|
||||||
through "SCSI emulation". In fact IDE and SCSI use mostly the
|
|
||||||
same low level commands and for 2007 up, with the new "SATA"
|
|
||||||
interface, the naming was unified and, in new ditributions,
|
|
||||||
all the drives have the same naming. For this part, CD or DVD
|
|
||||||
readers/writers are seen like Hard Drives.</para>
|
|
||||||
<section>
|
|
||||||
<title>Old IDE Names</title>
|
|
||||||
<para>By convention, IDE drives where given device names
|
|
||||||
<code>/dev/hda</code>to
|
|
||||||
<code>/dev/hdd</code>.
|
|
||||||
<emphasis>H</emphasis>ard
|
|
||||||
<emphasis>D</emphasis>rive
|
|
||||||
<emphasis>A</emphasis>(
|
|
||||||
<code>/dev/hda</code>) is the first drive and
|
|
||||||
<emphasis>H</emphasis>ard
|
|
||||||
<emphasis>D</emphasis>rive
|
|
||||||
<emphasis>C</emphasis>(
|
|
||||||
<code>/dev/hdc</code>) is the third.</para>
|
|
||||||
<para>A typical PC has two IDE controllers, each of which
|
|
||||||
can have two drives connected to it. For example,
|
|
||||||
<code>/dev/hda</code>is the first drive (master) on the
|
|
||||||
first IDE controller and
|
|
||||||
<code>/dev/hdd</code>is the second (slave) drive on the
|
|
||||||
second controller (the fourth IDE drive in the
|
|
||||||
computer).</para>
|
|
||||||
<para>So, typically, a computer with IDE controller can
|
|
||||||
accomodate 4 drives: /dev/hda (primary master), /dev/hdb
|
|
||||||
(primary slave), /dev/hdc (secondary master), /dev/hdd
|
|
||||||
(secondary slave). Some (rare) Mother Boards have more than
|
|
||||||
two controllers, some addition cards can also have
|
|
||||||
controllers, these are numbered following the alphabet, but
|
|
||||||
one have to figure out what real names are given for his
|
|
||||||
particular hardware.</para>
|
|
||||||
<para>You can have drives where ever you want, it's not
|
|
||||||
mandatory to fill the gaps. You may have interest to read
|
|
||||||
about what drive/cdrom connect to what place, but it's out
|
|
||||||
of this document scope.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>New Hard Drives Names</title>
|
|
||||||
<para>Now all the rotating hard drives uses the same names
|
|
||||||
as the old SCSI controllers, that is "s" in place of "h",
|
|
||||||
so /dev/sda, and so on. The number of drives depends on the
|
|
||||||
number of controllers on the Mother Board or the extended
|
|
||||||
boards. Usually 4 are available. What will be the number of
|
|
||||||
a drive is up to the controller card and the way it's read
|
|
||||||
by the kernel, so difficult to say at first.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Flash Drives Names</title>
|
|
||||||
<para>Flash drives are usually not connected through IDE or
|
|
||||||
SATA interfaces and so don't uses the same names. Several
|
|
||||||
interfaces are used with each different names. The kernel
|
|
||||||
documentations gives the names.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Low level Devices and Extra naming</title>
|
|
||||||
<para>You will find in some apps references to lowlevel
|
|
||||||
SCSI devices and various naming conventions, for example
|
|
||||||
(wodim is the command line cd burner):</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[wodim --scanbus
|
|
||||||
scsibus1:
|
|
||||||
1,0,0 100) *
|
|
||||||
1,1,0 101) 'TSSTcorp' 'CD/DVDW TS-L632D' 'ac00' Removable CD-ROM
|
|
||||||
1,2,0 102) *
|
|
||||||
1,3,0 103) *
|
|
||||||
1,4,0 104) *
|
|
||||||
1,5,0 105) *
|
|
||||||
1,6,0 106) *
|
|
||||||
1,7,0 107) *]]>
|
|
||||||
</screen>
|
|
||||||
<para>And you may have to use some sort of
|
|
||||||
<emphasis>SCSI:1,1,0</emphasis>option to access the CDROM.
|
|
||||||
try to avoid using this as much as possible, as it's very
|
|
||||||
error prone and should be let to programmers only. I only
|
|
||||||
mention it because you can't always avoid it.</para>
|
|
||||||
<para>If you do "cat /dev/ | more", you can see:</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[lrwxrwxrwx 1 root root 3 mars 9 07:56 scd0 -> sr0
|
|
||||||
(...)
|
|
||||||
crw-r----- 1 root disk 21, 0 mars 9 07:56 sg0
|
|
||||||
crw-rw----+ 1 root disk 21, 1 mars 9 07:56 sg1]]>
|
|
||||||
</screen>
|
|
||||||
<para>These scd, sr, sg devices are lowlevel interface
|
|
||||||
(notice the "c" for "character"). Try not using them.
|
|
||||||
<emphasis>dmesg</emphasis>and
|
|
||||||
<emphasis>more /var/log/boot.msg</emphasis>should give you
|
|
||||||
the usable sdxx device, like (short summary):</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[<5>sd 0:0:0:0: [sda] 976773168 512-byte hardware sectors: (500GB/465GiB)
|
|
||||||
<5>sd 0:0:0:0: [sda] Write Protect is off
|
|
||||||
<7>sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00]]>
|
|
||||||
</screen>
|
|
||||||
<para>This mean the drive is
|
|
||||||
<emphasis>/dev/sda</emphasis>.</para>
|
|
||||||
<para>However these files (given by
|
|
||||||
<emphasis>dmesg</emphasis>and
|
|
||||||
<emphasis>more /var/log/boot.msg</emphasis>) used to be
|
|
||||||
easy to read but are no more. Now the kernel starts in
|
|
||||||
parallel several drivers, so the messages are mixed, you
|
|
||||||
can have</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[<6> sda:<6>USB Universal Host Contr'ller Interface driver v3.0]]>
|
|
||||||
</screen>
|
|
||||||
<para>This don't mean that your sda drive is an usb one,
|
|
||||||
but the usb module was started at the same time as the
|
|
||||||
drive one and send it's messages simultaneously. You still
|
|
||||||
have a
|
|
||||||
<emphasis>/dev/sda</emphasis>drive.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>New Media Names</title>
|
|
||||||
<para>Here the dmesg content for inserting an USB
|
|
||||||
key:</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[scsi7 : SCSI emulation for USB Mass Storage devices
|
|
||||||
usb 5-3: New USB device found, idVendor=0951, idProduct=160e
|
|
||||||
usb 5-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
|
|
||||||
usb 5-3: Product: DataTraveler 2.0
|
|
||||||
usb 5-3: Manufacturer: Kingston
|
|
||||||
usb 5-3: SerialNumber: 200706200000000059188185
|
|
||||||
usb-storage: device found at 9
|
|
||||||
usb-storage: waiting for device to settle before scanning
|
|
||||||
scsi 7:0:0:0: Direct-Access Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 2
|
|
||||||
sd 7:0:0:0: [sdb] 3930112 512-byte hardware sectors: (2.01GB/1.87GiB)
|
|
||||||
sd 7:0:0:0: [sdb] Write Protect is off
|
|
||||||
sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
|
|
||||||
sd 7:0:0:0: [sdb] Assuming drive cache: write through
|
|
||||||
sd 7:0:0:0: [sdb] 3930112 512-byte hardware sectors: (2.01GB/1.87GiB)
|
|
||||||
sd 7:0:0:0: [sdb] Write Protect is off
|
|
||||||
sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
|
|
||||||
sd 7:0:0:0: [sdb] Assuming drive cache: write through
|
|
||||||
sdb: sdb1
|
|
||||||
sd 7:0:0:0: [sdb] Attached SCSI removable disk
|
|
||||||
sd 7:0:0:0: Attached scsi generic sg2 type 0
|
|
||||||
usb-storage: device scan complete]]>
|
|
||||||
</screen>
|
|
||||||
<para>You see there all what we where speaking about right
|
|
||||||
now! SCSI emulation, scsi, sd and sg names, but also the
|
|
||||||
sdb that is most important for us.</para>
|
|
||||||
<para>Here are the messages for a high speed SDHC
|
|
||||||
card:</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[tifm_core: MMC/SD card detected in socket 0:1
|
|
||||||
mmc1: new SDHC card at address d555
|
|
||||||
mmcblk0: mmc1:d555 SD04G 3.79GiB
|
|
||||||
mmcblk0: p1
|
|
||||||
|
|
||||||
/dev/mmcblk0p1 on /media/H2SD type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower)]]>
|
|
||||||
</screen>
|
|
||||||
<para>When the two cards are probably the same flash memory
|
|
||||||
chip, the USB key uses the USB interface and SCSI
|
|
||||||
emulation, the SDHC card uses the PCMCIA slot of the
|
|
||||||
laptop, with a special device naming (/dev/mmcblk0). The
|
|
||||||
use, as far as partitionning is involved is the
|
|
||||||
same.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Disk ID</title>
|
|
||||||
<para>In a world where disks are many and removable, it's
|
|
||||||
impossible to track what device is used by what disk. So
|
|
||||||
there are now many way of using a disk name. This makes it
|
|
||||||
extremely difficult to work with basic tools. These are
|
|
||||||
"Disk labels" and "Disk UUID", also "Partition Labels". See
|
|
||||||
fstab man page for details.</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Partition Naming in Linux</title>
|
|
||||||
<section>
|
|
||||||
<title>Numbers</title>
|
|
||||||
<para>Partition naming is thanksfully simpler than drive one.
|
|
||||||
Partitions are simply given a number from 0 up (decimal).
|
|
||||||
Sometime a "p" is appended on front of the number:</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[cat /proc/partitions
|
|
||||||
major minor #blocks name
|
|
||||||
|
|
||||||
8 0 488386584 sda
|
|
||||||
8 1 52436128 sda1
|
|
||||||
8 2 1 sda2
|
|
||||||
8 5 2104483 sda5
|
|
||||||
8 6 20972826 sda6
|
|
||||||
8 7 52436128 sda7
|
|
||||||
8 8 360434308 sda8
|
|
||||||
179 0 3979776 mmcblk0
|
|
||||||
179 1 3975680 mmcblk0p1]]>
|
|
||||||
</screen>
|
|
||||||
<para>As you see, partition devices are listed in
|
|
||||||
/proc/partition. This file... is not a real file but is
|
|
||||||
created on the fly. Don't worry, for what we need it's a
|
|
||||||
file.</para>
|
|
||||||
<para>Notice the "p1" partition name for the SDHC
|
|
||||||
card.</para>
|
|
||||||
<para>Max number of partitions is 15 for SCSI and all the
|
|
||||||
drives using the new SATA driver, 63 for IDE drives (0 is the
|
|
||||||
full drive, 0 to 15 is four bits 0 to 64, 6 bits)</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Meaning of the Numbers</title>
|
|
||||||
<para>Not all the numbers have the same meaning. This mess
|
|
||||||
come from the PC history. One can divide floppies with
|
|
||||||
partitions, but then 4 ones seems sufficient. But then come
|
|
||||||
Hard drives :-). So the partitons numbers 1, 2, 3 and 4 are
|
|
||||||
<emphasis>primary</emphasis>partitions. One drive can only
|
|
||||||
have 4 primaries.</para>
|
|
||||||
<para>To go further, we have to use one of these primary as a
|
|
||||||
big one and sub-partition this one, so to have
|
|
||||||
<emphasis>logical</emphasis>partitions. The big
|
|
||||||
<emphasis>extended</emphasis>partition can be any of the
|
|
||||||
4.</para>
|
|
||||||
<para>So, remember, the primary partitions are inside the
|
|
||||||
drive and the logical partitions are inside one of the
|
|
||||||
primary, called the
|
|
||||||
<emphasis>extended</emphasis>partition.</para>
|
|
||||||
<para>Once the logical partitions are created, it's no more
|
|
||||||
recommended to write directly to the extended one. Writing to
|
|
||||||
an extended partition would erase the logical ones like
|
|
||||||
writing directly to a hard drive erase the partitons. Beware,
|
|
||||||
|
|
||||||
<emphasis role='strong'>it's possible</emphasis>!!</para>
|
|
||||||
<para>If, after creating 4 primary partitions, all the disk
|
|
||||||
space is not used, the remaining space is lost (unusable), so
|
|
||||||
most of the time, create the desired primaries, then at last
|
|
||||||
the extended one with all the remaining room.</para>
|
|
||||||
<para>It's not necessary to create 4 primaries. You could use
|
|
||||||
only one extended (Linux only), but there are some advantages
|
|
||||||
of using primaries.</para>
|
|
||||||
<para>Primaries being 4, the first logical partition is
|
|
||||||
always 5. So any partition with number of five and up is a
|
|
||||||
logical one.</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Device Major and Minor Numbers</title>
|
|
||||||
<para>The only important thing with a device file are its major
|
|
||||||
and minor device numbers, which are shown instead of the file
|
|
||||||
size:</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[$ ls -l /dev/hda
|
|
||||||
brw-rw---- 1 root disk 8, 0 mars 9 07:56 /dev/sda]]>
|
|
||||||
</screen>
|
|
||||||
<para>Shows permissions (
|
|
||||||
<code>brw-rw----</code>), owner (root), group (disk), major
|
|
||||||
device number (8), minor device number (0), date (mars 9 -
|
|
||||||
french, no year), hour (07:56) and device name (guess
|
|
||||||
:-).</para>
|
|
||||||
<para>When accessing a device file, the major number selects
|
|
||||||
which device driver is being called to perform the input/output
|
|
||||||
operation. This call is being done with the minor number as a
|
|
||||||
parameter and it is entirely up to the driver how the minor
|
|
||||||
number is being interpreted. The driver documentation usually
|
|
||||||
describes how the driver uses minor numbers.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Partition Types</title>
|
|
||||||
<section>
|
|
||||||
<title>Linux Partition Types</title>
|
|
||||||
<para>A partition is labeled to host a certain kind of file
|
|
||||||
system (not to be confused with a volume label. Such a file
|
|
||||||
system could be the linux standard ext3 file system or linux
|
|
||||||
swap space, or even foreign file systems like (Microsoft)
|
|
||||||
NTFS or (Sun) UFS. There is a numerical code associated with
|
|
||||||
each partition type. For example, the code for ext2 is
|
|
||||||
<code>0x83</code>and linux swap is
|
|
||||||
<code>0x82</code>(0x mean hexadecimal).</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Foreign Partition Types</title>
|
|
||||||
<para>The partition type codes have been arbitrarily chosen
|
|
||||||
(you can't figure out what they should be) and they are
|
|
||||||
particular to a given operating system. Therefore, it is
|
|
||||||
theoretically possible that if you use two operating systems
|
|
||||||
with the same hard drive, the same code might be used to
|
|
||||||
designate two different partition types. OS/2 marks its
|
|
||||||
partitions with a 0x07 type and so does Windows NT's NTFS.
|
|
||||||
MS-DOS allocates several type codes for its various flavors
|
|
||||||
of FAT file systems: 0x01, 0x04 and 0x06 are known. DR-DOS
|
|
||||||
used 0x81 to indicate protected FAT partitions, creating a
|
|
||||||
type clash with Linux/Minix at that time, but neither
|
|
||||||
Linux/Minix nor DR-DOS are widely used any more.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Swap Partitions</title>
|
|
||||||
<para>Every process running on your computer is allocated a
|
|
||||||
number of blocks of RAM. These blocks are called pages. The
|
|
||||||
set of in-memory pages which will be referenced by the
|
|
||||||
processor in the very near future is called a "working set."
|
|
||||||
Linux tries to predict these memory accesses (assuming that
|
|
||||||
recently used pages will be used again in the near future)
|
|
||||||
and keeps these pages in RAM if possible.</para>
|
|
||||||
<para>If you have too many processes running on a machine,
|
|
||||||
the kernel will try to free up RAM by writing pages to disk.
|
|
||||||
This is what swap space is for. It effectively increases the
|
|
||||||
amount of memory you have available. However, disk I/O is
|
|
||||||
about a hundred times slower than reading from and writing to
|
|
||||||
RAM. Consider this emergency memory and not extra
|
|
||||||
memory.</para>
|
|
||||||
<para>If memory becomes so scarce that the kernel pages out
|
|
||||||
from the working set of one process in order to page in for
|
|
||||||
another, the machine is said to be thrashing. Some readers
|
|
||||||
might have inadvertenly experienced this: the hard drive is
|
|
||||||
grinding away like crazy, but the computer is slow to the
|
|
||||||
point of being unusable. Swap space is something you need to
|
|
||||||
have, but it is no substitute for sufficient RAM.</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Complete List</title>
|
|
||||||
<para>From the fdisk help:</para>
|
|
||||||
<screen>
|
|
||||||
<![CDATA[ 0 Vide 1e Hidden W95 FAT1 80 Old Minix bf Solaris
|
|
||||||
1 FAT12 24 NEC DOS 81 Minix / old Lin c1 DRDOS/sec (FAT-
|
|
||||||
2 XENIX root 39 Plan 9 82 Linux swap / So c4 DRDOS/sec (FAT-
|
|
||||||
3 XENIX usr 3c PartitionMagic 83 Linux c6 DRDOS/sec (FAT-
|
|
||||||
4 FAT16 <32M 40 Venix 80286 84 OS/2 hidden C: c7 Syrinx
|
|
||||||
5 Extended 41 PPC PReP Boot 85 Linux extended da Non-FS data
|
|
||||||
6 FAT16 42 SFS 86 NTFS volume set db CP/M / CTOS / .
|
|
||||||
7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set de Dell Utility
|
|
||||||
8 AIX 4e QNX4.x 2nd part 88 Linux plein tex df BootIt
|
|
||||||
9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM e1 DOS access
|
|
||||||
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e3 DOS R/O
|
|
||||||
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e4 SpeedStor
|
|
||||||
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS eb BeOS fs
|
|
||||||
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi ee GPT
|
|
||||||
f W95 Etendu (LBA 54 OnTrackDM6 a5 FreeBSD ef EFI (FAT-12/16/
|
|
||||||
10 OPUS 55 EZ-Drive a6 OpenBSD f0 Linux/PA-RISC b
|
|
||||||
11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f1 SpeedStor
|
|
||||||
12 Compaq diagnost 5c Priam Edisk a8 UFS Darwin f4 SpeedStor
|
|
||||||
14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f2 DOS secondary
|
|
||||||
16 Hidden FAT16 63 GNU HURD or Sys ab Amorce Darwin fb VMware VMFS
|
|
||||||
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
|
|
||||||
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
|
|
||||||
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
|
|
||||||
1c Hidden W95 FAT3 75 PC/IX be Amorce Solaris ff BBT]]>
|
|
||||||
</screen>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>How Many Partitions</title>
|
|
||||||
<para>The exact number of partitions allowed on a drive is
|
|
||||||
fixed by the kernel. So you can find the exact number is the
|
|
||||||
kernel documentation, the last version is maintained here
|
|
||||||
<ulink url='http://kernel.org/pub/linux/docs/device-list/' />If
|
|
||||||
you have the kernel source installed, you can find your version
|
|
||||||
on your computer at
|
|
||||||
/usr/src/linux/Documentation/devices.txt.</para>
|
|
||||||
<para>Look at "limit on partition". Find yours. Common SATA
|
|
||||||
number is 31, SCSI is 15, some are less.</para>
|
|
||||||
</section>
|
|
||||||
</article>
|
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
@ -3,8 +3,7 @@
|
||||||
<!ENTITY brztxt SYSTEM "Brazil.txt">
|
<!ENTITY brztxt SYSTEM "Brazil.txt">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<article xsl:version="1.0"
|
<article>
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
||||||
<articleinfo>
|
<articleinfo>
|
||||||
<title>Managing Accurate Date and Time</title>
|
<title>Managing Accurate Date and Time</title>
|
||||||
<copyright><year>2002,2003,2004,2005</year><holder>Avi Alkalay</holder></copyright>
|
<copyright><year>2002,2003,2004,2005</year><holder>Avi Alkalay</holder></copyright>
|
||||||
|
@ -13,11 +12,11 @@
|
||||||
<author>
|
<author>
|
||||||
<firstname>Avi</firstname>
|
<firstname>Avi</firstname>
|
||||||
<surname>Alkalay</surname>
|
<surname>Alkalay</surname>
|
||||||
<email>avi unix sh</email>
|
|
||||||
<affiliation>
|
<affiliation>
|
||||||
<orgdiv>Linux, Open Standards consultant :: Senior IT and Software Architect</orgdiv>
|
|
||||||
<orgname>IBM Linux Impact Team :: <ulink url="http://ibm.com/linux">ibm.com/linux</ulink></orgname>
|
<orgname>IBM Linux Impact Team :: <ulink url="http://ibm.com/linux">ibm.com/linux</ulink></orgname>
|
||||||
|
<orgdiv>Linux, Open Standards consultant :: Senior IT and Software Architect</orgdiv>
|
||||||
</affiliation>
|
</affiliation>
|
||||||
|
<email>avi unix sh</email>
|
||||||
</author>
|
</author>
|
||||||
<othercredit>
|
<othercredit>
|
||||||
<firstname>Brad</firstname><surname>Knowles</surname>
|
<firstname>Brad</firstname><surname>Knowles</surname>
|
||||||
|
@ -33,28 +32,28 @@
|
||||||
</othercredit>
|
</othercredit>
|
||||||
<othercredit>
|
<othercredit>
|
||||||
<firstname>Takeo</firstname><surname>Nakano</surname>
|
<firstname>Takeo</firstname><surname>Nakano</surname>
|
||||||
<email>nakano at apm.seikei.ac.jp</email>
|
|
||||||
<contrib><ulink url="http://www.linux.or.jp/JF/JFdocs/TimePrecision-HOWTO/">Japanese translation</ulink></contrib>
|
<contrib><ulink url="http://www.linux.or.jp/JF/JFdocs/TimePrecision-HOWTO/">Japanese translation</ulink></contrib>
|
||||||
|
<email>nakano at apm.seikei.ac.jp</email>
|
||||||
</othercredit>
|
</othercredit>
|
||||||
<othercredit>
|
<othercredit>
|
||||||
<firstname>SHAKI</firstname>
|
<firstname>SHAKI</firstname>
|
||||||
<email>sha-ki at narod.ru</email>
|
|
||||||
<contrib><ulink url="http://computerlib.narod.ru/html/linuxtime.htm">Russian translation</ulink></contrib>
|
<contrib><ulink url="http://computerlib.narod.ru/html/linuxtime.htm">Russian translation</ulink></contrib>
|
||||||
|
<email>sha-ki at narod.ru</email>
|
||||||
</othercredit>
|
</othercredit>
|
||||||
<othercredit>
|
<othercredit>
|
||||||
<firstname>Mihaly Gyulai</firstname>
|
<firstname>Mihaly Gyulai</firstname>
|
||||||
<email>gyulai at fbi pont hu</email>
|
|
||||||
<contrib><ulink url="http://tldp.fsf.hu/HOWTO/TimePrecision-HOWTO-hu/index.html">Hungarian translation (magyar forditas)</ulink>, the chorny section and the very first section</contrib>
|
<contrib><ulink url="http://tldp.fsf.hu/HOWTO/TimePrecision-HOWTO-hu/index.html">Hungarian translation (magyar forditas)</ulink>, the chorny section and the very first section</contrib>
|
||||||
|
<email>gyulai at fbi pont hu</email>
|
||||||
</othercredit>
|
</othercredit>
|
||||||
<othercredit>
|
<othercredit>
|
||||||
<firstname>Philippe Wautelet</firstname>
|
<firstname>Philippe Wautelet</firstname>
|
||||||
<email>p.wautelet at fractalzone be</email>
|
|
||||||
<contrib><ulink url="http://www.traduc.org/docs/HOWTO/lecture/TimePrecision-HOWTO.html">French translation</ulink></contrib>
|
<contrib><ulink url="http://www.traduc.org/docs/HOWTO/lecture/TimePrecision-HOWTO.html">French translation</ulink></contrib>
|
||||||
|
<email>p.wautelet at fractalzone be</email>
|
||||||
</othercredit>
|
</othercredit>
|
||||||
<othercredit>
|
<othercredit>
|
||||||
<firstname>Kemal Ökmen</firstname>
|
<firstname>Kemal Ökmen</firstname>
|
||||||
<email>kemal at comu edu tr</email>
|
|
||||||
<contrib><ulink url="http://www.belgeler.org/howto/time-precision-howto.html">Turkish translation (türkçe çeviri)</ulink></contrib>
|
<contrib><ulink url="http://www.belgeler.org/howto/time-precision-howto.html">Turkish translation (türkçe çeviri)</ulink></contrib>
|
||||||
|
<email>kemal at comu edu tr</email>
|
||||||
</othercredit>
|
</othercredit>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
|
@ -89,8 +88,10 @@
|
||||||
<revnumber>1.0.7</revnumber>
|
<revnumber>1.0.7</revnumber>
|
||||||
<date>9 Jul 2004</date>
|
<date>9 Jul 2004</date>
|
||||||
<authorinitials>avi</authorinitials>
|
<authorinitials>avi</authorinitials>
|
||||||
<revremark>Disclaimer near to license, to let people know they can translate without asking permission.</revremark>
|
<revdescription>
|
||||||
<revremark>Small fixes in some phrases.</revremark>
|
<remark>Disclaimer near to license, to let people know they can translate without asking permission.</remark>
|
||||||
|
<remark>Small fixes in some phrases.</remark>
|
||||||
|
</revdescription>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.0.6</revnumber>
|
<revnumber>1.0.6</revnumber>
|
||||||
|
@ -364,7 +365,8 @@ ARC=false</programlisting>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
<para>Here is an example of good architecture:</para>
|
<para>Here is an example of good architecture:</para>
|
||||||
<figure><title>Local Relay Servers for NTP</title>
|
<figure><title>Local Relay Servers for NTP</title>
|
||||||
<graphic srccredit="ntp.prz (Lotus Freelance Graphics), Avi Alkalay, 2002" fileref="ntp.png" label="NTP Architecture" align="center"/>
|
<!-- <graphic srccredit="ntp.prz (Lotus Freelance Graphics), Avi Alkalay, 2002" fileref="ntp.png" label="NTP Architecture" align="center"/> -->
|
||||||
|
<graphic srccredit="ntp.prz (Lotus Freelance Graphics), Avi Alkalay, 2002" fileref="ntp.png" align="center"/>
|
||||||
</figure>
|
</figure>
|
||||||
<para>If you have several machines to synchronize, <emphasis>do not</emphasis> make them all access the remote <acronym>NTP</acronym> servers you chose. Only 2 of your server farm's machines must access remote <acronym>NTP</acronym> servers, and the other machines will sync with these 2. We will call them the <emphasis>Relay Servers</emphasis>.</para>
|
<para>If you have several machines to synchronize, <emphasis>do not</emphasis> make them all access the remote <acronym>NTP</acronym> servers you chose. Only 2 of your server farm's machines must access remote <acronym>NTP</acronym> servers, and the other machines will sync with these 2. We will call them the <emphasis>Relay Servers</emphasis>.</para>
|
||||||
<para>Your Relay Servers can be any machine already available in your network. <acronym>NTP</acronym> consumes low memory and CPU. You don't need a dedicated machine for it.</para>
|
<para>Your Relay Servers can be any machine already available in your network. <acronym>NTP</acronym> consumes low memory and CPU. You don't need a dedicated machine for it.</para>
|
||||||
|
|
|
@ -990,7 +990,7 @@ $ tc qdisc ... dev dev ( parent classid | root) [ handle major: ] prio [bands ba
|
||||||
</para>
|
</para>
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>parent</constant> <group choice="req"><replaceable>root</replaceable> | <replaceable>major:minor</replaceable></group></term>
|
<term><constant>parent</constant> <replaceable>root</replaceable> | <replaceable>major:minor</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
this mandatory parameter determines the place of the CBQ
|
this mandatory parameter determines the place of the CBQ
|
||||||
|
@ -1196,7 +1196,7 @@ $ tc qdisc ... dev dev ( parent classid | root) [ handle major: ] prio [bands ba
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><group choice="opt"><constant>bounded</constant> | <constant>borrow</constant></group></term>
|
<term><constant>bounded</constant> | <constant>borrow</constant></term>
|
||||||
<term></term>
|
<term></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
@ -1208,7 +1208,7 @@ $ tc qdisc ... dev dev ( parent classid | root) [ handle major: ] prio [bands ba
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><group choice="opt"><constant>isolated</constant> | <constant>sharing</constant></group></term>
|
<term><constant>isolated</constant> | <constant>sharing</constant></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
identifies a sharing policy. Either the class will engage
|
identifies a sharing policy. Either the class will engage
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<revnumber>1.2</revnumber>
|
<revnumber>1.2</revnumber>
|
||||||
<date>2007-04-14</date>
|
<date>2007-04-14</date>
|
||||||
<authorinitials>RA</authorinitials>
|
<authorinitials>RA</authorinitials>
|
||||||
<revremark>Addition of DMA related section contributed by Ian Peikon <email><ulink url="mailto:idp2@duke.edu">idp2@duke.edu</ulink></email>and Tim Hanson <email><ulink url="mailto:tim@hardcarve.com">tim@hardcarve.com</ulink></email></revremark>
|
<revdescription><para>Addition of DMA related section contributed by Ian Peikon <email><ulink url="mailto:idp2@duke.edu">idp2@duke.edu</ulink></email>and Tim Hanson <email><ulink url="mailto:tim@hardcarve.com">tim@hardcarve.com</ulink></email></para></revdescription>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.0</revnumber>
|
<revnumber>1.0</revnumber>
|
||||||
|
@ -882,7 +882,7 @@ where the values of the parameters for channel, speed, bytes_per_packet, speed,
|
||||||
<listitem><para>The value of the width and height depends on the size of frame the user wants, for example, if one wants 960x720 then pass 960 as width and 720 as height.</para></listitem>
|
<listitem><para>The value of the width and height depends on the size of frame the user wants, for example, if one wants 960x720 then pass 960 as width and 720 as height.</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2 id="dma example">
|
<sect2 id="dma-example">
|
||||||
<title>Example: How to grab image from the IEEE1394 camera using DMA</title>
|
<title>Example: How to grab image from the IEEE1394 camera using DMA</title>
|
||||||
<para>This section has been contributed by Ian Peikon <email><ulink url="mailto:idp2@duke.edu">idp2@duke.edu</ulink></email>and Tim Hanson <email><ulink url="mailto:tim@hardcarve.com">tim@hardcarve.com</ulink></email>
|
<para>This section has been contributed by Ian Peikon <email><ulink url="mailto:idp2@duke.edu">idp2@duke.edu</ulink></email>and Tim Hanson <email><ulink url="mailto:tim@hardcarve.com">tim@hardcarve.com</ulink></email>
|
||||||
We will now present an example of how to grab a frame by the camera using DMA calls. The example is simple to understand as the logic remains the same as the previous example. We will later compare the function calls used in the previous example (without dma) and this example (with dma) for better understanding.
|
We will now present an example of how to grab a frame by the camera using DMA calls. The example is simple to understand as the logic remains the same as the previous example. We will later compare the function calls used in the previous example (without dma) and this example (with dma) for better understanding.
|
||||||
|
@ -1064,23 +1064,25 @@ Just like the previous example (<xref linkend="example"/>) the program includes
|
||||||
|
|
||||||
After this the following steps are followed which are very similar to the previous example (<xref linkend="example"/>)
|
After this the following steps are followed which are very similar to the previous example (<xref linkend="example"/>)
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem> Open ohci and assign handle to it using the function <function>dc1394_create_handle(0)</function></listitem>
|
<listitem><para>Open ohci and assign handle to it using the function <function>dc1394_create_handle(0)</function></para></listitem>
|
||||||
<listitem>Get the camera nodes using the function <function>dc1394_get_camera_nodes</function></listitem>
|
<listitem><para>Get the camera nodes using the function <function>dc1394_get_camera_nodes</function></para></listitem>
|
||||||
<listitem>Find out various parameters need to be passed during the camera setup. This is done by querying the camera using the following functions
|
<listitem><para>Find out various parameters need to be passed during the camera setup. This is done by querying the camera using the following functions</para>
|
||||||
<itemizedlist>
|
|
||||||
<listitem><function>dc1394_get_iso_channel_and_speed()</function>: To get the channel and speed information</listitem>
|
|
||||||
<listitem><function>dc1394_get_video_format()</function>: To get the camera format</listitem>
|
|
||||||
<listitem><function>dc1394_get_video_framerate()</function>: To get the framerate information</listitem>
|
|
||||||
<listitem><function>dc1394_get_video_mode()</function>: To get the camera mode</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
Also we are required to set the <varname>dma buffers</varname> to 8 and <varname>number of drop frames</varname> to 1.
|
|
||||||
<para>
|
<para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><function>dc1394_get_iso_channel_and_speed()</function>: To get the channel and speed information</para></listitem>
|
||||||
|
<listitem><para><function>dc1394_get_video_format()</function>: To get the camera format</para></listitem>
|
||||||
|
<listitem><para><function>dc1394_get_video_framerate()</function>: To get the framerate information</para></listitem>
|
||||||
|
<listitem><para><function>dc1394_get_video_mode()</function>: To get the camera mode</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Also we are required to set the <varname>dma buffers</varname> to 8 and <varname>number of drop frames</varname> to 1.
|
||||||
Once the values of the parameter have been obtained (framerate,format,mode,channel,speed etc), they are passed in <function>dc1394_dma_setup_capture</function> which then sets up the camera and enables it for capturing video. For DMA you must pass the number of dma buffers and drop frames parameter.</para>
|
Once the values of the parameter have been obtained (framerate,format,mode,channel,speed etc), they are passed in <function>dc1394_dma_setup_capture</function> which then sets up the camera and enables it for capturing video. For DMA you must pass the number of dma buffers and drop frames parameter.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>After the camera is set, <function>dc1394_start_iso_transmission()</function> is called. This function starts data transactions from the camera to the bus.</listitem>
|
<listitem><para>After the camera is set, <function>dc1394_start_iso_transmission()</function> is called. This function starts data transactions from the camera to the bus.</para></listitem>
|
||||||
<listitem>Now capture one frame using <function>dc1394_dma_single_capture()</function>. This function will capture a frame into the dma buffer<para>
|
<listitem><para>Now capture one frame using <function>dc1394_dma_single_capture()</function>. This function will capture a frame into the dma buffer</para>
|
||||||
After the frame has been grabbed release the dma buffer using <function>dc1394_dma_done_with_buffer()</function>. This is required so that the memory can be reused. It is imperative that <function>dc1394_dma_done_with_buffer()</function> always follows a <function>dma_capture</function> function call</para>
|
<para>After the frame has been grabbed release the dma buffer using <function>dc1394_dma_done_with_buffer()</function>. This is required so that the memory can be reused. It is imperative that <function>dc1394_dma_done_with_buffer()</function> always follows a <function>dma_capture</function> function call</para>
|
||||||
So in order to capture more than one frame the code will be
|
<para>So in order to capture more than one frame the code will be
|
||||||
<screen>
|
<screen>
|
||||||
for( i=0;i<100 ;i++)/* to capture 100 images*/
|
for( i=0;i<100 ;i++)/* to capture 100 images*/
|
||||||
{
|
{
|
||||||
|
@ -1088,12 +1090,12 @@ for( i=0;i<100 ;i++)/* to capture 100 images*/
|
||||||
dc1394_dma_done_with_buffer(&camera);
|
dc1394_dma_done_with_buffer(&camera);
|
||||||
}
|
}
|
||||||
</screen>
|
</screen>
|
||||||
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>Stop listening to the iso channel by calling <function>dc1394_dma_unlisten()</function><para>
|
<listitem><para>Stop listening to the iso channel by calling <function>dc1394_dma_unlisten()</function></para>
|
||||||
Terminate the data transmission by calling <function>dc1394_stop_iso_transmission()</function></para></listitem>
|
<para>Terminate the data transmission by calling <function>dc1394_stop_iso_transmission()</function></para></listitem>
|
||||||
<listitem>Save the image in a file and add a PGM header for viewing using <application>gimp</application>.</listitem>
|
<listitem><para>Save the image in a file and add a PGM header for viewing using <application>gimp</application>.</para></listitem>
|
||||||
<listitem>Finally call <function>dc1394_release_camera</function> to release the camera</listitem>
|
<listitem><para>Finally call <function>dc1394_release_camera</function> to release the camera</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
|
@ -1606,15 +1608,14 @@ be set accordingly.</emphasis></para>
|
||||||
failed</computeroutput> error message being displayed.</para>
|
failed</computeroutput> error message being displayed.</para>
|
||||||
</formalpara>
|
</formalpara>
|
||||||
<formalpara>
|
<formalpara>
|
||||||
<title>Solution: (contributed by Ian and Tim)</title><para><emphasis>There are various reasons for this error message. Type <command>dmesg</command> in the command prompt to gain a better understanding of the problem. Here is a list of problem we ran into
|
<title>Solution: (contributed by Ian and Tim)</title><para><emphasis>There are various reasons for this error message. Type <command>dmesg</command> in the command prompt to gain a better understanding of the problem. Here is a list of problem we ran into</emphasis>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>Channel 0 is not being used- This means you are listening on the iso channel and then calling a capture function again. Make sure not to call <function>dma_unlisten</function> until you are ready to stop iso transmission.
|
<listitem><para><emphasis>Channel 0 is not being used- This means you are listening on the iso channel and then calling a capture function again. Make sure not to call <function>dma_unlisten</function> until you are ready to stop iso transmission.</emphasis></para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>Channel 0 is already being used- This means you have set two camera nodes to the same Channel. Fix your <function>dma_setup_capture()</function>. This could also mean that you have tried to call the setup function more than once without releasing the camera between the calls. This error is more likely to occur when you are working with more than one camera.</listitem>
|
<listitem><para><emphasis>Channel 0 is already being used- This means you have set two camera nodes to the same Channel. Fix your <function>dma_setup_capture()</function>. This could also mean that you have tried to call the setup function more than once without releasing the camera between the calls. This error is more likely to occur when you are working with more than one camera.</emphasis></para></listitem>
|
||||||
<listitem>Buffer 0 is already being used- This means that you have not freed the DMA buffer before trying to write to it again. Make sure to alternate <function>dma_done_with_buffer calls with dma_capture_calls</function></listitem>
|
<listitem><para><emphasis>Buffer 0 is already being used- This means that you have not freed the DMA buffer before trying to write to it again. Make sure to alternate <function>dma_done_with_buffer calls with dma_capture_calls</function></emphasis></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
</emphasis></para>
|
|
||||||
</formalpara>
|
</formalpara>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|