9
0
Fork 0
Commit Graph

114 Commits

Author SHA1 Message Date
Sascha Hauer 6eb741a2e1 hush: allow fancy prompts
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:15:03 +02:00
Sascha Hauer 66e4e9242b hush: only remove backslashes introduced from glob
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:15:03 +02:00
Sascha Hauer 2477fb12e9 hush: Fix return code when calling 'exit' inside loops
v2: Do not exit from all scripts but only the current one

This fixes the case:

barebox:/ cat /test
if [ 0 = 0 ]; then
	exit 1
fi
barebox:/ /test
barebox:/ echo $?
0
barebox:/

Also, remove code to not allow exit from main shell. The for(;;) loop
in common/startup.c will bring us back anyway.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 12:51:44 +02:00
Sascha Hauer 922bb41a47 remove typedef cmd_tbl_t and replace it with struct command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Sascha Hauer a3ffa97f40 rename U-Boot-v2 project to barebox
This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Sascha Hauer 14eb082606 hush: remove include/hush.h
Everything in include/hush.h is only used in hush.c, so remove
the header file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-22 11:17:25 +02:00
Sascha Hauer 420a3173f0 commands: remove maxargs
No need to check for maximum argument counts. The commands are
safe to be called with more arguments, so lets safe some bytes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-19 16:18:33 +02:00
Sascha Hauer 87e01f28cc commands: return COMMAND_ERROR_USAGE
instead of calling u_boot_cmd_usage in each command to safe
space.

Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:52 +02:00
Sascha Hauer ef7ff70ca4 consolidate command calling in execute_command
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer d81251712c hush: pass return code from exit command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 13:34:27 +02:00
Sascha Hauer 4596d2b6f9 hush: Only run list if it's not empty
Running empty lists lead to the wrong return status

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 13:34:22 +02:00
Sascha Hauer 8d36379153 hush: Fix quoting
This patch removes adding of an additional \ when doing

echo "\""

which gives \" instead of just "

I checked in latest busybox hush and this code is still present there,
but it behaves correctly in busybox due to some other code pathes I
didn't investigate.
If this change has any unwanted side effects feel free to flame on me

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-11-10 17:54:15 +01:00
Sascha Hauer 2b729e45b4 hush: fix compiler warning
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-26 11:40:51 +02:00
Sascha Hauer 50cc8c5412 Subject: [PATCH] [general] Fixed constant strings in data section issue
For practical reasons I changed all string literals assumed to be constant
to reside in .rodata subsection at end of .text section.

Signed-off-by: Carsten Schlote <schlote@vahanus.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-04-04 14:45:04 +02:00
Sascha Hauer f0aa2fcd09 replace debug_printf with debug in hush.c 2008-03-09 23:06:20 +01:00
Sascha Hauer 187847b2b4 add globbing support 2008-03-09 22:35:38 +01:00
Juergen Beisert 8fe25ecf12 adding various doku 2007-11-08 12:01:52 +01:00
Juergen Beisert 30e09b83d5 shell info added 2007-10-19 21:35:46 +02:00
Juergen Beisert 44630acd4a hush doc added 2007-10-19 21:07:43 +02:00
Sascha Hauer 400b0abab2 hush.c: split high-density "if(x) something"; into two lines 2007-10-01 23:35:33 +02:00
Sascha Hauer ee5847aac7 hush.c: get_local_var() is used only once, put it into the function
where it is called
2007-10-01 23:28:00 +02:00
Sascha Hauer c1ab45e56d fix indention in hush.c 2007-10-01 23:19:18 +02:00
Sascha Hauer a14c000d59 remove comment about glob in hush.c. We do not use glob 2007-10-01 23:17:27 +02:00
Sascha Hauer 53d327d834 fix indention in hush.c 2007-10-01 23:15:52 +02:00
Sascha Hauer f4f3479f13 fix indention in hush.c 2007-10-01 23:13:21 +02:00
Sascha Hauer 67c7e6eb6f fix indention in hush.c 2007-10-01 23:12:34 +02:00
Sascha Hauer 27bf8f1dea set last_return_code to rcode and not 1 or 0 2007-09-27 17:10:14 +02:00
Sascha Hauer 79ed00ba92 pass file size from read_file 2007-09-27 16:33:35 +02:00
Sascha Hauer 5efc6836b7 hush.c: use xrealloc instead of realloc to save some bytes 2007-09-26 13:57:18 +02:00
Sascha Hauer fb441a11a0 hush.c: use xzalloc instead of xmalloc to save some bytes 2007-09-26 13:55:01 +02:00
Sascha Hauer 00c65e44ca hush.c: Remove wrong free() of ctx->pipe->progs. After breaking out
of the while loop ctx->pipe is invalid, so we cannot dereference
	ctx->pipe->progs.
