summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/usb-gadget'Sascha Hauer2014-08-074-0/+121
|\ | | | | | | | | | | | | | | Conflicts: commands/Makefile common/Kconfig common/Makefile drivers/usb/gadget/dfu.c
| * Add release stringSascha Hauer2014-07-221-0/+4
| | | | | | | | | | | | | | | | | | Currently we only have version_string which contains information about the date the binary was compiled and by whom it has been compiled. This adds a release_string which only contains the plain release version. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Add function to parse a string in dfu formatSascha Hauer2014-07-223-0/+117
| | | | | | | | | | | | | | | | | | 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>
| * Merge branch 'for-next/console' into for-next/usb-gadgetSascha Hauer2014-07-221-2/+8
| |\
| * \ Merge branch 'for-next/misc' into for-next/usb-gadgetSascha Hauer2014-07-223-170/+3
| |\ \
* | \ \ Merge branch 'for-next/misc'Sascha Hauer2014-08-074-171/+21
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: lib/Makefile
| * | | | Revert "common: resource: print conflicts as warning"Sascha Hauer2014-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On several i.MX boards we register SDRAM with the values from the SDRAM controller and also with values from the device tree. This now issues a warning each time the board is started. Revert the commit for now. A better solution might be to check if the same SDRAM region already exists before trying to register it again. This reverts commit c9e2e08edcdce4205821226817686e62dc349eab. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | sandbox: allow "make ARCH=sandbox allyesconfig"Holger Schurig2014-07-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling the tree with allyesconfig is helpful because different compilers (gcc, clang) or static checkers (e.g. clang's scan-build) can then process and check more code. This patch introduces two new configuration symbols that Kconfig files can depend on. That way, code that is only working where a cache or DMA implementation exists can be opted out. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | sandbox: disable bareboxcrc32 in sandbox modeHolger Schurig2014-07-221-0/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | It won't compile currently anyway. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | introduce verbose debugSascha Hauer2014-07-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During debugging it sometimes helps to me even more verbose. This adds an additional debug level for this. Also we remove an already existing pr_vdebug definition in the USB gadget u_serial driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | dlmalloc: remove unused functionsSascha Hauer2014-07-091-169/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove unused function declarations and definitions: - vallocc is #if 0 in source code - pvalloc is defined but not used - cfree is defined but not used - malloc_usable_size is unused - mallopt is not defined - mallinfo is not defined Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | hush: Fix error code returned valueHerve Codina2014-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just returns error code instead of 0 or 1. With this fix, $? is set to child exit code in all cases. Without this fix, /child $PATH;echo $? displays 1 even if child script calls exit with a specific non zero error code. Signed-off-by: Herve Codina <Herve.CODINA@celad.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/metadata'Sascha Hauer2014-08-079-0/+361
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/dts/Makefile common/Makefile lib/Makefile
| * | | | Add support for metadata in barebox imagesSascha Hauer2014-08-074-1/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | move file helper functions to separate fileSascha Hauer2014-08-075-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge branch 'for-next/env'Sascha Hauer2014-08-071-8/+25
|\ \ \ \ \
| * | | | | envfs: change API to be able to forward special flags into the envfs superblockJuergen Borleis2014-08-011-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | envfs: provide an intentional way to ignore an existing external environmentJuergen Borleis2014-08-011-0/+9
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple flag to envfs to be able to mark an external environment as "not to be used". This change should not affect existing systems, because the current envfs implementation ensures the 'flags' member in the envfs master block is always zeroed. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/efi'Sascha Hauer2014-08-0710-4/+1504
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore Makefile drivers/serial/Makefile
| * | | | | EFI: introduce efi_strguid to convert GUID to human readable namesJean-Christophe PLAGNIOL-VILLARD2014-07-161-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use in devinfo Protocols Tested today on qemu with all the GUID translated Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | Add initial EFI architecture supportSascha Hauer2014-07-166-3/+1394
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for running barebox in an EFI environment on X86 PC hardware. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | filetype: Add DOS EXE file detection supportSascha Hauer2014-07-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | Move efi.h to include/Sascha Hauer2014-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With upcoming EFI payload support the efi.h file will diverge from the kernel, so move it from include/linux/ to include/ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | block: Add flush callbackSascha Hauer2014-07-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some block devices need an explicit callback for flushing written blocks. Add this callback. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | console: Add puts callback to console devicesSascha Hauer2014-07-111-0/+29
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices may have a much more efficient way to output strings rather than single characters. Let console devices implement a callback for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/console'Sascha Hauer2014-08-071-2/+8
|\ \ \ \ \ | |_|/ / / |/| | | / | | |_|/ | |/| |
| * | | console: Allow persistent device namesSascha Hauer2014-07-111-2/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | Add a devname field to struct console_device so that the device name can be set by the driver. This makes it possible to have persistent device names. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / barebox: common: Add missing filetype descriptionWadim Egorov2014-07-241-0/+1
|/ / | | | | | | | | | | | | Added missing filetype description for UBIFS. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / barebox: common: added new filetypesWadim Egorov2014-07-091-0/+12
|/ | | | | | | | | - Added omap CH image header recognition * filetype_ch_image * filetype_ch_image_be Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-07-041-1/+1
|\ | | | | | | | | | | | | | | Conflicts: arch/arm/boards/chumby_falconwing/falconwing.c arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c arch/x86/mach-x86.dox scripts/setupmbr/setupmbr.c
| * common: resource: print conflicts as warningAlexander Aring2014-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Crazy things happen if there are resource conflicts and a device probe runs dev_request_mem_region. The dev_request_mem_region returns a start pointer which is zero. The probe function doesn't check on this and probing the device on zero base address. To debug this in debug log level there are many other outputs. This patch replace the debug print to a warning printout. A conflict should normally never happen. If there is a conflict it's much easier to see it with this patch. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/doc'Sascha Hauer2014-07-041-4/+0
|\ \
| * | Documentation: remove doxygen documentationSascha Hauer2014-06-261-4/+0
| |/ | | | | | | | | | | | | The doxygen documentation is long outdated. Remove it. It will be replaced with sphinx based documentation later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / menutree: let it select GLOB and GLOB_SORTHolger Schurig2014-07-021-2/+6
|/ | | | | | | | | | | | | | The menutree doesn't select CONFIG_GLOB, but it depends on it. Without it will just hang. So let it select it automatically. Also remove the dependency of CONFIG_GLOB on CONFIG_HUSH, because glob() will run with the simple shell as well. Also let CONFIG_MENUTREE select on CONFIG_GLOB_SORT. While is not strictly needed, many people use menu/00-foo menu/10-bar menu/20-barf to sort their menu entries. So select it out of convenience. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: remove address of the Free Software FoundationAntony Pavlov2014-06-111-4/+0
| | | | | | | | | | | | | | | | | | The FSF address has changed; The FSF site says that address is Free Software Foundation 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA (see http://www.fsf.org/about/contact/) Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix format specifiersSascha Hauer2014-06-052-3/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-06-041-5/+7
|\ | | | | | | | | Conflicts: commands/devinfo.c
| * hush: setting variables may failSascha Hauer2014-05-161-5/+7
| | | | | | | | | | | | | | | | In case of device parameters setting variables may fail. return the result of set_local_var so that the user has a chance to detect the failure with $?. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootm: beautify outputHolger Schurig2014-06-021-2/+2
| | | | | | | | | | | | | | | | | | * fix indentation of options in 'help bootm' * add missing help for -m * put some output into debug/verbose mode Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | misc: upper-case some abbreviationsHolger Schurig2014-06-022-12/+12
| | | | | | | | | | Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | meminfo: purely cosmetical changesHolger Schurig2014-06-022-5/+5
| | | | | | | | | | Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of: Drop devicetree merge supportSascha Hauer2014-05-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | I assume I am the only person knowing that barebox is able to merge devicetrees. This feature seems broken for a while now since trying to merge devicetress results in: unflatten: too many end nodes Remove this feature to save the complexity. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | complete: Add devicetree completionSascha Hauer2014-05-191-0/+71
| | | | | | | | | | | | | | | | The of_* commands take devicetree nodes as parameters. Add a devicetree completion function to ease passing nodes to these commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | complete: Fix completion after optionsSascha Hauer2014-05-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | the command specific complete callbacks only work when no option is typed already. For example "devinfo <tab><tab>" correctly completes the devices, but "devinfo -x <tab><tab>" does nothing. That is because the options are passed to the input string of the completion handlers. Skip the option string by finding the last space in the input string. This is not perfect since "devinfo -f<tab><tab>" still does not work, but it's better than what we have now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: move CONFIG_LONGHELP to commands/KconfigHolger Schurig2014-05-141-5/+0
| | | | | | | | | | Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: HUSH_GETOPT -> CMD_GETOPTHolger Schurig2014-05-142-13/+6
| | | | | | | | | | | | | | | | | | | | | | * this compile option actually turns on a command, so name it accordingly * also move the Kconfig definition into commands/Kconfig, thus placing getopt into the "Shell scripting commands" section * while at it, improve Kconfig documention Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: CMD_MEMORY -> COMPILE_MEMORYHolger Schurig2014-05-141-3/+0
| | | | | | | | | | | | | | | | | | * CMD_MEMORY was defined both in common/Kconfig and commands/Kconfig * that symbol turned not a command on, but just the compilation of commands/mem.c, so rename it accordingly Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: harmonize in-barebox documentationHolger Schurig2014-05-142-53/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does probably too much, but it's hard (and very cumbersome/time consuming) to break it out. What is does is this: * each command has one short description, e.g. "list MUX configuration" * made sure the short descriptions start lowercase * each command has one usage. That string contains just the options, e.g. "[-npn]". It's not part of the long help text. * that is, it doesn't say "[OPTIONS]" anymore, every usable option is listed by character in this (short) option string (the long description is in the long help text, as before) * help texts have been reworked, to make them - sometimes smaller - sometimes describe the options better - more often present themselves in a nicer format * all long help texts are now created with BUSYBOX_CMD_HELP_ macros, no more 'static const __maybe_unused char cmd_foobar_help[]' * made sure the long help texts starts uppercase * because cmdtp->name and cmdtp->opts together provide the new usage, all "Usage: foobar" texts have been removed from the long help texts * BUSYBOX_CMD_HELP_TEXT() provides the trailing newline by itself, this is nicer in the source code * BUSYBOX_CMD_HELP_OPT() provides the trailing newline by itself * made sure no line gets longer than 77 characters * delibertely renamed cmdtp->usage, so that we can get compile-time errors (e.g. in out-of-tree modules that use register_command() * the 'help' command can now always emit the usage, even without compiled long help texts * 'help -v' gives a list of commands with their short description, this is similar like the old "help" command before my patchset * 'help -a' gives out help of all commands Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: group 'help' outputHolger Schurig2014-05-141-0/+4
|/ | | | | | | | | | | | | | | | | | | The old output of "help" was just producing a long list, that usually scrolled of the screen (even on a X11 terminal). This list is more compact, and also sorted by groups. The old output format (plus grouping) is now available with 'help -v'. Example: Information commands: ?, devinfo, help, iomem, meminfo, version Boot commands: boot, bootm, go, loadb, loads, loadx, loady, saves, uimage ... Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/memtest'Sascha Hauer2014-05-051-2/+2
|\