summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-08-07 06:14:27 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-08-07 06:14:27 +0200
commit8b464dc6eec4d1fd58875451671456393181e980 (patch)
treee97f998a24620c545711a3692be509768407b75d /Documentation
parent90118343e46fecac78b6351ce25bb610b15fc077 (diff)
parent8df8a3d7a9d3356183df0a45c97f32dac878b65b (diff)
downloadbarebox-8b464dc6eec4d1fd58875451671456393181e980.tar.gz
barebox-8b464dc6eec4d1fd58875451671456393181e980.tar.xz
Merge branch 'for-next/doc'
Conflicts: Makefile
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/boards/davinci.rst51
-rw-r--r--Documentation/commands.rst86
-rwxr-xr-xDocumentation/gen_commands.py29
3 files changed, 161 insertions, 5 deletions
diff --git a/Documentation/boards/davinci.rst b/Documentation/boards/davinci.rst
new file mode 100644
index 0000000000..a2ddc3c41f
--- /dev/null
+++ b/Documentation/boards/davinci.rst
@@ -0,0 +1,51 @@
+TI Davinci
+==========
+
+virt2real
+---------
+
+virt2real is a miniature board for creation of WiFi
+or Internet controllable smart devices.
+
+The board has
+
+ * TI DaVinchi DM365 running at 300 MHz;
+ * 128 MiB DDR2 SDRAM;
+ * 256 MiB NAND Flash Memory;
+ * 2 x UART serial interfaces;
+ * 1 x Ethernet interface (Micrel KS8851);
+ * 1 x USB interface;
+ * microSD card slot.
+
+The board uses U-Boot as bootloader.
+
+
+Running barebox
+^^^^^^^^^^^^^^^
+
+ 1. Connect to the boards's UART0 (115200 8N1);
+ Use J2.2 (GND), J2.4 (UART0_TXD), J2.6 (UART0_RXD) pins.
+
+ 2. Turn board's power on;
+
+ 3. Wait for ``Hit any key to stop autoboot`` prompt and press the space key.
+
+ 4. Upload ``barebox.bin`` via Ymodem
+
+.. code-block:: none
+ virt2real ># loady
+..
+
+ 5. Run barebox
+
+.. code-block:: none
+ virt2real ># go 0x82000000
+..
+
+
+Links
+^^^^^
+
+ * http://virt2real.com/
+ * http://wiki.virt2real.ru/
+ * https://github.com/virt2real
diff --git a/Documentation/commands.rst b/Documentation/commands.rst
index 55b04f6e56..261af2a078 100644
--- a/Documentation/commands.rst
+++ b/Documentation/commands.rst
@@ -1,9 +1,91 @@
Command reference
=================
+Information
+-----------
.. toctree::
+ :titlesonly:
:glob:
- :maxdepth: 1
- commands/*
+ commands/info/*
+
+Booting
+-------
+.. toctree::
+ :titlesonly:
+ :glob:
+
+ commands/boot/*
+
+Partitions and Filesystems
+--------------------------
+.. toctree::
+ :titlesonly:
+ :glob:
+
+ commands/part/*
+
+Environment
+-----------
+.. toctree::
+ :titlesonly:
+ :glob:
+
+ commands/env/*
+
+Files
+-----
+.. toctree::
+ :titlesonly:
+ :glob:
+
+ commands/file/*
+
+Shell Scripting
+---------------
+.. toctree::
+ :titlesonly:
+ :glob:
+
+ commands/script/*
+
+Console and Framebuffer
+-----------------------
+.. toctree::
+ :titlesonly:
+ :glob:
+
+ commands/console/*
+
+Memory
+------
+.. toctree::
+ :titlesonly:
+ :glob:
+
+ commands/mem/*
+
+Hardware Manipulation
+---------------------
+.. toctree::
+ :titlesonly:
+ :glob:
+
+ commands/hwmanip/*
+
+Miscellaneous
+-------------
+.. toctree::
+ :titlesonly:
+ :glob:
+
+ commands/misc/*
+
+Networking
+----------
+.. toctree::
+ :titlesonly:
+ :glob:
+
+ commands/net/*
diff --git a/Documentation/gen_commands.py b/Documentation/gen_commands.py
index 4e33ccaea6..b85e2e3eab 100755
--- a/Documentation/gen_commands.py
+++ b/Documentation/gen_commands.py
@@ -1,8 +1,10 @@
#!/usr/bin/python
+import errno
import os
import re
import sys
+import hashlib
from collections import defaultdict
from pprint import pprint
@@ -76,7 +78,7 @@ def parse_c(name):
x = CMD_GROUP.match(line)
if x:
last = cmd['c_group']
- last.append(x.group(1).decode("string_escape"))
+ last.append(x.group(1).split('_')[-1].lower())
continue
x = CONT.match(line)
if x:
@@ -101,7 +103,7 @@ def gen_rst(name, cmd):
out.append('.. _command_%s:' % name)
out.append('')
if 'c_desc' in cmd:
- out.append("%s (%s)" % (name, ''.join(cmd['c_desc']).strip()))
+ out.append("%s - %s" % (name, ''.join(cmd['c_desc']).strip()))
else:
out.append("%s" % (name,))
out.append('='*len(out[-1]))
@@ -159,6 +161,27 @@ for name in CMDS.keys():
for name, cmd in CMDS.items():
#pprint({name: cmd})
rst = gen_rst(name, cmd)
- target = os.path.join(sys.argv[2], name+'.rst')
+ subdir = os.path.join(sys.argv[2], cmd['c_group'][0])
+ try:
+ os.makedirs(subdir)
+ except OSError as e:
+ if e.errno == errno.EEXIST and os.path.isdir(subdir):
+ pass
+ else:
+ raise
+ target = os.path.join(subdir, name+'.rst')
+
+ # Only write the new rst if it differs from the old one. Wroto
+ hash_old = hashlib.sha1()
+ try:
+ f = open(target, 'rb')
+ hash_old.update(f.read())
+ except:
+ pass
+ hash_new = hashlib.sha1()
+ hash_new.update(rst)
+ if hash_old.hexdigest() == hash_new.hexdigest():
+ continue
+
file(target, 'w').write(rst)