summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* commands: remove maxargsSascha Hauer2009-10-192-8/+0
| | | | | | | 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>
* call getopt_reset only onceSascha Hauer2009-10-191-0/+3
| | | | | | | instead of calling getopt_reset in each command, call it only once before calling the command. Signed-off-by: Sascha Hauer <sha@pengutronix.de>
* commands: return COMMAND_ERROR_USAGESascha Hauer2009-10-191-8/+4
| | | | | | | instead of calling u_boot_cmd_usage in each command to safe space. Signed-off-by: Sascha Hauer <sha@pengutronix.de>
* commands: add defines for command errors/successSascha Hauer2009-10-191-1/+7
| | | | | | | | This allows us to return COMMAND_ERROR_USAGE for a failed command which will then print the usage, a very common case for commands. Signed-off-by: Sascha Hauer <sha@pengutronix.de>
* consolidate command calling in execute_commandSascha Hauer2009-10-193-35/+21
| | | | Signed-off-by: Sascha Hauer <sha@pengutronix.de>
* console: partly revert 84688dfdb4aecc8296b4fef9bc657335d7b9ade5Sascha Hauer2009-09-251-1/+0
| | | | | | Some unrelated code leaked in in this commit Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* hush: pass return code from exit commandSascha Hauer2009-09-251-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* hush: Only run list if it's not emptySascha Hauer2009-09-251-1/+6
| | | | | | Running empty lists lead to the wrong return status Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: make locally used function staticSascha Hauer2009-09-251-2/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add MMU supportSascha Hauer2009-08-191-0/+11
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: Fix line endingsSascha Hauer2009-08-131-2/+2
| | | | | | use \r\n instead of \n\r Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Improve or fix various parameter documentationJuergen Beisert2009-07-311-0/+4
| | | | Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
* get rid of device idsSascha Hauer2009-07-212-3/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move some init work into initcallsSascha Hauer2009-07-211-10/+12
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce cdevSascha Hauer2009-07-213-361/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Change return type of function part_remove to void, otherwise the compilerJuergen Beisert2009-07-011-3/+1
| | | | | | | | complains: common/partition.c:245: warning: initialization from incompatible pointer type Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
* add strerror functionSascha Hauer2009-05-251-4/+11
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* simple console: implement console_flushSascha Hauer2009-05-181-0/+16
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: buffer characters before console is initializedSascha Hauer2009-05-131-10/+21
| | | | | | | | instead of throwing all output away when the console is not initialized, buffer it in a kfifo and print it later when the first console gets initialized. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: rename console_buffer to console_input_bufferSascha Hauer2009-05-131-5/+11
| | | | | | ...as we want to add an output buffer, too Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix errno_str without text error messagesSascha Hauer2009-04-061-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Flush consoles before exitingSascha Hauer2009-03-191-0/+11
| | | | | | | 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>
* Shutdown U-Boot before starting an OSSascha Hauer2009-03-191-0/+10
| | | | | | | | Some devices, especially the ones doing DMA should be disabled before giving control to an OS. We take the simple approach here: Just shutdown the devices in the reverse order they were activated. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Console: Fix baudrate switchingSascha Hauer2009-02-061-1/+4
| | | | | | | When waiting for the user to confirm the new baudrate, wait for '\n' and '\r' instead of only '\r' Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* update .gitignore files for linker scriptsSascha Hauer2009-01-211-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common:environment: fix mode requirementNishanth Menon2008-12-091-1/+1
| | | | | | | | | | | | | | | | | Issue: Compiling on Ubuntu 8.10 Fails: inlined from 'envfs_save' at scripts/../common/environment.c:135: /usr/include/bits/fcntl2.h:51: error: call to '_open_missing_mod' declared with attribute error: open with O_CREAT in second argument needs 3 arguments Usage: open(filename, O_WRONLY | O_CREAT) Fix: When using open with O_CREAT, it requires mode to be defined. Signed-off-by: Nishanth Menon <nm@ti.com>
* hush: Fix quotingSascha Hauer2008-11-101-1/+1
| | | | | | | | | | | | | | | 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>
* Print error numberSascha Hauer2008-11-101-6/+5
| | | | | | | When we do not have the appropriate error string compiled in, print at least the number Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* partition: route through MEMSETBADBLOCK ioctlSascha Hauer2008-09-021-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Build system: Use setlocalversion from kernelSascha Hauer2008-09-021-0/+20
| | | | | | Autogenerate a local version from git. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* hush: fix compiler warningSascha Hauer2008-08-261-2/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* setenv: Fix warning introduced with last commitSascha Hauer2008-08-201-13/+23
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Common: expose callocNishanth Menon2008-08-151-0/+1
| | | | | | | calloc is not exported by default. This patch exposes the same. Signed-off-by: Nishanth Menon <x0nishan@ti.com>
* Partition: Add an own device id for partitionsSascha Hauer2008-08-141-0/+6
| | | | | | | | 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>
* Partition layer updatesSascha Hauer2008-08-131-9/+5
| | | | | | | - route MEMGETINFO through partition layer - use dev_erase/dev_protect instead of direct pointers Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocK: Add ndelay functionSascha Hauer2008-08-131-0/+8
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add help texts for Shell optionsSascha Hauer2008-08-131-14/+18
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: dump stack space on startupSascha Hauer2008-08-131-5/+8
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move several commands into extra filesSascha Hauer2008-08-132-135/+2
| | | | | | move false, true, help, insmod, lsmod, version into extra files Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: add a simple console for saving spaceSascha Hauer2008-08-015-5/+138
| | | | | | | Add a simple console layer which is not able to handle multiple consoles for those who don't need it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* - introduce ioctl callSascha Hauer2008-06-061-0/+44
| | | | - pass open/close/lseek through to drivers
* 007-partitionsNishanth Menon2008-06-052-1/+5
| | | | | | | | | [Patch 07/17] U-Boot-V2:Common Make partitions configurable Not all configurations of Uboot require partitions. This patch modifies partition compilation as configurable param Signed-off-by: Nishanth Menon<x0nishan@ti.com>
* 002-clock-overflowNishanth Menon2008-06-051-1/+1
| | | | | | | | | | | | | | [Patch 02/17] U-Boot-V2: Handle case of clock rollover for get_time_ns get_time_ns does a simplistic delta = cycle_now - cycle_last. It is possible that the h/w counter reached max and reset back to 0. This patch addresses this issue by checking for rollover condition. NOTE 1: This does not guarentee that you cannot confuse get_time_ns. You could possibly wait for two reset cycles and then get a messed up value. To fix that we may need interrupt mode timer tick - something on the lines of jiffies on linux. NOTE 2: the question of cs->mask is not clear. if the mask is for the tick, then it is better done with (cycle_now & cs->mask) - (cs->cycle_last & cs->mask). Signed-off-by: Nishanth Menon<x0nishan@ti.com>
* 001-arch-configNishanth Menon2008-06-051-0/+3
| | | | | | | | | | [Patch 01/17][Try 3] U-Boot-V2: ARM: Add ARCH lowlevel Init This Patch adds CONFIG_ARCH_HAS_LOWLEVEL_INIT as discussed in thread http://www.nabble.com/-Patch--U-Boot-V2%3A-Introduce-CONFIG_ARCH_HAS_INIT_LOWLEVEL-to17134638.html#a17188894 Signed-off-by: Nishanth Menon<x0nishan@ti.com>
* [memory layout]: streamline memory layoutSascha Hauer2008-06-041-0/+56
| | | | | | | 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.
* fix warnings in malloc code introduced by last commitsSascha Hauer2008-06-031-2/+2
|
* Remove part #ifdefed with #if (CONFIG_COMMANDS & CFG_CMD_BOOTD) which isMenon, Nishanth2008-05-121-17/+1
| | | | false everytime
* Change CONFIG_SKIP_LOWLEVEL_INIT to CONFIG_MACH_DO_LOWLEVEL_INITMenon, Nishanth2008-05-121-8/+12
| | | | | | | | as we rather use positive logic. Make it dependent on boards that have it rather than on ARM Signed-off-by: Nishanth Menon <x0nishan@ti.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Trivial comment fixSascha Hauer2008-04-041-1/+1
|
* Subject: [PATCH] [general] Fixed constant strings in data section issueSascha Hauer2008-04-043-11/+14
| | | | | | | | 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>