summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* loadenv: fix typo in help textWjatscheslaw Stoljarski2015-02-021-2/+2
| | | | | Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* memtest: fix 4GB overflow failDmitry Lavnikevich2015-01-271-1/+1
| | | | | | | | | | | Add condition for checking size_t overflow. This fixes memtest fail > Memtest failed. Error: -22 which appears when 4GB RAM is present. Was tested on phyFLEX-i.MX6 modules with 4GB and 1GB RAM. Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* memtest: Fix SDRAM size calculationsSascha Hauer2015-01-261-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calculating the size and end of the test region as end = PAGE_ALIGN_DOWN(bank->res->end) - 1; size = end - start + 1; is wrong. For an example resource of start = 0x80000000, end = 0x8fffffff end results in: end = PAGE_ALIGN_DOWN(0x8fffffff) - 1 = 0x8fffefff instead of 0x8fffffff. The size is then calculated to size = end - start + 1 = 0x8fffefff - 0x80000000 + 1 = 0x0ffff000 instead of 0x10000000 The correct way to do this is to calculate the real size and apply a PAGE_ALIGN_DOWN afterwards: size = PAGE_ALIGN_DOWN(bank->res->end - start + 1) = 0x10000000 Fix this in three different places. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: loady: fix bug with netconsoleRobert Jarzmik2015-01-051-3/+3
| | | | | | | | | | | | | Netconsole doesn't have a baudrate. Loady supposes a console has one, and tries to compute the console's baudrate variable value, regardless of its existence. This triggers a NULL pointer dereference on netconsole. If attempting loady on a netconsole is a bit useless, barebox should not panic. Fix this by checking the variable exists before reading its value. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/randconfig'Sascha Hauer2014-12-081-3/+3
|\
| * command: load[sbxy]: Depend on CONSOLE_FULLSascha Hauer2014-11-271-3/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/persistent-vars'Sascha Hauer2014-12-088-29/+336
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/config
| * | globalvar: Add support for printing all global variablesSascha Hauer2014-11-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This could previously only be done with 'devinfo global'. While this is still possible this adds a more direct access via the globalvar command. This variant also adds a '*' in front of the variable if the corresponding non volatile variable exists. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add defaultenv commandSascha Hauer2014-11-063-0/+103
| | | | | | | | | | | | | | | | | | | | | This adds a command to explicitly restore the environment (or parts thereof) from the default environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | cp: Add recursive copySascha Hauer2014-11-061-13/+23
| | | | | | | | | | | | | | | | | | This adds the -r option to the cp command. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add support for non volatile variablesSascha Hauer2014-11-064-3/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds (back) support for non volatile variables. Non volatile variables are variables which are stored in the environment over reboot. They are used in the same way as the global variables, but with a 'nv' command and device. The variables are stored under /env/nv/, one variable per file. Adding a nv variable automatically adds a global variable with the same name. Changing a nv variable also changes the same global variable, but not the other way round. This allows for example to configure the username as: nv user=sha; saveenv Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | magicvar: Add support for dynamically added magicvarsSascha Hauer2014-11-061-13/+98
| | | | | | | | | | | | | | | | | | | | | | | | Add support to add a new magicvar using the magicvar command. This is useful for magicvars assigned and used only in the environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2014-12-081-1/+3
|\ \ \ | |_|/ |/| |
| * | command: dmesg: depend on !CONSOLE_NONESascha Hauer2014-11-271-0/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | command: passwd: depend on CMD_LOGIN rather than selecting itSascha Hauer2014-11-271-1/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | command: login: depend on !CONSOLE_NONESascha Hauer2014-11-271-0/+1
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | xymodem: select CRC16 from libJan Weitzel2014-11-121-1/+0
| | | | | | | | | | Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | command: memset: Fix argument order in help textSascha Hauer2014-11-101-1/+1
|/ | | | | | | memset takes ADDR DATA COUNT just like the C function, not ADDR COUNT DATA. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2014-11-051-9/+16
|\
| * commands: lspci: go down into subordinate bussesLucas Stach2014-10-081-9/+16
| | | | | | | | | | | | | | | | This way we also list devices that are behind bridges. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/fs'Sascha Hauer2014-11-053-0/+53
|\ \
| * | commands: implement 'cmp' commandSascha Hauer2014-11-043-0/+53
| |/ | | | | | | | | | | | | | | This command compares two files. It does not show the differences, it only returns successfully if both files are identical and with an error if they differ. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | saveenv: Fix saving to specified fileSascha Hauer2014-10-231-6/+6
| | | | | | | | | | | | | | | | Since e805b7d saveenv: provide a zeroed/empty/ignore environment barebox no longer honors the file argument when the directory argument is also givin. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: firmwareload: add CMD_GROUPSteffen Trumtrar2014-10-101-0/+1
|/ | | | | | | | To be able to build the documentation the CMD_GROUP macro needs to be defined. Without this the firmwareload command breaks "make docs". Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: select FILE_LIST for usbgadgetRobert Schwebel2014-10-061-0/+1
| | | | | | | | | | Otherwhise we get this error message: commands/built-in.o: In function `do_usbgadget': barebox-2014.10.0/commands/usbgadget.c:77: undefined reference to `file_list_parse' Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/of'Sascha Hauer2014-10-023-0/+180
|\
| * commands: add of_display_timingsTeresa Gámez2014-10-013-0/+180
| | | | | | | | | | | | | | | | | | A lot of boards use display-timings nodes to define the timings of one or more displays. This command makes it possible to list and select displays which are defined in a device tree. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/firmware'Sascha Hauer2014-10-023-0/+76
|\ \
| * | Add a Firmware programming frameworkJuergen Beisert2014-09-093-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This framework handles a list of registered Firmware programming handlers to unify a firmware programming interface by hiding the details how to program a specific Firmware in its handler. This is created with FPGAs in mind but should be usable for other devices aswell. A user has two possibilities to load a firmware. A device file is create under /dev/ which can be used to copy a firmware to. Additionally a firmwareload command is introduced which can list the registered firmware handlers and also to upload a firmware. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/dmesg'Sascha Hauer2014-10-023-0/+108
|\ \ \ | |_|/ |/| |
| * | Introduce message logging supportSascha Hauer2014-09-303-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a buffer for log messages and a 'dmesg' command to print the messages. The log buffer is implemented as log objects rather than a string buffer. This makes it easy to implement limiting the messages, cleaning the buffer and timestamping the messages. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | commands: usb: drop help for force rescan optionWjatscheslaw Stoljarski2014-09-301-2/+1
|/ / | | | | | | | | Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / commands: of_dump: Fix return valueTeresa Gámez2014-09-121-2/+2
|/ | | | | | | | In an error case the return value is set nicely but 0 is always beeing returned. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: of_dump switch to get fixed devictreeJan Weitzel2014-09-011-2/+29
| | | | | | | | 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>
* ubi: add setting devnum to ubiattachMichael Grzeschik2014-09-011-3/+8
| | | | | | | | 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>
* Merge branch 'for-next/usb-host'Sascha Hauer2014-08-071-6/+102
|\ | | | | | | | | Conflicts: drivers/usb/core/Makefile
| * USB: host: drop force rescanSascha Hauer2014-07-181-6/+3
| | | | | | | | | | | | | | | | 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>
| * commands: usb: add tree view capabilityAntony Pavlov2014-07-181-3/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/usb-gadget'Sascha Hauer2014-08-075-167/+130
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: commands/Makefile common/Kconfig common/Makefile drivers/usb/gadget/dfu.c
| * | USB: gadget: Add a multi function gadgetSascha Hauer2014-07-243-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | USB: gadget: DFU: register as USB functionSascha Hauer2014-07-221-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Add function to parse a string in dfu formatSascha Hauer2014-07-221-83/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | USB: gadget: specify vendor/product id with device parametersSascha Hauer2014-07-222-67/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | USB: gadget: Update to 3.15Sascha Hauer2014-07-221-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the USB Gadget stack to Linux-3.15. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Conflicts: drivers/usb/core/Makefile
| * | Merge branch 'for-next/usb' into for-next/usb-gadgetSascha Hauer2014-07-221-1/+1
| |\|
* | | Merge branch 'for-next/usb'Sascha Hauer2014-08-071-1/+1
|\ \ \ | | |/ | |/|
| * | USB: Kconfig: introduce USB_HOST symbolSascha Hauer2014-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'for-next/rtc'Sascha Hauer2014-08-073-0/+170
|\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: arch/mips/dts/jz4755.dtsi commands/Makefile
| * | | commands: add hwclockAntony Pavlov2014-08-023-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hwclock command allows to query or set the hardware clock (RTC). Barebox' 'hwclock' command uses busybox' 'date' compatible time format ccyymmddHHMM[.SS]: # /bin/busybox date -s 201407292005.41 ; /bin/date Tue Jul 29 20:05:41 MSK 2014 Tue Jul 29 20:05:41 MSK 2014 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Merge branch 'for-next/i2c' into HEADSascha Hauer2014-08-021-7/+11
| |\ \ \ | | |_|/ | |/| |