Description: Add man pages for cbootimage and dumpbct
 The man pages are generated from sgml files for now, which where generated
 out of the --help output of the commands.
Forwarded: no
Author: Marc Dietrich <marvin24@gmx.de>

Index: cbootimage-1.4/src/bct_dump.1.sgml
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ cbootimage-1.4/src/bct_dump.1.sgml	2014-08-25 14:11:12.739312961 +0200
@@ -0,0 +1,131 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+  <!ENTITY dhfirstname "<firstname>Marc</firstname>">
+  <!ENTITY dhsurname   "<surname>DIETRICH</surname>">
+  <!ENTITY dhdate      "<date>May 20, 2014</date>">
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "<email>marvin24@gmx.de</email>">
+  <!ENTITY dhusername  "Marc Dietrich">
+  <!ENTITY dhucpackage "<refentrytitle>BCT_DUMP</refentrytitle>">
+  <!ENTITY dhpackage   "bct_dump">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2014</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>tegra boot config table (bct) dumping utility</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+      <arg><option>bct filename to read and display</option></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> command.</para>
+
+    <para><command>&dhpackage;</command> is used to convert the contents
+       of a boot config table (BCT) used in NVIDIA Tegra devices, ready
+       to be further proceeded by <command>cbootimage</command> (1).
+       The BCT is usually placed in the first bytes of the storage device
+       and can be extracted using <command>tegrarcm</command>(1).</para>
+
+    <para>
+       The BCT is a data structure that provides basic initialization
+       parameters, and defines the bootloader to execute.</para>
+
+    <para>The BCT contains:    <itemizedlist>
+      <listitem><para>Header information, such as cryptographic validation
+             hashes and size information.</para></listitem>
+      <listitem><para>Boot memory configuration. This allows the boot memory controller
+           to be programmed optimally, in order to read the bootloader.</para></listitem>
+      <listitem><para>SDRAM controller configuration. This allows the SDRAM controller
+             to be programmed, and hence external SDRAM accessed.</para></listitem>
+      <listitem><para>A bad block table.</para></listitem>
+      <listitem><para>Information about the bootloader to execute.</para></listitem>
+      <listitem><para>A "customer data" area, which may be used to store arbitrary customer- or
+             device-software-specific data. This area includes the ODMDATA.</para></listitem>
+    </itemizedlist></para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <variablelist>
+      <varlistentry>
+        <term><filename>filename</filename></term>
+        <listitem>
+          <para>bcd filename to read and display.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <para><command>cbootimage</command>(1), <command>tegrarcm</command>(1).</para>
+    <para><ulink url="http://http.download.nvidia.com/tegra-public-appnotes/bct-overview.html">
+       Internet resource for NVIDIA Tegra public application notes
+    </ulink></para>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; (&dhemail;) for
+      the &debian; system (and may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any
+      later version published by the Free Software Foundation.
+    </para>
+    <para>
+      On Debian systems, the complete text of the GNU General Public
+      License can be found in /usr/share/common-licenses/GPL.
+    </para>
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
Index: cbootimage-1.4/src/cbootimage.1.sgml
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ cbootimage-1.4/src/cbootimage.1.sgml	2014-08-25 14:11:12.743312980 +0200
@@ -0,0 +1,188 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+  <!ENTITY dhfirstname "<firstname>Marc</firstname>">
+  <!ENTITY dhsurname   "<surname>DIETRICH</surname>">
+  <!ENTITY dhdate      "<date>May 20, 2014</date>">
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "<email>marvin24@gmx.de</email>">
+  <!ENTITY dhusername  "Marc Dietrich">
+  <!ENTITY dhucpackage "<refentrytitle>CBOOTIMAGE</refentrytitle>">
+  <!ENTITY dhpackage   "cbootimage">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2014</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>Tegra BCT and bootable flash image generator/compiler</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+      <arg><option>options</option></arg>
+      <arg choice='req'><replaceable>configfile</replaceable></arg>
+      <arg><option>inputimage</option></arg>
+      <arg choice='req'><replaceable>outputimage</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> command.</para>
+
+    <para><command>&dhpackage;</command> is used to generate flashable bootimages
+       for Tegra devices. It requires a config file and an output filename. The
+       config file contains information about the boot config table (BCT) and the
+       bootloader. The BCT can be created using <command>bct_dump (1)</command>.
+       The bootloader is typicly uboot. You can find examples of the config file
+       in the <xref linkend="seealso"> section.
+    </para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+    <variablelist>
+      <varlistentry>
+        <term><option>-h</option>, <option>--help</option>, <option>-?</option></term>
+        <listitem><para>Display help message.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-d</option>, <option>--debug</option></term>
+        <listitem>
+          <para>Output debugging information.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-gbct</option></term>
+        <listitem>
+           <para>Generate the new bct file.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-o</option><filename>&lt;ODM_DATA&gt;</filename></term>
+        <listitem>
+          <para>Specify the odm_data(in hex).</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-t</option>, <option>--tegra</option> <option>NN</option></term>
+        <listitem>
+          <para>Select target device. Must be one of:
+             20, 30, 114, 124.
+             Default: 20. This option is deprecated</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-s</option>, <option>--soc</option><option> NN</option></term>
+        <listitem>
+          <para>Select target device. Must be one of:
+             tegra20, tegra30, tegra114, tegra124.
+             Default: tegra20.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-u</option>, <option>--update</option></term>
+        <listitem>
+          <para>Copy input image data and update bct configs into new image file.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><filename>configfile</filename></term>
+        <listitem>
+          <para> File with configuration information.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><filename>inputimage</filename></term>
+        <listitem>
+          <para>Input image name. This is required
+             if -u|--update option is used.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><filename>outputimage</filename></term>
+        <listitem>
+          <para>Output image name.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1 id="seealso" xreflabel="seealso">
+    <title>SEE ALSO</title>
+
+    <para><command>bct_dump</command>(1), <command>tegrarcm</command>(1).</para>
+    <para><ulink url="http://http.download.nvidia.com/tegra-public-appnotes/flashing-tools.html">
+       Internet resource for NVIDIA Tegra public application notes
+    </ulink></para>
+    <para><ulink url="https://github.com/NVIDIA/cbootimage-configs">
+       Examples for config files
+    </ulink></para>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; (&dhemail;) for
+      the &debian; system (and may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any
+      later version published by the Free Software Foundation.
+    </para>
+    <para>
+      On Debian systems, the complete text of the GNU General Public
+      License can be found in /usr/share/common-licenses/GPL.
+    </para>
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
Index: cbootimage-1.4/src/Makefile.am
===================================================================
--- cbootimage-1.4.orig/src/Makefile.am	2014-07-16 06:45:18.000000000 +0200
+++ cbootimage-1.4/src/Makefile.am	2014-08-25 14:09:05.000000000 +0200
@@ -76,3 +76,14 @@
 	t124/nvboot_sdram_param_t124.h \
 	t132/nvboot_bct_t132.h \
 	t132/nvboot_sdram_param_t132.h
+
+man_MANS = cbootimage.1 bct_dump.1
+
+EXTRA_DIST = cbootimage.1.sgml bct_dump.1.sgml
+DISTCLEANFILES = cbootimage.1 bct_dump.1
+
+bct_dump.1: bct_dump.1.sgml
+	docbook-to-man $< >$@
+
+cbootimage.1: cbootimage.1.sgml
+	docbook-to-man $< >$@
