summaryrefslogtreecommitdiffstats
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
parent90118343e46fecac78b6351ce25bb610b15fc077 (diff)
parent8df8a3d7a9d3356183df0a45c97f32dac878b65b (diff)
downloadbarebox-8b464dc6eec4d1fd58875451671456393181e980.tar.gz
barebox-8b464dc6eec4d1fd58875451671456393181e980.tar.xz
Merge branch 'for-next/doc'
Conflicts: Makefile
-rw-r--r--.gitignore1
-rw-r--r--Documentation/boards/davinci.rst51
-rw-r--r--Documentation/commands.rst86
-rwxr-xr-xDocumentation/gen_commands.py29
-rw-r--r--Makefile6
-rw-r--r--README2
-rw-r--r--commands/Kconfig4
-rw-r--r--commands/dfu.c15
-rw-r--r--commands/help.c2
-rw-r--r--commands/lspci.c2
10 files changed, 176 insertions, 22 deletions
diff --git a/.gitignore b/.gitignore
index c2e6e9a1c9..a74b6d5f4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -67,7 +67,6 @@ include/linux/compile.h
include/generated
# Generated files
-Doxyfile.version
Documentation/commands/*.rst
doctrees/
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)
diff --git a/Makefile b/Makefile
index b75e46b1ec..c60f83e765 100644
--- a/Makefile
+++ b/Makefile
@@ -774,10 +774,6 @@ include/config/kernel.release: include/config/auto.conf FORCE
$(Q)rm -f $@
$(Q)echo $(KERNELVERSION)$(localversion) > $@
-Doxyfile.version: include/config/auto.conf FORCE
- $(Q)rm -f $@
- $(Q)echo "PROJECT_NUMBER = $(KERNELRELEASE)" > $@
-
# Things we need to do before we recursively start building the kernel
# or the modules are listed in "prepare".
# A multi level approach is used. prepareN is processed before prepareN-1.
@@ -996,7 +992,7 @@ CLEAN_FILES += barebox System.map include/generated/barebox_default_env.h \
.tmp_version .tmp_barebox* barebox.bin barebox.map barebox.S \
.tmp_kallsyms* common/barebox_default_env* barebox.ldr \
scripts/bareboxenv-target barebox-flash-image \
- Doxyfile.version barebox.srec barebox.s5p barebox.ubl \
+ barebox.srec barebox.s5p barebox.ubl barebox.zynq \
barebox.uimage barebox.spi barebox.kwb barebox.kwbuart \
barebox.canon-a1100.bin
diff --git a/README b/README
index cec9ccbaf5..3862f6091e 100644
--- a/README
+++ b/README
@@ -179,7 +179,7 @@ net/ -> Networking stuff
scripts/ -> Kconfig system
-Documentation/ -> Doxygen generated documentation
+Documentation/ -> Sphinx generated documentation
Release Strategy
diff --git a/commands/Kconfig b/commands/Kconfig
index 61816f5115..b03f74a82b 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -1859,7 +1859,7 @@ endmenu
-menu "Miscelleanous"
+menu "Miscellaneous"
config CMD_2048
tristate
@@ -1976,7 +1976,7 @@ config CMD_TIME
Note: This command depends on COMMAND being interruptible,
otherwise the timer may overrun resulting in incorrect results
-# end Miscelleanous commands
+# end Miscellaneous commands
endmenu
diff --git a/commands/dfu.c b/commands/dfu.c
index 354625260d..7f78f3bbc2 100644
--- a/commands/dfu.c
+++ b/commands/dfu.c
@@ -172,12 +172,15 @@ out:
BAREBOX_CMD_HELP_START(dfu)
BAREBOX_CMD_HELP_TEXT("Turn's the USB host into DFU mode (Device Firmware Mode) and accepts")
-BAREBOX_CMD_HELP_TEXT("a new firmware. The destination is described by DESC in the this format:")
-BAREBOX_CMD_HELP_TEXT(" DEVICE(NAME)[src]...")
-BAREBOX_CMD_HELP_TEXT("Specify the '(') and ')' literal, the [] however denote this optional modes:")
-BAREBOX_CMD_HELP_TEXT("- 's' safe mode (download the complete image before flashing)")
-BAREBOX_CMD_HELP_TEXT("- 'r' readback of the firmware is allowed")
-BAREBOX_CMD_HELP_TEXT("- 'c' the file will be created (for use with regular files)")
+BAREBOX_CMD_HELP_TEXT("a new firmware. The destination is described by DESC in the format")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("\tDEVICE(NAME)[src]...")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Here '(' and ')' are literal characters. The '[' and ']' however denote")
+BAREBOX_CMD_HELP_TEXT("one of the following optional modes:")
+BAREBOX_CMD_HELP_TEXT("'s': safe mode (download the complete image before flashing); ")
+BAREBOX_CMD_HELP_TEXT("'r': readback of the firmware is allowed; ")
+BAREBOX_CMD_HELP_TEXT("'c': the file will be created (for use with regular files).")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT ("-m STR", "Manufacturer string (barebox)")
diff --git a/commands/help.c b/commands/help.c
index 9c33807fad..898533594f 100644
--- a/commands/help.c
+++ b/commands/help.c
@@ -128,7 +128,7 @@ static int do_help(int argc, char *argv[])
BAREBOX_CMD_HELP_START(help)
-BAREBOX_CMD_HELP_TEXT("Without arguments, lists all all commands. With an argument, print help")
+BAREBOX_CMD_HELP_TEXT("Without arguments, lists all commands. With an argument, print help")
BAREBOX_CMD_HELP_TEXT("about the specified command. If the argument is 'all', then output help")
BAREBOX_CMD_HELP_TEXT("for all commands.")
BAREBOX_CMD_HELP_TEXT("")
diff --git a/commands/lspci.c b/commands/lspci.c
index c00b57f894..fdf02691b5 100644
--- a/commands/lspci.c
+++ b/commands/lspci.c
@@ -46,7 +46,7 @@ static int do_lspci(int argc, char *argv[])
BAREBOX_CMD_START(lspci)
.cmd = do_lspci,
- BAREBOX_CMD_DESC("Show PCI info")
+ BAREBOX_CMD_DESC("show PCI info")
BAREBOX_CMD_GROUP(CMD_GRP_INFO)
BAREBOX_CMD_COMPLETE(empty_complete)
BAREBOX_CMD_END