summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* image: factorise image printing contentsJean-Christophe PLAGNIOL-VILLARD2010-10-081-45/+1
| | | | | | Copied from U-Boot Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Replace direct header access with the API routinesJean-Christophe PLAGNIOL-VILLARD2010-10-081-37/+42
| | | | | | Copied from U-Boot Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* image: rename IH_CPU to IH_ARCH to be more concistantJean-Christophe PLAGNIOL-VILLARD2010-10-081-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* image: factorise string helperJean-Christophe PLAGNIOL-VILLARD2010-10-081-88/+5
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Revert "image: factorise string helper"Sascha Hauer2010-10-071-5/+88
| | | | This reverts commit 7bd7d59e60f3f23862ebc09c9f3527ee24b2960f.
* Revert "image: rename IH_CPU to IH_ARCH to be more concistant"Sascha Hauer2010-10-071-1/+1
| | | | | | | | | | This reverts commit aba80a2d2d0f1b25185246925577ce2108247dde. Conflicts: include/image.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "Replace direct header access with the API routines"Sascha Hauer2010-10-071-42/+37
| | | | | | | | | | This reverts commit 0ceafe14be072696eff3e549d8c7b7de8a3e416d. Conflicts: include/image.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "image: factorise image printing contents"Sascha Hauer2010-10-071-1/+45
| | | | This reverts commit d424ce77f5e9295584252452dbd78eea562c9af0.
* image: factorise image printing contentsJean-Christophe PLAGNIOL-VILLARD2010-09-241-45/+1
| | | | | | | before we duplicate it between command/bootm.c and scripts/mkimage.c Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Replace direct header access with the API routinesJean-Christophe PLAGNIOL-VILLARD2010-09-241-37/+42
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image: rename IH_CPU to IH_ARCH to be more concistantJean-Christophe PLAGNIOL-VILLARD2010-09-231-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image: factorise string helperJean-Christophe PLAGNIOL-VILLARD2010-09-231-88/+5
| | | | | | | before we duplicate it between common/bootm.c and scripts/mkimage.c Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* let linux16 command depend on X86Sascha Hauer2010-09-201-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Menu: add box style entryJean-Christophe PLAGNIOL-VILLARD2010-09-201-7/+23
| | | | | | | | | | | | | | | | | | | | | | | this will allow you to create a box style entry via C API by specifying the type as struct menu_entry me = { .display "test", .type = MENU_ENTRY_BOX, .box_state = 1, .action = action_to_run, } and via shell menu -e -a -m <menu> -c <command> [-R] [-b 0|1] -d <description> menu -e -a -m <menu> -u submenu -d [-b 0|1] <description> -b with 0 for not selected and 1 for selected and -c for the command to run when changing state Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* menu: add auto select supportJean-Christophe PLAGNIOL-VILLARD2010-09-201-3/+21
| | | | | | | | | | | this will allow to automaticaly run an entry if the user do no choice this is usefull for boot menu as example with menu -s -m boot -A 3 -d "Auto Boot in" Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* menu: shell fix do_menu_selectJean-Christophe PLAGNIOL-VILLARD2010-09-201-1/+1
| | | | | | | invert the error report Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: use id as -1 for auto assigned idJean-Christophe PLAGNIOL-VILLARD2010-09-201-0/+1
| | | | | | | | before if you specify id = 0 the next available id will be taken otherwise fail if already registered now as in linux we use -1 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: partition.c fix file mod bitsJean-Christophe PLAGNIOL-VILLARD2010-09-201-0/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* add login supportJean-Christophe PLAGNIOL-VILLARD2010-09-203-2/+71
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* add passwd commandJean-Christophe PLAGNIOL-VILLARD2010-09-203-0/+122
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'next'Sascha Hauer2010-08-305-2/+460
|\
| * menu: simplify usage for clientsSascha Hauer2010-08-301-41/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clients now only have to call menu_add_submenu or menu_add_command_entry instead of allocating many strings. This also fixes some problems in the menu code. The priv field in struct menu_entry was a pointer to struct menu or a pointer to an allocated string. It was never freed, only had to be freed when it was an allocated string. The reference to a submenu is now kept as a string and not to the menu itself. The code checked the existence of the submenu when creating it, but crashed when the submenu was removed and referenced afterwards. Now the code hapily allows references to nonexistant menus but complains during runtime when the menu is not there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * menu: do not go to free if there's nothing to freeSascha Hauer2010-08-301-2/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * menu: use an initialized struct list as menu listSascha Hauer2010-08-301-0/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * menu: use list_for_each_entry where appropriateSascha Hauer2010-08-301-7/+2
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * menu: remove superfluous struct menu_entry member from struct menuSascha Hauer2010-08-301-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * menu: Use strdup instead of malloc/strncpySascha Hauer2010-08-301-26/+5
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Menu/cmd: add sub menu entry command supportJean-Christophe PLAGNIOL-VILLARD2010-08-301-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this will simplify the creation of navigation link as this menu -a -m boot -d "Boot Menu" menu -a -m network -d "Network settings" menu -e -a -m network -u boot -d "Back" menu -e -a -m boot -u network -d "Network settings ->" menu -e -a -m boot -c reset -R -d "Reset" menu -e -a -m boot -c clear -d "Exit" menu -s -m boot in C struct menu m_boot = { .name = "boot", .display = "Boot Menu", }; struct menu m_network = { .name = "network", .display = "Network settings", }; struct menu_entry e_to_network = { .display = "Network settings ->", .action = menu_action_show, .priv = &m_network, }; struct menu_entry e_to_boot = { .display = "Back", .action = menu_action_show, .priv = &m_boot, }; struct menu_entry e_reset = { .display = "Reset", .action = menu_action_run, .priv = "reset", }; struct menu_entry e_exit = { .display = "Exit", .action = menu_action_run, .non_re_ent = 1, .priv = "clear", }; void menu_test(void) { menu_add(&m_boot); menu_add(&m_network); menu_add_entry(&m_boot, &e_to_network); menu_add_entry(&m_boot, &e_reset); menu_add_entry(&m_boot, &e_exit); menu_add_entry(&m_network, &e_to_boot); menu_show(&m_boot); } Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Add Menu FrameworkJean-Christophe PLAGNIOL-VILLARD2010-08-303-0/+492
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a menu framework that allow us to create list menu to simplify barebox and make it more user-frendly This kind of menu is very usefull when you do not have a keyboard or a serial console attached to your board to allow you to interract with barebox For the develloper part, The framework introduce two API 1) C that allow you to create menu, submenu, entry and complex menu action 2) Command that allow you as the C API to create menu, submenu, entry and complex menu action but this time the actions will be store in a function and then be evaluated and excecuted at runtime. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * loadb: get console baudrate from class_dev not devMichael Grzeschik2010-08-111-1/+1
| | | | | | | | | | | | | | | | | | With this fix its possible to run loadb -f /dev/ram0 again with the latest next patchstack. Without you will run into data_abort. Tested with omap3530 beagleboard. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mw: fix help textBaruch Siach2010-08-061-1/+3
| | | | | | | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | cp: fix help textBaruch Siach2010-08-111-2/+0
| | | | | | | | | | | | | | Copy to target directory is supported since commit b36fca0c, circa 2007. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | md: fix help textBaruch Siach2010-08-041-1/+0
|/ | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add UBI commands: ubiattach, ubidetach, ubimkvol, ubirmvolSascha Hauer2010-07-053-0/+136
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* trivial: fix typos concerning "instead"Uwe Kleine-König2010-07-051-1/+1
| | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge remote branch 'origin/assorted-pu' into nextSascha Hauer2010-06-281-11/+19
|\
| * memcpy cmd: Do not expect to read/write the whole chunk at onceSascha Hauer2010-06-241-11/+19
| | | | | | | | | | | | | | read() does not necessarily return the number of bytes we want to read, so deal with less bytes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fix command loadbEric Bénard2010-06-241-1/+1
|/ | | | | | | which was broken after commit c3789cd49b43ec1c414ba1b0e9f48e8ccc19f8e1 Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: remove old network stackSascha Hauer2010-06-171-42/+0
| | | | | | All network commands now use the new stack, so remove the old one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: remove need for eth_halt/eth_openSascha Hauer2010-06-171-8/+12
| | | | | | | | | | | We used to eth_open/eth_halt the network devices during NetLoopInit which is called whenever the user enters a network command. Change this behaviour so that the current network device gets opened when making it the current one. With this change it's always possible to send packages and we are able to implement a new network stack in the next step. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: add i2c commandsEric Bénard2010-05-263-0/+223
| | | | | | | | | theses commands allow low level access to i2c bus and can be useful to setup an i2c device without having to add code, compile and flash barebox. Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'next'Sascha Hauer2010-04-065-9/+113
|\
| * go command: shutdown barebox before calling an applicationSascha Hauer2010-03-301-7/+12
| | | | | | | | | | | | | | Also, do not allow to continue barebox after returning from the application since we don't know anything about the state we are in. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * echo: add -e option supportSascha Hauer2010-03-302-2/+23
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * add unlzo supportSascha Hauer2010-03-303-0/+78
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | trivial: fix command case for erase usage lineUwe Kleine-König2010-03-301-1/+1
|/ | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make some help comments less confusingJuergen Beisert2010-03-181-1/+1
| | | | | Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cfi_flash: move include/cfi_flash.c next to driverSascha Hauer2010-02-081-1/+0
| | | | | | | | This file has no useful things for others than the driver, so move it next to the driver and remove the corresponding include from other files. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu'Sascha Hauer2010-02-0146-215/+59
|\
| * remove typedef cmd_tbl_t and replace it with struct commandSascha Hauer2010-02-0146-59/+59
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>