2007-09-26 13:53:17 +02:00
Sascha Hauer 8f1559034a remove extern declaration of console_buffer 2007-09-26 13:50:55 +02:00
Sascha Hauer 97cf2a9805 fix indention 2007-09-25 13:47:47 +02:00
Sascha Hauer 21281ac59a remove hack from hush which did the wrong thing 2007-09-25 13:47:15 +02:00
Sascha Hauer 603ccc2378 add $# handling for hush 2007-09-25 13:42:33 +02:00
Sascha Hauer ddfa0c174e remove debug printf 2007-09-24 16:59:07 +02:00
Sascha Hauer 3cbc5c5c12 remove u-boot command paramter flag 2007-09-24 12:31:08 +02:00
Sascha Hauer b0615cc909 - add 'source' command
- add help text for 'source' and 'sh'
2007-09-24 12:06:52 +02:00
Sascha Hauer 14b5c2a647 - teach hush to honour PATH variable
- remove common/main.c. This is now handled in the different shells.
2007-09-24 01:40:06 +02:00
Sascha Hauer 0aab147904 fix indention 2007-09-23 23:35:32 +02:00
Sascha Hauer ecc1ee6602 allow arguments to be passed to scripts 2007-09-23 23:26:31 +02:00
Sascha Hauer a7f5dd903e unifdef __U_BOOT__ in hush.c 2007-09-22 18:08:18 +02:00
Sascha Hauer fe2d505d4d svn_rev_481
make more char * const, fix compiler warnings
2007-07-05 18:01:58 +02:00
Sascha Hauer b2b81e2f63 svn_rev_424 2007-07-05 18:01:52 +02:00
Sascha Hauer 5f9cd32802 svn_rev_392
- remove u_boot_hush_start()
- remove u_boot_hush_reloc()
- remove repeatable commands
- do not use local variable handling anymore
2007-07-05 18:01:49 +02:00
Sascha Hauer a87f0a7f18 svn_rev_353 2007-07-05 18:01:46 +02:00
Sascha Hauer f0c67c6581 svn_rev_283
add xfuncs
2007-07-05 18:01:39 +02:00
Sascha Hauer 112ada667b svn_rev_270
WIP FS support
2007-07-05 18:01:38 +02:00
Sascha Hauer a5bf47e33a svn_rev_207
move several config options to kconfig
2007-07-05 18:01:33 +02:00
Sascha Hauer a8421600d1 svn_rev_152
remove global data gd_t and board info bd_t entirely for arm
2007-07-05 18:01:28 +02:00
Sascha Hauer 162484b83c svn_rev_003
remove all #if 0 and #if 1
2007-07-05 18:01:13 +02:00
Wolfgang Denk d87080b721 GCC-4.x fixes: clean up global data pointer initialization for all boards. 2006-03-31 18:32:53 +02:00
Wolfgang Denk 77ddac9480 Cleanup for GCC-4.x 2005-10-13 16:45:02 +02:00
Wolfgang Denk e98f68be94 Fix uninitialized variable problem in hush shell
Patch by Lars Rostock, 26 Sep 2005
2005-09-28 01:49:47 +02:00
Wolfgang Denk 396387ab8d Make bootretry feature work with hush shell.
Caveat: this currently *requires* CONFIG_RESET_TO_RETRY to be set, too.
Patch by Andreas Engel, 19 Jul 2005
2005-08-12 23:34:51 +02:00
wdenk c26e454dfc Patches by Pantelis Antoniou, 16 Apr 2004:
- add support for a new version of an Intracom board and fix
  various other things on others.
- add verify support to the crc32 command (define
  CONFIG_CRC32_VERIFY to enable it)
