From: John Schmoller <jschmoller@xes-inc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC 0/3] uboot-doc User's Manual Generation Tool
Date: Tue, 28 Jul 2009 11:34:00 -0500 [thread overview]
Message-ID: <cover.1248798202.git.jschmoller@xes-inc.com> (raw)
In-Reply-To: <yes>
Hello all,
I've been working on writing a User's Manual generation tool, and before
I get too far I'd like to see if this is something the U-Boot community
would be interested in.
The thought was that everyone needs to develop User's Manuals for their
customers, and there's no reason for us all to reinvent the wheel for
each product we create. I've written a Perl script, uboot-doc, which is
very loosely based on the kernel-doc documentation creator in Linux.
(Take it easy on my Perl, this is my first script.) The specific syntax
is described in uboot-doc, but the parser takes formatted comments with
@'s and converts the information into DocBook XML. The DocBook XML can be
used to generate HTML, XHTML, PDFs, and text, and can be extended to change
formatting and appearance. The static portions of the manual are taken
from .tmpl files in the doc/manual/ directory, which have basic
precompiler support (#ifdef, #else, #endif) and support for accessing
system environment variables (${TOPDIR}, for example) and any value
found in autoconf.mk, (@CONFIG_BAUDRATE, for example). All template
files in doc/manual/ can be over-ridden by a board specific file in
board/$BOARDDIR/manual. For example, doc/manual/manual.tmpl would be
over-ridden by board/$BOARDDIR/manual/manual.tmpl.
General Control Flow:
C pre-processor -> doc_stream.pl : pre-processed code gets everything but
comments with an @ stripped away
doc_stream.pl -> autoconf_doc.txt : "interesting" comments get sent to this
file
autoconf_doc.txt -> uboot-doc : file is parsed and comments are turned to XML
*.tmpl -> uboot-doc : template files are processed into XML
*.xml -> xsltproc : XML is converted into desired output format
*.fo -> fop : (PDFs only) fo files are translated to PDF
Steps to compile your very own manual (using Ubuntu package names):
1) Install xsltproc. I'm using version
1.1.24-2ubuntu2. If you've got no desire to make text, html, xhtml, or
pdf you don't need this tool.
2) Install docbook-xsl. I'm using version
1.73.2.dfsg.1-5. If you've got no desire to make text, html, xhtml, or
pdf you don't need this tool.
3) FOP needs to be installed with hyphenation support, which is not
available from Synaptic or apt-get. Use the instructions from
http://www.linuxfromscratch.org/blfs/view/svn/pst/fop.html to install
your version of FOP (yes, you do need OFFO and JAI). You will need to
install ant if you don't already have it (1.7.1-0ubuntu2).
If you've got no desire to make a PDF, you don't need this tool.
4) If you follow the steps above, the default values of DOCBOOK_XSL_DIR,
XSLT_PROCESSOR, and FO_PROCESSOR should be correct. If you decided to
try to go it your own, set them accordingly. DOCBOOK_XSL_DIR points to
your Docbook stylesheet directory, XSLT_PROCESSOR points to the default
program which compiles XML into it's various forms, and FO_PROCESSOR
points the the default program for turning FO images into PDFs.
5) Once you have the tools installed, you should be able to compile a
manual. This documentation feature was tested on the X-ES's XPedite5370.
make XPEDITE5370_config
make {xml/html/xhtml/pdf/text}
Note: text doesn't work yet as I believe there is an issue with the
docbook style sheets (or possibly how I'm using them). It's being looked
into. Something about varlistentries not belonging in varlists? I dunno.
The doc/manual directory also includes a PDF style sheet (uboot_manual.xsl).
By creating your own book_info.tmpl, you can add a company logo
and an address to the cover page. By default these two are left out. It is also
possible to create a completely new style sheet to customize your manual look.
Similarly, HTML output can be customized using CSS. The results of this output
as well as the HTML output can be found on the X-ES website:
www.xes-inc.com/sources/u-boot/index.html
www.xes-inc.com/sources/u-boot/xpedite5370.pdf
Note that I've defined a "mediaobject" and "address" in my custom
board/xes/xpedite5370/book_info.tmpl to place the address and company logo
on the cover page.
I see several advantages to adopting this scheme.
- Documentation should be easier to keep in sync with code
- DocBook XML output can be used to generate webpages, PDFs, text, etc,
which are all extensible
- People don't have to reinvent the wheel when writing documentation
- Source code ends up being thouroughly commented
These patches are just meant to be an example of how in-code documentation
could be used. You'll also notice there are many warnings regarding variables
the manual is referencing which aren't defined yet. I wanted to get some
feedback before diving in too far. What do others think? Is this worth
pursuing?
Thanks,
John
John Schmoller (3):
uboot-doc: Initial support of user documentation generator
uboot-doc: Add example support for uboot-doc
xpedite5370: Add uboot-doc support
Makefile | 2 +
board/xes/xpedite5370/manual/book_info.tmpl | 52 ++
board/xes/xpedite5370/manual/booting_linux.tmpl | 179 ++++
board/xes/xpedite5370/manual/booting_vxworks.tmpl | 166 ++++
board/xes/xpedite5370/manual/manual.tmpl | 30 +
board/xes/xpedite5370/manual/redundant_images.tmpl | 50 ++
board/xes/xpedite5370/manual/scripting.tmpl | 168 ++++
common/cmd_i2c.c | 71 ++-
common/cmd_mem.c | 45 +-
common/cmd_net.c | 30 +-
common/env_common.c | 35 +
config.mk | 1 +
doc/manual/85xx_program_flow.tmpl | 74 ++
doc/manual/book_info.tmpl | 35 +
doc/manual/booting_linux.tmpl | 249 ++++++
doc/manual/config.mk | 74 ++
doc/manual/doc-stream.pl | 34 +
doc/manual/introduction.tmpl | 136 +++
doc/manual/manual.tmpl | 26 +
doc/manual/scripting.tmpl | 154 ++++
doc/manual/setup.tmpl | 294 +++++++
doc/manual/uboot-doc | 866 ++++++++++++++++++++
doc/manual/uboot_manual.xsl | 286 +++++++
include/configs/XPEDITE5370.h | 47 ++
post/tests.c | 16 +
rules.mk | 7 +
26 files changed, 3122 insertions(+), 5 deletions(-)
create mode 100644 board/xes/xpedite5370/manual/book_info.tmpl
create mode 100644 board/xes/xpedite5370/manual/booting_linux.tmpl
create mode 100644 board/xes/xpedite5370/manual/booting_vxworks.tmpl
create mode 100644 board/xes/xpedite5370/manual/manual.tmpl
create mode 100644 board/xes/xpedite5370/manual/redundant_images.tmpl
create mode 100644 board/xes/xpedite5370/manual/scripting.tmpl
create mode 100644 doc/manual/85xx_program_flow.tmpl
create mode 100644 doc/manual/book_info.tmpl
create mode 100644 doc/manual/booting_linux.tmpl
create mode 100644 doc/manual/config.mk
create mode 100644 doc/manual/doc-stream.pl
create mode 100644 doc/manual/introduction.tmpl
create mode 100644 doc/manual/manual.tmpl
create mode 100644 doc/manual/scripting.tmpl
create mode 100644 doc/manual/setup.tmpl
create mode 100644 doc/manual/uboot-doc
create mode 100644 doc/manual/uboot_manual.xsl
next parent reply other threads:[~2009-07-28 16:34 UTC|newest]
Thread overview: 129+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <yes>
2009-07-28 16:34 ` John Schmoller [this message]
2009-07-28 17:49 ` [U-Boot] [RFC 0/3] uboot-doc User's Manual Generation Tool Wolfgang Denk
2009-07-28 20:40 ` jschmoller
2009-07-28 21:27 ` Wolfgang Denk
2009-07-28 22:16 ` Robin Getz
2009-07-30 9:59 ` Detlev Zundel
2009-07-30 18:45 ` Wolfgang Denk
2009-07-30 19:50 ` Robin Getz
2009-07-30 19:55 ` Wolfgang Denk
2009-07-31 1:49 ` Robin Getz
2009-08-13 7:32 ` Mike Frysinger
2009-07-29 14:48 ` jschmoller
2009-07-28 16:34 ` [U-Boot] [RFC 1/3] uboot-doc: Initial support of user documentation generator John Schmoller
2009-07-28 16:34 ` [U-Boot] [RFC 2/3] uboot-doc: Add example support for uboot-doc John Schmoller
2009-07-28 17:52 ` Wolfgang Denk
2009-07-28 20:42 ` jschmoller
2009-07-28 21:37 ` Wolfgang Denk
2009-07-28 16:34 ` [U-Boot] [RFC 3/3] xpedite5370: Add uboot-doc support John Schmoller
2011-05-02 21:01 ` [U-Boot] [PATCH v4 0/5] Add support for LaCie NAS Network Space v2 Simon Guinot
2011-05-02 21:29 ` Wolfgang Denk
2011-05-02 22:46 ` Simon Guinot
2011-05-02 21:01 ` [U-Boot] [PATCH v4 1/5] sf: disable write protection for Macronix flash Simon Guinot
2011-05-02 21:07 ` Mike Frysinger
2011-05-02 21:01 ` [U-Boot] [PATCH v4 2/5] Kirkwood: allow to override CONFIG_SYS_TCLK Simon Guinot
2011-05-02 21:01 ` [U-Boot] [PATCH v4 3/5] mv-common.h: fix DRAM banks configuration Simon Guinot
2011-05-02 21:01 ` [U-Boot] [PATCH v4 4/5] netconsole: remove `serverip' check Simon Guinot
2011-05-02 21:01 ` [U-Boot] [PATCH v4 5/5] Add support for Network Space v2 Simon Guinot
2011-05-02 22:42 ` [U-Boot] [PATCH v5 0/5] Add support for LaCie NAS " Simon Guinot
2011-05-03 9:59 ` Prafulla Wadaskar
2011-05-02 22:42 ` [U-Boot] [PATCH v5 1/5] sf: disable write protection for Macronix flash Simon Guinot
2011-07-08 20:32 ` [U-Boot] [PATCH v6] sf: macronix: disable write protection when initializing Mike Frysinger
2011-08-02 20:02 ` Wolfgang Denk
2011-05-02 22:42 ` [U-Boot] [PATCH v5 2/5] Kirkwood: allow to override CONFIG_SYS_TCLK Simon Guinot
2011-05-03 12:09 ` Prafulla Wadaskar
2011-05-02 22:42 ` [U-Boot] [PATCH v5 3/5] mv-common.h: fix DRAM banks configuration Simon Guinot
2011-05-03 12:09 ` Prafulla Wadaskar
2011-05-02 22:42 ` [U-Boot] [PATCH v5 4/5] netconsole: remove `serverip' check Simon Guinot
2011-05-02 22:42 ` [U-Boot] [PATCH v5 5/5] Add support for Network Space v2 Simon Guinot
2011-05-03 13:19 ` Simon Guinot
2011-05-12 17:24 ` Wolfgang Denk
2012-02-16 2:59 ` [U-Boot] [PATCH 0/5] Support for qualcomm msm7630 board mohamed.haneef at lntinfotech.com
2012-02-23 8:59 ` [U-Boot] reminder for " Mohamed Haneef
2012-10-26 21:15 ` [U-Boot] " Albert ARIBAUD
2012-02-16 2:59 ` [U-Boot] [PATCH 1/5] msm7x30: Add support for low speed uart on msm7x30 mohamed.haneef at lntinfotech.com
2012-02-28 23:44 ` Albert ARIBAUD
2012-03-05 14:34 ` [U-Boot] [PATCH v2 1/5] msm7x30: Add Support " Mohamed Haneef
2012-03-22 8:50 ` [U-Boot] reminder for [PATCH 0/5] Support for qualcomm msm7630 board mohamed.haneef at lntinfotech.com
2012-04-23 9:24 ` [U-Boot] (no subject) mohamed.haneef at lntinfotech.com
2012-04-23 9:31 ` [U-Boot] msm7630 mainline request mohamed.haneef at lntinfotech.com
2012-05-03 0:09 ` Marek Vasut
2012-02-16 2:59 ` [U-Boot] [PATCH 2/5] msm7x30: Add support for interprocessor communication mohamed.haneef at lntinfotech.com
2012-02-28 23:46 ` Albert ARIBAUD
2012-03-05 14:33 ` Mohamed Haneef
2012-02-16 2:59 ` [U-Boot] [PATCH 3/5] msm7x30: Add support for Qualcomm msm7630 soc mohamed.haneef at lntinfotech.com
2012-02-29 0:00 ` Albert ARIBAUD
2012-03-05 14:39 ` [U-Boot] [PATCH v2 3/5] msm7x30: Add support for msm7x30 SoC Mohamed Haneef
2012-02-16 2:59 ` [U-Boot] [PATCH 4/5] Add support for mmc read and writes mohamed.haneef at lntinfotech.com
2012-02-29 0:03 ` Albert ARIBAUD
2012-03-05 14:40 ` [U-Boot] [PATCH v2 4/5] Add Support for qc_mmc MMC Controller Mohamed Haneef
2012-05-03 22:05 ` Andy Fleming
2012-05-10 11:37 ` Mohamed Haneef
2012-02-16 2:59 ` [U-Boot] [PATCH 5/5] msm7x30: Add support for msm7630_surf board mohamed.haneef at lntinfotech.com
2012-10-03 8:19 ` Albert ARIBAUD
2014-02-07 23:23 ` [U-Boot] [U-Boot: RESEND][PATCH 0/7] Add support for Keystone2 SoC and K2HK EVM Murali Karicheri
2014-02-07 23:23 ` [U-Boot] [U-Boot:RESEND][[PATCH 1/7] fdt: call ft_board_setup_ex() at the end of image_setup_libfdt() Murali Karicheri
2014-02-10 21:25 ` Tom Rini
2014-02-11 1:05 ` Vitaly Andrianov
2014-02-07 23:23 ` [U-Boot] [U-Boot:RESEND][[PATCH 2/7] tools: sort the entries in Makefile Murali Karicheri
2014-02-07 23:23 ` [U-Boot] [U-Boot:RESEND][[PATCH 3/7 v1] tools: mkimage: add support for gpimage format Murali Karicheri
2014-02-07 23:23 ` [U-Boot] [U-Boot:RESEND][[PATCH 4/7 v1] arm: add support for arch timer Murali Karicheri
2014-02-07 23:23 ` [U-Boot] [U-Boot:RESEND][[PATCH 5/7 v1] NAND: DaVinci: allow forced disable of subpage writes Murali Karicheri
2014-02-07 23:23 ` [U-Boot] [U-Boot:RESEND][[PATCH 6/7] k2hk: add support for k2hk SOC and EVM Murali Karicheri
2014-02-10 21:25 ` Tom Rini
2014-02-11 1:44 ` Vitaly Andrianov
2014-02-12 12:53 ` Tom Rini
2014-02-17 21:19 ` Andrianov, Vitaly
2014-02-17 21:57 ` Tom Rini
2014-02-20 17:27 ` Andrianov, Vitaly
2014-02-10 8:32 ` [U-Boot] [U-Boot: RESEND][PATCH 0/7] Add support for Keystone2 SoC and K2HK EVM Albert ARIBAUD
2014-02-10 17:22 ` Murali Karicheri
2014-02-10 18:01 ` Albert ARIBAUD
2014-02-10 19:42 ` Murali Karicheri
2014-02-10 19:58 ` Albert ARIBAUD
2014-02-10 21:23 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 00/12] Add support for keystone2 " Murali Karicheri
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 01/12] fdt: call ft_board_setup_ex() at the end of image_setup_libfdt() Murali Karicheri
2014-02-25 22:10 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 02/12] tools: sort the entries in Makefile Murali Karicheri
2014-02-25 22:10 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 03/12] tools: mkimage: add support for gpimage format Murali Karicheri
2014-02-25 22:11 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 04/12] arm: add support for arch timer Murali Karicheri
2014-02-25 22:11 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 05/12] NAND: DaVinci: allow forced disable of subpage writes Murali Karicheri
2014-02-25 22:11 ` Tom Rini
2014-02-26 4:01 ` Scott Wood
2014-02-27 16:38 ` Murali Karicheri
[not found] ` <3E54258959B69E4282D79E01AB1F32B7046C27D5@DFLE11.ent.ti.com>
2014-02-27 19:21 ` Scott Wood
2014-02-27 21:20 ` Murali Karicheri
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 06/12] i2c, davinci: move i2c_defs.h to the drivers/i2c directory Murali Karicheri
2014-02-25 22:11 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 07/12] i2c, davinci: add support for multiple i2c buses Murali Karicheri
2014-02-25 22:11 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 08/12] k2hk: add support for k2hk SOC and EVM Murali Karicheri
2014-02-25 22:11 ` Tom Rini
2014-03-03 18:20 ` Murali Karicheri
2014-03-03 18:29 ` Tom Rini
2014-03-06 19:09 ` Andrianov, Vitaly
2014-03-06 19:29 ` Tom Rini
2014-03-07 16:41 ` Andrianov, Vitaly
2014-03-07 16:50 ` Tom Rini
2014-03-07 21:21 ` Murali Karicheri
2014-03-07 21:27 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 09/12] keystone2: add keystone multicore navigator driver Murali Karicheri
2014-02-25 22:12 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 10/12] keystone2: net: add keystone ethernet driver Murali Karicheri
2014-02-25 22:11 ` Tom Rini
2014-03-12 19:04 ` Murali Karicheri
2014-03-12 20:01 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 11/12] spi: davinci: add support for multiple bus and chip select Murali Karicheri
2014-02-25 22:12 ` Tom Rini
2014-02-20 17:55 ` [U-Boot] [U-Boot PATCH v2 12/12] k2hk-evm: add configuration for spi1 and spi2 support Murali Karicheri
2014-02-25 22:12 ` Tom Rini
2014-02-25 22:10 ` [U-Boot] [U-Boot PATCH v2 00/12] Add support for keystone2 SoC and K2HK EVM Tom Rini
2014-02-27 16:18 ` Karicheri, Muralidharan
2014-03-12 19:21 ` Murali Karicheri
2014-03-12 19:35 ` Tom Rini
2014-02-25 22:49 ` Karicheri, Muralidharan
2014-02-25 22:51 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1248798202.git.jschmoller@xes-inc.com \
--to=jschmoller@xes-inc.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox