summaryrefslogtreecommitdiffstats
path: root/common/cmd_bmp.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove typedefs from bmp_layout.hSimon Glass2015-06-101-8/+8
| | | | | | | | | We try to avoid typedefs and these ones are easy enough to remove. Before changing this header in the next patch, remove the typedefs. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Joe Hershberger <joe.hershberger@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* Coding Style cleanup: replace leading SPACEs by TABsWolfgang Denk2013-10-141-3/+3
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Drop changes for PEP 4 following python tools] Signed-off-by: Tom Rini <trini@ti.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* video: consolidate splash screen alignment codeAnatolij Gustschin2013-07-081-0/+3
| | | | | | | | | | Code for checking "splashpos" environment variable is duplicated in drivers, move it to the common function. Call this function also in the bmp display command to consider "splashpos" settings. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
* lcd: align bmp header when uncopmressing imagePiotr Wilczek2013-07-011-14/+28
| | | | | | | | | | | | When compressed image is loaded, it must be decompressed to an aligned address + 2 to avoid unaligned access exception on some ARM platforms. Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Anatolij Gustschin <agust@denx.de> CC: Wolfgang Denk <wd@denx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video: Provide an API to access video parametersStefan Reinauer2012-11-061-3/+2
| | | | | | | | | | Create a basic API to provide access to video parameters such as screen size, and to position the cursor on the screen. Also add a prototype for video_display_bitmap() which was missing. Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* cmd_bmp.c: make bmp_display() usable by drivers or board codeAnatolij Gustschin2012-05-251-2/+1
| | | | | | | Currently bmp_display() is static and can not be used directly in the driver or board code. Export it for other users. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* Convert cmd_usage() calls in common to use a return valueSimon Glass2012-03-061-3/+3
| | | | | | | | | Change all files in common/ to use CMD_RET_USAGE instead of calling cmd_usage() directly. I'm not completely sure about this patch since the code since impact is small (100 byte or so on ARM) and it might need splitting into smaller patches. But for now here it is. Signed-off-by: Simon Glass <sjg@chromium.org>
* lcd: add clear and draw bitmap declarationChe-Liang Chiou2011-11-151-3/+1
| | | | | | | | | | The functions for clearing and drawing bitmaps on the screen were not exposed publicly and are made public in this patch in preparation for implementing the display interface of api_public.h. Signed-off-by: Che-Liang Chiou <clchiou@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* cmd_bmp.c: message about compressed formats is debug info only.Wolfgang Denk2011-02-091-1/+1
| | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de>
* Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOCWolfgang Denk2010-10-291-1/+1
| | | | | | | | | | | By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* ARM: add relocation supportHeiko Schocher2010-09-191-0/+6
| | | | | | | | | | | | | | | | | | | !! This breaks support for all arm boards !! To compile in old style, you must define CONFIG_SYS_ARM_WITHOUT_RELOC or you can compile with "CONFIG_SYS_ARM_WITHOUT_RELOC=1 ./MAKEALL board" !! This define will be removed soon, so convert your board to use relocation support Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> Fix boot from NAND for non-ARM systems Signed-off-by: Wolfgang Denk <wd@denx.de>
* cmd_usage(): simplify return code handlingWolfgang Denk2010-07-241-9/+5
| | | | | | | | | | | | | | | | Lots of code use this construct: cmd_usage(cmdtp); return 1; Change cmd_usage() let it return 1 - then we can replace all these ocurrances by return cmd_usage(cmdtp); This fixes a few places with incorrect return code handling, too. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* cmd_bmp.c: add standard subcommand handlingFrans Meulenbroeks2010-04-091-25/+56
| | | | | Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Acked-by: Detlev Zundel <dzu@denx.de>
* move prototypes for gunzip() and zunzip() to common.hWolfgang Wegner2009-12-211-2/+0
| | | | | | | | Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus repeated in every file using it. This patch moves the prototypes to common.h and removes all prototypes distributed anywhere else. Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
* video: move extern declarations from C to headersAlessandro Rubini2009-07-251-0/+1
| | | | | | | | | | | | | | | | This moves some extern declaration from lcd.c to lcd.h, removing unneeded ifdef around a pair of them. Additionally, since gunzip_bmp() was declared static in cmd_bmp.c but extern in lcd.c, I removed the static. The extra "#include <lcd.h>" in cmd_bmp.c is added to ensure the header is consistent with the source. This has been compile-tested on both ARM (at91 boards) and PowerPC (HH405_config, TQM823L_LCD_config, mcc200_config), to test all use combinations. Signed-off-by: Alessandro Rubini <rubini@gnudd.it> [agust@denx.de: removed gunzip_bmp() fixes as commit c01171ea did it] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* Remove static declaration from gunzip_bmp()Mark Jackson2009-07-231-2/+2
| | | | | | | | | This patch removes the static declaration from gunzip_bmp() Without it, the gunzip_bmp() function is not visible to common/lcd.c and fails to compile with an error. Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
* General help message cleanupWolfgang Denk2009-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of the help messages were not really helpful; for example, many commands that take no arguments would not print a correct synopsis line, but "No additional help available." which is not exactly wrong, but not helpful either. Commit ``Make "usage" messages more helpful.'' changed this partially. But it also became clear that lots of "Usage" and "Help" messages (fields "usage" and "help" in struct cmd_tbl_s respective) were actually redundant. This patch cleans this up - for example: Before: => help dtt dtt - Digital Thermometer and Thermostat Usage: dtt - Read temperature from digital thermometer and thermostat. After: => help dtt dtt - Read temperature from Digital Thermometer and Thermostat Usage: dtt Signed-off-by: Wolfgang Denk <wd@denx.de>
* Command usage cleanupPeter Tyser2009-01-281-1/+1
| | | | | | | | Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Standardize command usage messages with cmd_usage()Peter Tyser2009-01-281-2/+2
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-181-5/+5
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Fix compilation problem in common/cmd_bmp.cAnatolij Gustschin2008-01-121-1/+1
| | | | | | | common/cmd_bmp.c fails to compile if CONFIG_VIDEO_BMP_GZIP isn't defined. This patch fix this. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* cmd_bmp: Add support for displaying gzip compressed bmpsHans-Christian Egtvedt2008-01-091-49/+85
| | | | | | | | | | | | | The existing code can show information about a gzip compressed BMP image, but can't actually display it. Therefore, move the decompression code out of bmp_info() and use it in bmp_display() as well in order to display a compressed BMP image. Also, clean things up a bit and fix a memory leak while we're at it. [hskinnemoen@atmel.com: a bit of refactoring] Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* [BUILD] conditionally compile common/cmd_*.c in common/MakefileGrant Likely2007-11-201-4/+0
| | | | | | | Modify common/Makefile to conditionally compile the cmd_*.c files based on the board config. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* common/cmd_[af]*: Remove obsolete references to CONFIG_COMMANDS.Jon Loeliger2007-07-081-2/+2
| | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
* common/cmd_[a-f]* : Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-041-2/+2
| | | | | | | | | | | | | | This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
* Fix gzip bmp support (test if malloc fails, warning when truncated).Stefan Roese2005-10-081-0/+52
| | | | | Increase CFG_VIDEO_LOGO_MAX_SIZE on HH405 board. Patch by Stefan Roese, 08 Oct 2005
* * Clean up tools/bmp_logo.c to not add trailing white spacewdenk2004-10-091-0/+1
| | | | | | | * Patch by Hinko Kocevar, 21 Aug 2004: - Group common framebuffer functions in common/lcd.c - Group common framebuffer macros and #defines in include/lcd.h - Provide calc_fbsize() for video ATAG
* * Code cleanupwdenk2004-08-011-4/+5
| | | | | | | | | | | | | * Patch by Sascha Hauer, 28 Jun: - add generic support for Motorola i.MX architecture - add support for mx1ads, mx1fs2 and scb9328 boards * Patches by Marc Leeman, 23 Jul 2004: - Add define for the PCI/Memory Buffer Configuration Register - corrected comments in cpu/mpc824x/cpu_init.c * Add support for multiple serial interfaces (for example to allow modem dial-in / dial-out)
* * Patch by Pierre Aubert, 11 Mar 2004:wdenk2004-03-141-8/+20
| | | | | | | | | | | - add bitmap command and splash screen support in cfb console - add [optional] origin in the bitmap display command * Patch by Travis Sawyer, 11 Mar 2004: Fix ocotea board early init interrupt setup. * Patch by Thomas Viehweger, 11 Mar 2004: Remove redundand code; add PCI-specific bits to include/mpc8260.h
* Patch by Kenneth Johansson, 30 Jun 2003:wdenk2003-07-011-2/+2
| | | | get rid of MK_CMD_ENTRY macro; update doc/README.command
* * Patch by Seb James, 30 Jun 2003:wdenk2003-06-301-1/+1
| | | | | | | | | | Improve documentation of I2C configuration in README * Fix problems with previous log buffer "fixes" * Fix minor help text issues * "log append" did not append a newline
* Fix some missing commands, cleanup header fileswdenk2003-06-291-0/+7
| | | | (autoscript, bmp, bsp, fat, mmc, nand, portio, ...)
* Add files needed for bitmap load supportwdenk2003-04-201-0/+118
OpenPOWER on IntegriCloud