- fix FEC driver for MPC8xx systems:
  1. fix compilation problems for boards that use dynamic
     allocation of DPRAM
  2. shut down FEC after network transfers
- HUSH parser fixes:
  1. A new test command was added. This is a simplified version of
     the one in the bourne shell.
  2. A new exit command was added which terminates the current
     executing script.
  3. Fixed handing of $? (exit code of last executed command)
2004-04-18 10:13:26 +00:00
wdenk 56b86bf0cd Fix if / elif handling bug in HUSH shell 2004-04-12 14:31:43 +00:00
wdenk 2d1a537d87 * Patch by Thomas Elste, 10 Feb 2004:
Add support for NET+50 CPU and ModNET50 board

* Patch by Sam Song, 10 Feb 2004:
  Fix typos in cfi_flash.c

* Patch by Leon Kukovec, 10 Feb 2004
  Fixed long dir entry slot id calculation in get_vfatname

* Patch by Robin Gilks, 10 Feb 2004:
  add "itest" command (operators: -eq, -ne, -lt, -gt, -le, -ge, ==,
  !=, <>, <, >, <=, >=)
2004-02-23 19:30:57 +00:00
wdenk 2d5b561e2b * Make sure HUSH is initialized for running auto-update scripts
* Make 5200 reset command _really_ reset the board, without running
  any other code after it

* Fix flash mapping and display on P3G4 board

* Patch by Kyle Harris, 15 Jul 2003:
  - add support for Intel IXP425 CPU
  - add support for IXDP425 eval board
2003-10-14 19:43:55 +00:00
wdenk 8bde7f776c * Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
  - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
  - major rework of command structure
    (work done mostly by Michal Cendrowski and Joakim Kristiansen)
2003-06-27 21:31:46 +00:00
wdenk 3e38691e8f * Patch by Arun Dharankar, 4 Apr 2003:
Add IDMA example code (tested on 8260 only)

* Add support for Purple Board (MIPS64 5Kc)

* Add support for MIPS64 5Kc CPUs

* Fix missing setting of "loadaddr" and "bootfile" on ARM and MIPS

* Patch by Denis Peter, 04 Apr 2003:
  - update MIP405-4 board

* Patches by Denis Peter, 03 April 2003:
  - fix PCI IRQs on MPL boards
  - fix two more un-relocated pointer problems

* Fix behaviour of "run" command:
  - print error message iv variable does not exist
  - terminate processing of arguments in case of error

* Patches by Peter Figuli, 10 Mar 2003
  - Add support for BTUART on PXA platform
  - Add support for WEP EP250 (PXA) board

* Fix flash problems on INCA-IP; add tool to allow bruning images  to
  flash using a BDI2000

* Implement fix for I2C Edge Conditions problem for all boards that
  use the bit-banging driver (common/soft_i2c.c)

* Add patches by Robert Schwebel, 31 Mar 2003:
  - csb226 board: bring in sync with innokom/memsetup.S
  - csb226 board: fix MDREFR handling
  - misc doc fixes / extensions
  - innokom board: cleanup, MDREFR fix in memsetup.S, config update
  - add BOOT_PROGRESS to armlinux.c
2003-04-05 00:53:31 +00:00
wdenk d0fb80c302 * Restrict baudrate settings on LWMON to higher speeds
when watchdog is on

* Update baudrate in bd_info when it gets changed

* Add watchdog trigger points while waiting for serial port
  (so far only 8xx -- needed on LWMON with 100ms watchdog)

* Improve command line tool to access the U-Boot's environment
  (figuration of the utility, using a config file)
2003-01-11 09:48:40 +00:00
wdenk c7de829c79 * Patch by Thomas Frieden, 13 Nov 2002:
Add code for AmigaOne board
  (preliminary merge to U-Boot, still WIP)

* Patch by Jon Diekema, 12 Nov 2002:
  - Adding URL for IEEE OUI lookup
  - Making the autoboot #defines dependent on CONFIG_AUTOBOOT_KEYED
    being defined.
  - In the CONFIG_EXTRA_ENV_SETTINGS #define, the root-on-initrd and
    root-on-nfs macros are designed to switch how the default boot
    method gets defined.
2002-11-19 11:04:11 +00:00
wdenk fe8c2806cd Initial revision 2002-11-03 00:38:21 +00:00