summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* 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
|\
| * memtest: copyright to UPPER case and fix typoAlexander Aring2014-04-231-2/+2
| | | | | | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ioresource'Sascha Hauer2014-05-052-6/+25
|\ \
| * | common: Allow for I/O mapped I/OMichel Stam2014-04-082-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | Rework the current framework so that I/O mapped I/O resources are also possible. Signed-off-by: Michel Stam <michel@reverze.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/env'Sascha Hauer2014-05-051-49/+39
|\ \ \
| * | | env: erase/protect in envfs_saveSascha Hauer2014-04-281-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | So that the envfs_save is more useful outside of the saveenv command Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | environment: drop envfs_register_partitionSascha Hauer2014-04-281-47/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | The purpose of envfs_register_partition is to print an error message when the partition does not exist. Print an error message from generic code instead and drop this function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / | Fix bug in export 64 bit unsigned environment variable.Michael D. Burkey2014-04-301-1/+1
|/ / | | | | | | | | | | | | | | This patch corrects exporting unsigned 64-bit environment variables. I had left out a signed off line before. Signed-off-by: Michael Burkey <mdburkey at gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | don't cast negative error codes to unsigned size_tLucas Stach2014-04-231-3/+3
| | | | | | | | | | | | | | The cast prevents us from doing proper error checking. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | treewide: fix signedness mixups in printf format specifiersLucas Stach2014-04-231-1/+1
| | | | | | | | | | | | | | | | | | This most likely doesn't fix any real bugs, but it's the right thing to do and reduces the noise level with static checkers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | loadenv: detect truncated environment filesSascha Hauer2014-04-091-7/+24
| | | | | | | | | | | | | | | | Properly detect when an environment file is truncated. This can happen when a previous saveenv failed because the environment partition is too small. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | saveenv: Properly detect write errorsSascha Hauer2014-04-091-6/+14
|/ | | | | | | | | | | The return value check of the write call is completely bogus. We check if we have written at minimum sizeof(struct envfs_super) bytes instead of all bytes. Properly check for all bytes written instead and allow write to write less bytes than requested. Do not use write_full because this file is compiled for userspace aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ppc'Sascha Hauer2014-04-041-0/+24
|\
| * common: DDR3 SPD verification supportRenaud Barbier2014-03-181-0/+24
| | | | | | | | | | | | | | | | | | Add DDR3 SPD verification support for use by the PPC 8xxx DDR driver. This is based on the equivalent files from U-Boot version git-be937b5. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/menutree'Sascha Hauer2014-04-044-1/+219
|\ \
| * | defenv-2: replace menu with menutreeSascha Hauer2014-03-281-1/+1
| | | | | | | | | | | | | | | | | | This makes the menu easier to extend and to maintain. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | add menutree commandSascha Hauer2014-03-283-0/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating menus from the shell using the regular 'menu' command is rather complicated. This adds a 'menutree' command which creates a menu from a directory structure. In the directory structure each directory corresponds to a single menu entry. The directory contains the following files: title - A file containing the title of the entry as shown in the menu box - If present, the entry is a 'bool' entry. The file contains a variable name from which the current state of the bool is taken from and saved to. action - if present this file contains a shell script which is executed when when the entry is selected. If neither 'box' or 'action' are present this entry is considered a submenu containing more entries. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add shell_expand functionSascha Hauer2014-03-281-0/+33
| | | | | | | | | | | | | | | | | | shell_expand expands shell variables in a string. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/boot'Sascha Hauer2014-04-041-2/+79
|\ \ \
| * | | blspec: Check if an entry is compatible with the current machineSascha Hauer2014-03-241-2/+79
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | When a bootspec entry has the 'devicetree' property specified, check if the tree is compatible with the currently running machine, otherwise ignore the entry. This makes it possible to have entries for multiple machines on an SD card and pick a suitable one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | environment: Fix unitiliazed variableSascha Hauer2014-03-291-5/+5
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | envfs_load_data needs a pointer to the envfs_super, otherwise it works on an unitialized struct when detecting the envfs version. This is broken since: | commit 0a2a8f7059e6cb11e5d4eb882538b37f99d09ee3 | Author: Sascha Hauer <s.hauer@pengutronix.de> | Date: Thu Feb 20 08:16:01 2014 +0100 | | environment: Add function to load envfs from buffer | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Grmpf. Most compilers do not issue a warning, only the blackfin gcc 4.3.5 warns about this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | defaultenv-2: Fix menu files selectionSascha Hauer2014-03-281-1/+1
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/nfs'Sascha Hauer2014-03-076-13/+123
|\ | | | | | | | | Conflicts: defaultenv/defaultenv-2-base/bin/ifup
| * blspec: Add NFS supportSascha Hauer2014-03-071-2/+112
| | | | | | | | | | | | | | | | | | With this barebox can start root filesystems containing bootloader spec entries via NFS. It is used as: boot nfs://<ipaddr>[:<port]//path/to/nfsroot Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: Add ifup supportSascha Hauer2014-03-071-0/+1
| | | | | | | | | | | | | | | | The defaultenv-2 has ifup support as a shell script. This patch replaces it with a command which is more robust, can be called from C and now can also bring up all configured interfaces. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * run_command: remove unused flag parameterSascha Hauer2014-03-074-8/+7
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mount: support filesystem options passed via -oUwe Kleine-König2014-02-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | Similar to mount(8) the barebox command mount now supports passing a string to the file system driver via -o. This is used in the next commit to let the user specify port numbers for nfs mounts. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2014-03-072-5/+16
|\ \ | | | | | | | | | | | | Conflicts: common/environment.c