summaryrefslogtreecommitdiffstats
path: root/Documentation/user
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-03-11 10:49:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-03-11 10:49:50 +0100
commit034d4ddcb6dfc7f72cb5076807e93a7bb7e4636b (patch)
treea8912608d1b8f1614e58c94f67e0b9f1801018e6 /Documentation/user
parent7991fe1b8eb057c6d7acc5c91f10108c1ee10a52 (diff)
parent092479d7da288479eb99362b4e852948b1de6de9 (diff)
downloadbarebox-034d4ddcb6dfc7f72cb5076807e93a7bb7e4636b.tar.gz
barebox-034d4ddcb6dfc7f72cb5076807e93a7bb7e4636b.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'Documentation/user')
-rw-r--r--Documentation/user/usb.rst53
1 files changed, 51 insertions, 2 deletions
diff --git a/Documentation/user/usb.rst b/Documentation/user/usb.rst
index 99158a2676..8602a8f7fe 100644
--- a/Documentation/user/usb.rst
+++ b/Documentation/user/usb.rst
@@ -110,8 +110,10 @@ The Fastboot gadget supports the following commands:
- fastboot boot
- fastboot reboot
-**NOTE** ``fastboot erase`` is not yet implemented. This means flashing MTD partitions
-does not yet work.
+``fastboot flash`` additionally supports image types UBI and Barebox. For UBI
+Images and a MTD device as target, ubiformat is called. For a Barebox image
+with an available barebox update handler for the fastboot exported device, the
+barebox_update is called.
The barebox Fastboot gadget supports the following non standard extensions:
@@ -126,6 +128,53 @@ The barebox Fastboot gadget supports the following non standard extensions:
command returns successfully when the barebox command was successful and it fails when
the barebox command fails.
+**Example booting kernel/devicetree/initrd with fastboot**
+
+In Barebox start the fastboot gadget:
+
+.. code-block:: sh
+
+ usbgadget -A /kernel(kernel)c,/initrd(initrd)c,/devicetree(devicetree)c
+
+On the host you can use this script to start a kernel with kernel, devicetree
+and initrd:
+
+.. code-block:: sh
+
+ #!/bin/bash
+
+ set -e
+ set -v
+
+ if [ "$#" -lt 3 ]
+ then
+ echo "USAGE: $0 <KERNEL> <DT> <INITRD> [<ARGS>]"
+ exit 0
+ fi
+
+ kernel=$1
+ dt=$2
+ initrd=$3
+
+ shift 3
+
+ fastboot -i 7531 flash kernel $kernel
+ fastboot -i 7531 flash devicetree $dt
+ fastboot -i 7531 flash initrd $initrd
+
+
+ fastboot -i 7531 oem exec 'global linux.bootargs.fa'$ct'=rdinit=/sbin/init'
+ if [ $# -gt 0 ]
+ then
+ ct=1
+ for i in $*
+ do
+ fastboot -i 7531 oem exec 'global linux.bootargs.fa'$ct'='"\"$i\""
+ ct=$(($ct + 1))
+ done
+ fi
+ timeout -k 5 3 fastboot -i 7531 oem exec -- bootm -o /devicetree -r /initrd /kernel
+
USB Composite Multifunction Gadget
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^