Add a switch to get the devicetree processed by the registered fixups.
This is also whats the kernel gets.
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sometimes we need to have a defined devicenumber for the ubi partitions.
This patch adds the option to ubiattach.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
It's often useful to get some information about a barebox image
before starting or flashing it. This patch introduces barebox
Image MetaData (IMD). When enabled a barebox image will contain
a list of tags containing the desired information. We have tags
for:
- the barebox release (2014.07.0-00160-g035de50-dirty)
- the build timestamp (#741 Mon Jul 28 15:08:54 CEST 2014)
- the board model the image is intended for
- the device tree toplevel compatible property
Also there is an additional generic key-value store which stores
parameters for which no dedicated tag exists. In this patch it
is used for the memory size an image supports.
Since there is no fixed offset in a barebox image which can be
used for storing the information, the metadata is stored somewhere
in the image and found by iterating over the image. This works
for most image types, but obviously not for SoC images which are
encoded or encrypted in some way.
There is a 'imd' tool compiled from the same sources for barebox,
for the compile host and for the target, so the metadata information
is available whereever needed.
For device tree boards the model and of_compatible tags are automatically
generated.
Example output of the imd tool for a Phytec phyFLEX image:
build: #889 Wed Jul 30 16:08:54 CEST 2014
release: 2014.07.0-00167-g6b2070d-dirty
parameter: memsize=1024
of_compatible: phytec,imx6x-pbab01 phytec,imx6dl-pfla02 fsl,imx6dl
model: Phytec phyFLEX-i.MX6 Duallite Carrier-Board
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We have our file helper functions in several places. Move them
all to lib/libfile.c.
With this we no longer have file helpers in fs/fs.c which contains
the core fs functions and no functions in lib/libbb.c which are
not from busybox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
If an external environment storage should be used in very rare and special cases,
the intentional behaviour should be to ignore the external environment and always
fall back to the built-in environment. By storing an empty "to be ignored" environment
into the external environment a confusing error message about invalid CRC sums will go
away and still the built-in environment is used.
With this new option we can force the intentional behaviour.
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
In order to be able to mark an stored envfs image with special features
(intentional ignore for example), we now can feed forward these flags.
By forwarding a '0' for the flags nothing changes because the envfs superblock
was already allocated with xzalloc.
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Both parameters can be omitted and DIRECTORY can be omitted, but the
DIRECTORY parameter requires the ENVFS parameter as well.
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Similar to the Kernel multi function this gadget driver is used
for creating a USB device with multiple functions. This is
created and removed with the newly created 'usbgadget' command.
Based on the options it creates combinations of DFU, fastboot
and serial USB functions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
... so that it looks a bit nicer in the HTML generated docs.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Register DFU as usb_function_instance to make it work with composite
gadgets. Also use this internally for registering as DFU device (with
the 'dfu' command).
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The dfu command parses a string which contains a list of
devices and flags. This format is useful for other users
aswell, so add common helper functions to parse it and
let the dfu command use this format.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This introduces the device parameters:
usbgadget.product
usbgadget.vendor
usbgadget.manufacturer
usbgadget.productname
These variables are used to configure the USB vendor id, product id,
manufacturer name and product name.
Previously these were configured with arguments to the usbserial
and dfu command. The parameters are device static, so it's nice to
configure it somewhere in the environment instead of when calling
dfu/usbserial. Also when other gadget drivers are added we do not
have to duplicate the option parsing further.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
It took me a while to figure out syntax of tftp command, document that
server address is taken from environment.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We can now detect changes in the USB device hierarchy properly, so
the 'force' option to the usb command is no longer necessary. We just
scan the busses each time the usb command is called.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch adds U-Boot 'usb tree' command functionality to barebox.
Here is an example output:
1 ID 0000:0000
| u-boot EHCI Host Controller
|
+-2 ID 05e3:0606
| USB2.0 Hub
|
+-3 ID 10c4:ea60
| Silicon Labs CP2102 USB to UART Bridge Contr P-00-00669
|
+-4 ID 05e3:0606
| | USB2.0 Hub
| |
| +-5 ID 05e3:0608
| | | USB2.0 Hub
| | |
| | +-6 ID 0d8c:000c
| | C-Media USB Headphone Set
| |
| +-7 ID 0d8c:000c
| C-Media USB Headphone Set
|
+-8 ID 0846:1040
NETGEAR NETGEAR FA120 Adapter
The tree view is enabled with 'usb -t'
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This renames USB to USB_HOST since this is what the symbol really
means. Introduce a USB symbol which is selected by both USB_GADGET
and USB_HOST. This gives us a symbol to let common USB code depend
on.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This adds a driver which uses the EFI stdin/stdout interfaces to
implement a barebox console. Keyboard input should be fairly complete,
but not all vt100 needed by barebox work properly. The clear-to-eol
escape is missing causing garbled output in the editor.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This fixes a compile error introduced with:
| commit 37f47a2a8c
| Author: Robert P. J. Day <rpjday@crashcourse.ca>
| Date: Mon Jul 7 05:36:33 2014 -0400
|
| crc32: Proper name of command is "crc32".
|
| Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The help texts are parsed by sphinx which cannot handle macros, so
replace them with their values.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Correct options listings for a couple device tree-related commands.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fix option explanation, and a couple grammar fixes.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>