summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* remove typedef cmd_tbl_t and replace it with struct commandSascha Hauer2010-02-014-19/+19
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove unused file common/flash.cSascha Hauer2010-02-011-73/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove/adjust erroneous references to CONFIG_MODULE.Robert P. J. Day2009-12-211-1/+0
| | | | | | | | The correct config variable is CONFIG_MODULES, so tweak any references to the incorrect CONFIG_MODULE. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-1510-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Re-format the fileJuergen Beisert2009-12-101-912/+781
| | | | | | | Re-format the file with 'indent' and some manual corrections. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Combine memory initialization with the main memory functions.Juergen Beisert2009-12-102-106/+60
| | | | | | | | | Memory allocation is very simple in u-boot-v2. So, it makes also sense to add the "operating system" emulation layer into the main memory management source file, to keep them at one place and simple. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Use the global string functionsJuergen Beisert2009-12-101-108/+6
| | | | | | | | | Don't try to be smarter than GCC. There are various better optimizations available than to write our own. So, use the globaly available string functions instead. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Remove win32 supportJuergen Beisert2009-12-101-186/+0
| | | | | | | Remove never used code. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Remove debug codeJuergen Beisert2009-12-101-179/+0
| | | | | | | | When assert() is always defined to do nothing, the debug functions makes no sense, because they also do nothing. Removing them shrinks the code. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Use nowadays function prototypesJuergen Beisert2009-12-101-87/+1
| | | | | | | | Use a function prototype style as used in all other u-boot-v2 sources, too. Also remove C++ support. We do not use C++ in this project. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* After moving all declarations to the C source, do the same with the docJuergen Beisert2009-12-101-0/+217
| | | | | | | Done in preparation to provide this documentation for doxygen. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Remove confusing macros that hide the real functions namesJuergen Beisert2009-12-101-31/+33
| | | | | | | | | This feature is provided, to support more than u-boot-v2. But its more confusing than helpful. Remove it and do it straight forward like all other sources in this tree, too. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Use the native 'void' instead of 'Void_t'Juergen Beisert2009-12-101-29/+29
| | | | | | | We are in the *NIX world, so keep a 'void' as is. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Move private settings and configuration into the C sourceJuergen Beisert2009-12-101-1/+458
| | | | | | | | | | | Include the board config first to be able to configure the memory management in the documented way. If not used, the defaults are used. On the other hand, there is no need to pollute the other source files with these local management settings. So, move them from the header into the C source file. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Move variables to bssJuergen Beisert2009-12-101-4/+4
| | | | | | | | There is no need to init variables with 0. So, move them to the bss and let the C runtime does this job for us. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* introduce GENERIC_GPIO labelSascha Hauer2009-12-101-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clock.c: use USECOND and MSECONDMarc Kleine-Budde2009-12-031-2/+2
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove deadlock messageJuergen Beisert2009-11-191-0/+4
| | | | | | | | | | | | | | | | Any wrong or unknown command will result into the output: Unknown command '<some text>' - try 'help' If the command 'help' is disabled, this will end up in: Unknown command 'help' - try 'help' which is for blondes. Suppress the "try 'help'" for the case the 'help' command is disabled. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ENV_HANDLING requires CRC32Juergen Beisert2009-11-191-0/+1
| | | | | | | | ENV_HANDLUNG requires CRC32 to make the linker happy. Signed-off by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* list: remove duplicated list.hSascha Hauer2009-11-034-4/+4
| | | | | | | | We accidently have two list implementations in the tree: include/list.h and include/linux/list.h. This patch moves the latter (newer one) to include/linux/list.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* hush: remove include/hush.hSascha Hauer2009-10-221-1/+4
| | | | | | | 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>
* uboot_default_env: fix out of tree buildJean-Christophe PLAGNIOL-VILLARD2009-10-201-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* 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>