9
0
Fork 0
Commit Graph

828 Commits

Author SHA1 Message Date
Sascha Hauer 1af56abc0c Add UBI commands: ubiattach, ubidetach, ubimkvol, ubirmvol
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-05 15:07:51 +02:00
Uwe Kleine-König a398a920b6 trivial: fix typos concerning "instead"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-05 08:27:28 +02:00
Sascha Hauer 40aad62d1c Merge remote branch 'origin/assorted-pu' into next 2010-06-28 10:35:58 +02:00
Eric Bénard 7a1f70e70a fix command loadb
which was broken after commit c3789cd49b

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-24 12:37:56 +02:00
Sascha Hauer 3e94938068 memcpy cmd: Do not expect to read/write the whole chunk at once
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>
2010-06-24 11:36:28 +02:00
Sascha Hauer 57e1fc33bd net: remove old network stack
All network commands now use the new stack, so remove the old one.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-17 08:28:25 +02:00
Sascha Hauer 994f95c073 net: remove need for eth_halt/eth_open
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>
2010-06-17 08:28:16 +02:00
Eric Bénard c70443b5c7 commands: add i2c commands
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>
2010-05-26 10:34:58 +02:00
Sascha Hauer eed255609d Merge branch 'next' 2010-04-06 08:44:32 +02:00
Uwe Kleine-König f4a5a39663 trivial: fix command case for erase usage line
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:27:04 +02:00
Sascha Hauer 524e5c3d15 go command: shutdown barebox before calling an application
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>
2010-03-30 14:15:03 +02:00
Sascha Hauer a9ff0c8e8b echo: add -e option support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:14:59 +02:00
Sascha Hauer 6d079ae2ca add unlzo support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:14:58 +02:00
Juergen Beisert c6f4ea0dcf Make some help comments less confusing
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-18 08:11:06 +01:00
Sascha Hauer e6b8bdc0c5 cfi_flash: move include/cfi_flash.c next to driver
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>
2010-02-08 14:37:50 +01:00
Sascha Hauer 6cbf70a01a Merge branch 'pu' 2010-02-01 17:25:59 +01: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 88351d2e4b Move tftp/nfs specific code to net/*
This adds a few bytes of binary space but is done to put
the code where it belongs to.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:31 +01:00
Sascha Hauer d2a58c2173 remove unused cdp code
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-25 08:30:53 +01:00
Peter Korsgaard d8a014ccdf addpart: support @<offset>
We claim to be compatible with the kernel's cmdlinepart parser, so
support <size>@<offset> like the kernel does.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-16 12:25:13 +01:00
Juergen Beisert 7081093531 Add a special command to load and start a bzImage on x86
Other architectures are supporting the uImage format used by barebox's 'bootm'
command. x86 does'nt. So, we need a special command to be able to boot the
x86 specific bzImage format.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:16 +01:00
Robert P. J. Day 28e497d52b commands: Remove reference to non-existent CONFIG_CMD_I2C.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-21 12:21:30 +01:00
Robert P. J. Day 94f8b42c4f commands: correct "CONFIG_SIMPLE_PARSER" to "CONFIG_SHELL_SIMPLE".
Based on suggestion from S. Hauer, fix the obvious typo in
commands/Makefile.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-21 11:45:38 +01:00
Sascha Hauer 4e4b03cd61 commands/nand.c: Fix memory hole
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-21 09:44:17 +01:00
Sascha Hauer 73108301d4 Remove unnecessary casts in key defines
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-18 16:44:54 +01:00
Sascha Hauer 9491ec7800 Cleanup colleteral damage from renaming
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:19:08 +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
Juergen Beisert f522d42597 Some doxygen related fixes
Nishanth Menon wrote:
> no signed off by and no diffstat?

Ups.

> can you use git-format-patch to send please? it is easier to review.

Sure. Here it comes:

jbe

------8<---------8<---------8<---------8<---------8<---------8<----

Subject: [PATCH] Some doxygen related fixes:
  - fix a few doxygen comments that are used in a wrong way
  - move some pages and their content to a better place in the
    generated documentation

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-14 09:43:02 +01:00
Sascha Hauer 9af2cfb9ef nand bb: Be sure that fd is at the beginning when erasing
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:02 +01:00
Sascha Hauer 21b96abb7c crc: Do not lseek if not necessary (bb devs do not allow lseek)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:02 +01:00
Sascha Hauer 9520362888 command line gpio support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Juergen Beisert 3173b1fb08 Enable 'saveenv' for non eraseable media
'close()' clobbers the 'errno' value from the erase command. So it must be done
*after* the check for ENOSYS to ingnore it correctly.

Signed-off by: Juergen Beisert <j.beisert@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-11-19 09:42:38 +01:00
Jean-Christophe PLAGNIOL-VILLARD 35144c0b86 xyzModem: fix digit init in xyzModem_stream_open
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-20 15:02:34 +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 f4ca85a2a3 printenv: do not return negative values in a command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-19 16:18:27 +02:00
Sascha Hauer 11740dc01b remove obsolete and broken command 'splash'
Has been replaced with 'bmp'

Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:52 +02:00
Sascha Hauer a9675ec67c cat: return error if file is not readable
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:52 +02:00
Sascha Hauer 63e01b4969 call getopt_reset only once
instead of calling getopt_reset in each command,
call it only once before calling the command.

Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:52 +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 2dc2132f0e remove global variable BootFile
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer ac50a05caf pass filename to nfs and tftp start functions
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:51 +02:00
Sascha Hauer 146f9b6e5b remove sntp support. Has been broken for long enough
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:19:28 +02:00
Sascha Hauer 211f9b336a net: refactor dhcp support
Remove bootp support. It has been broken for longer and
is implemented in an ifdef desert.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:08 +02:00
Sascha Hauer 8c17c465d6 make netboot_common a global function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:57:41 +02:00
Sascha Hauer 35d180a096 net: do not use netboot_common for rarp
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:57:41 +02:00
Sascha Hauer a3a5927110 net: remove switch/case in NetLoop()
Instead of having a big switch/case for every protocol, do
the right things in the individual functions before callong
NetLoop().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:57:40 +02:00
Sascha Hauer 9296260a78 net: split NetLoop in NetLoop and NetLoopInit
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:49:21 +02:00
Sascha Hauer e06a09be5b ls: fix stat failure, print error
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 09:13:18 +02:00
Sascha Hauer 0c45663798 nand bb: fix handling of two subsequent bad blocks
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-12 19:32:33 +02:00
Sascha Hauer bf84eeb078 protect command: ignore -ENOSYS
Return success on -ENOSYS. (un)protecting a device which
is not protectable should not irritate users.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-12 09:27:47 +02:00
Sascha Hauer d9345607aa Add USB device support
This patch adds support for USB devices. It uses
the Linux Kernel gadget API. Along with this patch
comes driver support for the Freescale (arc) USB OTG
Core and USB Device Firmware Update (DFU)
The serial gadget support is not working at the moment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 14:31:26 +02:00
Sascha Hauer a205b87fa2 make copy_file() globally available
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 13:33:52 +02:00
Sascha Hauer de14570aea ls: beautify output
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 13:33:46 +02:00
Sascha Hauer 2ee3e596c5 nand bb: fix removal of bb devices
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-11 09:13:28 +02:00
Sascha Hauer 33a6b5abca nand bb: fix check when erasing a bb device
We can actually partly erase a bb device, so fix the check.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-11 09:13:22 +02:00
Sascha Hauer b23a83fcaf ethact command: If called without arguments print current eth device
Also, fix usage information

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-09 11:51:37 +02:00
Sascha Hauer 49ff3691b4 arm: Add bootu command
bootu command to start raw (uncompressed) Linux images

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-08-19 10:51:01 +02:00
Sascha Hauer 5db3059ebc arm: make 'bootz' configurable
also, fix compilation with bootm disabled

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-08-19 10:50:31 +02:00
Sascha Hauer 7d27f77b6e nand bb: Fix writing of nand page unaligned data
We used to write the data in nand_bb_write directly to the
NAND flash. If we do not write a whole NAND page at once, this
resulted in multiple writes of one page which corrupted the
ecc data.
Fix this by collecting 4096 bytes of data before actually
writing the data to the flash.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-08-13 10:43:06 +02:00
Sascha Hauer eca9aba2cf add memset command to u-boot
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-31 15:09:28 +02:00
Sascha Hauer ce0d6995f6 framebuffer: Add bmp command to show bmp files
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-31 15:08:49 +02:00
Sascha Hauer d3e15e7eed implement /dev/zero
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-30 16:09:28 +02:00
Sascha Hauer 02ba8a0542 get rid of device ids
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:47 +02:00
Sascha Hauer 4b34297cfb Get rid of remaining DEVICE_TYPE_* usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:46 +02:00
Sascha Hauer bac65c6cde net: Get rid of DEVICE_TYPE_ETHER usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:45 +02:00
Sascha Hauer 0a015ce232 make nand command mandatory for nand support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:45 +02:00
Sascha Hauer a2b7cd183b introduce cdev
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:44 +02:00
Sascha Hauer 53488058e6 allow changing of network device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-04-06 11:13:19 +02:00
Sascha Hauer dba6c8ed44 fix compiler warning
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-19 18:23:48 +01:00
Sascha Hauer ee36cf25b5 remove SHOW_BOOT_PROGRESS
Though useful it is currently unsued and broken. Should be reimplemented

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-19 12:21:40 +01:00
Sascha Hauer 8a2e721fc5 Flush consoles before exiting
We use FIFOs on some devices, so flush them before exiting so
we do not get funny characters in the output.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-19 12:21:24 +01:00
Sascha Hauer b1a8c1897d bootm: Fix verifying of uImages
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-02-06 14:44:46 +01:00
Sascha Hauer a7acf2e746 mtest: remove braindamaged NULL pointer deref
The alternative memory test implementation needs a scratch
memory location to remove the last data from the data bus.
Instead of using a NULL pointer for this, default to the
memory start address.
No sane program should consider a NULL pointer as a safe default.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-01-13 14:31:03 +01:00
fredo c3dbf6e1d6 remove warning
Signed-off-by: Frederic RODO <fred.rodo@gmail.com>
2008-12-18 14:20:08 +01:00
Sascha Hauer 2dcfb887d7 memory commands: allow for kMG suffixes
Allow for kMG suffixes in memcpy and memcmp

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-17 18:20:00 +01:00
Sascha Hauer dfefaf5744 CRC: various fixes
- bail out on read errors
- test for -1 instead of < 0 for lseek

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-11-10 17:52:14 +01:00
Nishanth Menon aec8bdd7e5 Commands:NAND: Rmove unwanted prints remove unwanted prints which can interfere with protocols such as kermit downloads
Signed-off-by: Nishanth Menon <x0nishan@ti.com>
2008-09-15 10:11:04 +02:00
Nishanth Menon ad84cbb078 NAND:Config change
Introduce config definitions similar to that
defined in Linux MTD layer. These allow us to
enable conditional features.

Signed-off-by: Nishanth Menon <x0nishan@ti.com>
2008-09-15 10:11:04 +02:00
Sascha Hauer 2f6ccbb9f8 NAND: Calculate size of bb devices
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-03 14:53:26 +02:00
Sascha Hauer f118d1a103 NAND: fix reading of bad block aware devices
When reading from bad block aware devices we must make sure not
to read beyond eraseblock boundaries.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-03 14:04:15 +02:00
Sascha Hauer 9fc8c4e9bb nand: add nand -b for marking blocks as bad
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-02 17:22:46 +02:00
Sascha Hauer 6aa5d0c52e cp: check return value of read()
...and not if the function read is non NULL.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-02 17:19:10 +02:00
Sascha Hauer 60fb727353 Revert "partition: fix compiler warning"
Grumpf. Better compiler warnings than broken code :(

This reverts commit 8201d7c5fc.
2008-08-27 18:10:18 +02:00
Sascha Hauer 8201d7c5fc partition: fix compiler warning
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-26 11:40:51 +02:00
Sascha Hauer cfdb837906 partition: rename variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-26 11:40:51 +02:00
Sascha Hauer 0d9b5b5f57 Revert "loadb: remove old-style-u-boot-ifdefs around whole file"
This reverts commit 1e49fadf8a.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-21 08:35:13 +02:00
Sascha Hauer 949649e3f1 bootm: honour the -n flag again
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-20 11:37:58 +02:00
Sascha Hauer 2f3211bc25 bootm: memmap now returns (void *)-1 for failure. Test for this instead of NULL
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-20 11:31:32 +02:00
Nishanth Menon e320ef5f9e loadb: change default download file
The default download device was /dev/mem
Quote Sascha:
"This is a quite dangerous thing. There are
quite some boards out there which have NOR
Flash on 0x0. With a default file of
/dev/mem we would overwrite U-Boot."

Change default device to image.bin

Signed-off-by: Nishanth Menon <x0nishan@ti.com>
2008-08-20 09:17:33 +02:00
Nishanth Menon 580cd4ff28 loadb: Add buffered write
Default loadb behavior works on packet sized
chunks of kermit data to be put on target file
This would not work good on block devices such
as NAND. solution will be to buffer data up to
standard 4096 chunks before giving to device.

Signed-off-by: Nishanth Menon <x0nishan@ti.com>
2008-08-20 09:17:32 +02:00
Sascha Hauer 1e49fadf8a loadb: remove old-style-u-boot-ifdefs around whole file
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-19 09:42:29 +02:00
Nishanth Menon 624db2b336 loadb: change -d to -f
-d represents devices only.. but loadb can
operate on files as well. hence Use -f as
option to select the output file. This is
more representative of what we are trying
to do.

Signed-off-by: Nishanth Menon <x0nishan@ti.com>
2008-08-19 09:38:57 +02:00
Nishanth Menon c63e66ed7e loadb: create file
Allow loadb and loady to create file if file not
present. This will allow for downloading a file
to filesystem and cp or doing other operations on
the same. Making this as an option instead of a
default behavior ensures that users intend to
create file when they use -c option

Signed-off-by: Nishanth Menon <x0nishan@ti.com>
2008-08-19 09:38:57 +02:00
Sascha Hauer aed834904a Let 'go' command interpret filenames.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-14 10:26:23 +02:00
Sascha Hauer e133ccdda8 implement memmap for mem driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-14 10:25:56 +02:00
Sascha Hauer ccbf7b8dac ups, some debug printf slipped in
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-14 09:41:30 +02:00
Sascha Hauer 65778b63d2 Partition: Add an own device id for partitions
Add an own device id for partitions. This is necessary to allow
the partition layer to check if the given device is really a partition.
Also, check for readonly flag in erase.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-14 09:28:10 +02:00
Sascha Hauer 3a36623748 some merge leftover slipped in
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:15 +02:00
Sascha Hauer 1fbb5f65d6 nand: Allow adding/removing of more than one bad block aware device at once
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:15 +02:00
Sascha Hauer b184805fcc add missing close() in do_protect
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:15 +02:00
Sascha Hauer 6f680b638b saveenv: close file
Close the file in saveenv before calling envfs_save and reopen it
afterwards. NAND Bad block aware devices allow opening a file only
once.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:15 +02:00
Sascha Hauer ccd76741c4 NAND: nand command updates
- allow removal of bad block aware devices
- turn printfs into debug

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:14 +02:00
Sascha Hauer da4d33969e CFI Flash driver: Fix error path
We forgot to close the file when parse_area_spec() failed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:41:22 +02:00
Sascha Hauer 932b57873d move several commands into extra files
move false, true, help, insmod, lsmod, version into extra files

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:29:17 +02:00
Sascha Hauer f295acb556 lseek: return -1 for errors and check for that return value
We cannot check for < 0 in lseek, otherwise we get problems with files > 0x7fffffff

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-01 08:59:27 +02:00
Sascha Hauer ee6d36a540 - introduce ioctl call
- pass open/close/lseek through to drivers
2008-06-06 09:30:48 +02:00
Sascha Hauer 3d45abb7c4 [NAND] continue to make it work. Now works partly on at91sam9260 2008-06-06 09:30:39 +02:00
Sascha Hauer f3351ebd78 add basic at91sam9260 support. Currently only second stage
bootloader is supported:
- No SDRAM initialisation
- No UART init / baudrate change
2008-06-06 09:30:32 +02:00
Nishanth Menon 296ea53c68 008-fixloadb
[Patch 08/17] U-Boot-V2:Commands Unbreak loadb support

This patch provides support for loadb and loady and enables the broken feature

Signed-off-by: Nishanth Menon<x0nishan@ti.com>
2008-06-05 19:45:20 +02:00
Sascha Hauer 596c845072 [memory layout]: streamline memory layout
Memory layout can now be specified via kconfig options. Two
possibilities exist: default layout means the layout is stack
/ malloc heap / U-Boot. The user can also specify fixed addresses
for each TEXT_BASE / stack / malloc heap.
2008-06-04 11:54:03 +02:00
Sascha Hauer dabec3a7a1 Merge branch 'master' of git://www.denx.de/git/u-boot-v2 2008-06-02 16:13:14 +02:00
Sascha Hauer 59fd84bd7f [net]: remove CONFIG_BOOTP_MASK 2008-04-07 11:40:19 +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 3e6eeed016 netboot commands: When downloading a file and no local filename is given,
just use the filename as resulting file, not the whole path.
2008-03-31 21:48:27 +02:00
Sascha Hauer 14056577fd md command: Close filedescriptor after use 2008-03-14 13:02:53 +01:00
Sascha Hauer ce172e152e add ls -c and -l 2008-03-11 21:41:56 +01:00
Sascha Hauer 4dba16c692 close net_store_fd after usage. Man there are bugs to find... 2008-03-10 23:56:47 +01:00
Sascha Hauer 6e08f55368 memory_display() used to show the ascii output on the
last line not exactly under the other lines. fix it.
2008-03-01 21:03:35 +01:00
Sascha Hauer f95ec8a32d - Add functions to register image handlers for booting uImages 2008-02-20 19:01:54 +01:00
Carsten Schlote 0372f48749 [general] Added more outputs to partition.c
Added more outputs to partition code.

Signed-off-by: Carsten Schlote <schlote@vahanus.net>
2008-02-19 09:29:44 +01:00
Marc Kleine-Budde 2ddf98f348 remove leftover Makefile entries
This patch removed leftover Makefile entries from
commit "d59c600c656d08410ea862c582fbd77432c3ca47". They should
have been reverted, but somehow survived

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2008-01-24 11:50:14 +01:00
Enrik Berkhan e02f84dd0b Fix typo in commands/Makefile to allow inclusion of mem write commands
Signed-Off-By: Enrik Berkhan <Enrik.Berkhan@ge.com>
2008-01-23 12:13:23 +01:00
Enrik Berkhan bd0aed0ae0 Avoid memtest at scratch address
When the tested address equals the scratch location, memtest will fail.

Signed-Off-By: Enrik Berkhan <Enrik.Berkhan@ge.com>
2008-01-23 12:13:23 +01:00
Marc Kleine-Budde 7b2a8252bd [cat] use define for buffer size not hardcoded value
With this patch a define is used for the buffer size not a hardcoded value
in two places in the node.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2007-11-28 08:27:38 +01:00
Marc Kleine-Budde e68ac6368d Revert "separating memory commands"
This reverts commit d59c600c65.

Conflicts:

	commands/Makefile
	common/Kconfig
	common/Makefile

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2007-11-27 23:19:55 +01:00
Robert Schwebel d6ddc7fbfc flinfo is not there any more, remove reference in kconfig
The flinfo command has been removed because it's functionality is now
integrated into the driver model. Fix the kconfig entry accordingly.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
2007-11-27 21:32:33 +01:00
Marc Kleine-Budde ba6382fe2a dynamically added partition: check against FIXED partitions
The dynamic partition adding is improved with this patch.
When adding dynamic partitions they are checked against the existing
FIXED ones to ensure that they match.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2007-11-27 20:45:36 +01:00
Juergen Beisert 8121f788c0 adding copy docu
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2007-11-12 16:28:23 +01:00
Juergen Beisert 8413d78ab3 separating environment commands, part 2
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2007-11-12 16:28:23 +01:00
Juergen Beisert 2966bba216 separating environment commands, part 1
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2007-11-12 16:28:23 +01:00
Juergen Beisert d59c600c65 separating memory commands
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2007-11-12 16:28:23 +01:00
Marc Kleine-Budde 57cae4e826 Merge branch 'ipe337' 2007-11-12 15:58:53 +01:00
Marc Kleine-Budde 9d27950d06 use 10 digits for filesize in ls
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2007-11-12 14:36:52 +01:00
Marc Kleine-Budde aae8d892db use unsigned for filesize in ls
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2007-11-12 12:01:18 +01:00
Marc Kleine-Budde c991486d56 commands/bootm.c:872:4: warning: no newline at end of file
added newline at end of commands/bootm.c

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2007-11-12 10:56:15 +01:00
Juergen Beisert 9b07bdbbdc Merge branch 'docu' 2007-11-09 14:06:57 +01:00
Juergen Beisert 3ff14ef200 various doc added
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2007-11-09 14:05:23 +01:00
Juergen Beisert 2cb737d95d using a consistent ipaddr parameter all over the place
Signed-off-by: Juergen Beisert <jbe@octopus.labnet.pengutronix.de>
2007-11-08 17:06:48 +01:00
Juergen Beisert 8fe25ecf12 adding various doku 2007-11-08 12:01:52 +01:00
Juergen Beisert 0a13be8de2 various docu added 2007-11-05 15:20:31 +01:00
Juergen Beisert 4cd877a840 saving added docu 2007-11-05 14:39:07 +01:00
Juergen Beisert 1cb7062653 integrating sha's changes into jbe's branch 2007-11-05 12:26:29 +01:00
Sascha Hauer a26a5ef28f Replace all occurences of UBoot with U-Boot
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2007-10-24 13:20:27 +02:00
Juergen Beisert 53dd8423a5 adding new doc 2007-10-19 15:23:48 +02:00
Juergen Beisert afe73cff56 doc added and some reorganised 2007-10-19 14:56:45 +02:00
sascha ad72b775f1 Merge octopus:/home/git/projects/u-boot-v2 2007-10-19 13:07:01 +02:00
Juergen Beisert 6ad2703e6e Merge branch 'master' of jbe@octopus:/home/git/projects/u-boot-v2 2007-10-19 11:58:33 +02:00
Juergen Beisert 34c23b6f6e debug support added 2007-10-19 11:50:58 +02:00
sascha 8a46c1102f move readline command to a file of its own 2007-10-19 11:28:58 +02:00
sascha 95db50e812 Fix documentation for addpart/delpart/devinfo. These commands
now take a device file, not a device id.
2007-10-19 11:23:24 +02:00
sascha 3b6d6a45e7 - Implement tree structure for devices
- Use device tree structure to implement partitions
- Let devinfo print a nice tree
- Introduce 'fixed' partitions which are not removable
- Fix mount: It was not possible to mount on a relative path.
2007-10-19 08:45:57 +02:00
Juergen Beisert 8c6c055de6 adding some useful error messages 2007-10-18 18:32:02 +02:00
sascha b36fca0cb8 cp command: Allow to copy multiple files 2007-10-17 11:12:57 +02:00
sascha 288c97b89c editor: Do not use ansi code for screen scrolling by default.
Add an aliases 'sedit' which does this.
2007-10-16 22:35:42 +02:00
sascha a09b455fce Merge octopus:/home/git/projects/u-boot-v2 2007-10-16 20:57:53 +02:00
sascha 089c998ad9 mem.c: allow memcpy and memcmp to handle files. 2007-10-16 20:57:37 +02:00
Juergen Beisert 26def3fd2c various small typos fixed 2007-10-16 19:07:21 +02:00
sascha 25850aa80a fix error path in cp command. 2007-10-16 16:40:29 +02:00
Sascha Hauer bd1910d500 fix area parsing for erase/protect, add error parsing 2007-10-09 17:16:08 +02:00
Sascha Hauer bd6af38017 tristate commands to compile as modules 2007-10-07 14:33:07 +02:00
Sascha Hauer 2443c7a6f1 export symbols 2007-10-07 14:27:24 +02:00
Sascha Hauer 828dbf9f3c edit: add 8 as backspace code 2007-10-04 18:36:24 +02:00
Sascha Hauer 6905ed5bf3 timeout command: Use do {} while; insteal of while {}; to allow interrupt
with timeout = 0.
2007-10-04 18:35:53 +02:00
Sascha Hauer 42bc579215 change semantics of tftpboot command:
Change name to tftp and allow to only specify a remote filename.
Localfilename, if given, has to be specified with the second
argument, not the first one.
2007-10-04 13:05:56 +02:00
Sascha Hauer 9cce63fa33 add argument checking for edit.c 2007-10-04 12:38:40 +02:00
Sascha Hauer 6b7fdcb970 Use safe_strncpy() instead of copy_filename(). The shell has already removed
quotes, so we don't need this functionality from copy_filename()
2007-09-28 10:47:19 +02:00
Sascha Hauer 63c292b019 remove i2c from kconfig 2007-09-28 10:25:32 +02:00
Sascha Hauer d7ce9b9403 remove mii.c 2007-09-28 10:24:44 +02:00
Sascha Hauer b3dc734018 declare lots of functions static 2007-09-28 10:07:26 +02:00
Sascha Hauer 79ed00ba92 pass file size from read_file 2007-09-27 16:33:35 +02:00
Sascha Hauer 9e13a384c0 use xrealloc instead of realloc 2007-09-27 16:28:26 +02:00
Sascha Hauer 6057d62524 learn to realloc 2007-09-27 16:27:20 +02:00
Sascha Hauer 04f2ec0263 fix usage of normalise_path 2007-09-27 14:14:24 +02:00
Sascha Hauer e15abc0da7 activate memcmp and memcpy 2007-09-27 12:06:01 +02:00
Sascha Hauer 6dfc34d297 reactivate mtest 2007-09-27 12:04:59 +02:00
Sascha Hauer 7c17ff7c45 Reimplement environment. Now we only have one crc for the whole image. 2007-09-27 12:04:17 +02:00
Sascha Hauer 85db86ab5b implement mkdir -p #2 2007-09-27 11:59:36 +02:00
Sascha Hauer 326e4bddc3 print_size() -> size_human_readable()
return a pointer to a human readable string rather than printingit directly
2007-09-26 15:23:46 +02:00
Sascha Hauer 913691eccd add directory handling for environment 2007-09-25 12:58:52 +02:00
Sascha Hauer f132b2e073 - change function declarations for better standard conformity:
int open(const char *pathname, int flags);
-> int open(const char *pathname, int flags, ...);
   int mkdir(const char *pathname);
-> int mkdir(const char *pathname, mode_t mode);
2007-09-24 17:03:20 +02:00
Sascha Hauer 3cbc5c5c12 remove u-boot command paramter flag 2007-09-24 12:31:08 +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 64caff6c94 remove debug printf 2007-09-21 15:18:39 +02:00
Sascha Hauer e3f34e28da implement test options -f, -e and -d 2007-09-21 15:16:24 +02:00
Sascha Hauer 0dd68e795e - putc is now putchar for better standard conformity
- make printf return int
2007-09-21 09:09:06 +02:00
Sascha Hauer 9436833b11 fix return values for some cases in envfs_load() 2007-09-16 11:16:58 +02:00
Sascha Hauer ca8ae5695a add the possibility to have a arch specific 'go' command. Some
architectures need this (e.g. blackfin and i386)
2007-09-16 11:16:08 +02:00
Sascha Hauer 1ef73a95be add timeout command 2007-09-16 11:13:16 +02:00
Sascha Hauer 2a9c1de93f whitespace cleanup 2007-09-13 16:06:02 +02:00
Sascha Hauer dc7a1f0931 add Kconfig option for showing the image type 2007-09-13 15:25:22 +02:00
Sascha Hauer 442b7bfa3f fix error handling in envfs_load() 2007-09-13 15:24:32 +02:00
Sascha Hauer 46f6648adb - fix handling of images on not mappable devices in bootm.
- split up image information string function into several functions
2007-09-13 15:11:16 +02:00
Sascha Hauer 6251a54a68 add rom driver 2007-09-13 15:08:55 +02:00
Sascha Hauer 466078dbb2 fix a bug in the editor when reading files which do not have
a \n at the last line
2007-09-13 12:56:29 +02:00
Sascha Hauer 99978d467a add (un)protect to saveenv 2007-09-12 17:12:16 +02:00
Sascha Hauer 58f1051598 Do not use -f <file> to specify the device for erase and protect, but
instead se positional parameters.
2007-09-11 10:17:49 +02:00
Sascha Hauer 056a695c15 implement flash protection 2007-07-16 10:29:28 +02:00
Sascha Hauer 8881fb7984 use memmap() to save one memcpy call in bootm 2007-07-15 14:02:53 +02:00
Sascha Hauer 665291e693 implement memmap().
With this function we can get a pointer to directly memory mapped
devices like nor flash or RAM. Useful for bootm where we save one
memcopy when the image is mappable
2007-07-15 13:50:04 +02:00
Sascha Hauer 8dc7fe1648 Lindent commands/partition.c 2007-07-14 15:20:43 +02:00
Sascha Hauer 7c809ab519 allow calculationg checksums of files 2007-07-14 14:47:35 +02:00
Sascha Hauer 66b61fda62 fix printf in do_flerase() 2007-07-14 14:45:45 +02:00
Sascha Hauer 41fd1f6625 add O_RDONLY flag to open() call 2007-07-14 14:44:29 +02:00
Sascha Hauer 828fe2d8e4 add missing include 2007-07-14 14:43:53 +02:00
Sascha Hauer 6f779cc1c5 - fix memory hole
- fix reading of empty lines
- put the command prompt at the beginning of the line when exiting edit
2007-07-13 20:42:18 +02:00
Sascha Hauer ef54cffe97 add missing flash.o and meminfo.o to Makefile 2007-07-13 20:41:41 +02:00
Sascha Hauer dc41557d1b Merge sascha@brannigan.homelinux.org:/home/sascha/ptx/u-boot/u-boot-2.0.0 2007-07-12 09:56:19 +02:00
Sascha Hauer 30788385d9 fix compiler warning 2007-07-11 11:07:04 +02:00
Sascha Hauer e755ab4535 minor fixes 2007-07-05 21:50:14 +02:00
Sascha Hauer 75a10b942c svn_rev_706
add file headers
2007-07-05 18:02:19 +02:00
Sascha Hauer 89f0c5c94f svn_rev_701
move do_test to own file and reimplement
2007-07-05 18:02:18 +02:00
Sascha Hauer b165a680c3 svn_rev_696
pass O_CREATE
2007-07-05 18:02:18 +02:00
Sascha Hauer 8eebe20fb6 svn_rev_695 2007-07-05 18:02:18 +02:00
Sascha Hauer 9afd20bdb0 svn_rev_693
remove do_reset
2007-07-05 18:02:18 +02:00
Sascha Hauer ccfa1e06a5 svn_rev_692 2007-07-05 18:02:17 +02:00
Sascha Hauer 98432d3925 svn_rev_683
more cleanups, fix compiler warnings
2007-07-05 18:02:16 +02:00
Sascha Hauer 6e7d2478fc svn_rev_680
remove crc32 (extra file now)
2007-07-05 18:02:16 +02:00
Sascha Hauer 5a7d488510 svn_rev_676 2007-07-05 18:02:16 +02:00
Sascha Hauer 3b4bad17b3 svn_rev_664 2007-07-05 18:02:15 +02:00
Sascha Hauer b2c5310d4d svn_rev_653
restructure tree, add reginfo command
2007-07-05 18:02:14 +02:00
Sascha Hauer fda840672d svn_rev_652 2007-07-05 18:02:13 +02:00
Sascha Hauer 59410692ca svn_rev_651 2007-07-05 18:02:13 +02:00
Sascha Hauer bba475d70e svn_rev_650 2007-07-05 18:02:13 +02:00
Sascha Hauer 3f35315b90 svn_rev_648 2007-07-05 18:02:13 +02:00
Sascha Hauer 40e4e2e659 svn_rev_647 2007-07-05 18:02:13 +02:00
Sascha Hauer ab0f254650 svn_rev_645
moved
2007-07-05 18:02:13 +02:00
Sascha Hauer f37394d8b4 svn_rev_644 2007-07-05 18:02:13 +02:00
Sascha Hauer 4b07af6730 svn_rev_643
structure cleanup
2007-07-05 18:02:13 +02:00