summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Select CMD_LOADENV with DEFAULT_ENVIRONMENTSanjeev Premi2012-02-071-0/+1
| | | | | | | | | | The environment isn't loaded until this command is is selected - even if compiled in. This patch makes the dependency explicit. Signed-off-by: Sanjeev Premi <premi@ti.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu/debug' into nextSascha Hauer2012-01-272-24/+35
|\
| * startup: use regular debug statements in initcall debuggingSascha Hauer2012-01-261-4/+3
| | | | | | | | | | | | | | | | Now that we don't need malloc for the console anymore it's safe to call printf anytime, so switch the initcall debugging to regular debug() statements.. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * initcalls: do not hang if an initcall failsSascha Hauer2012-01-261-4/+1
| | | | | | | | | | | | | | | | | | Currently we just hang when an initcall fails. This resulted in most initcalls just returning 0 unconditionally. Instead of hanging which usually leaves the user without a clue what happened just continue and hope for the best. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * console: make it work without mallocSascha Hauer2012-01-261-17/+32
| | | | | | | | | | | | | | | | This changes the dynamically allocated kfifos to statically initialized ones. This makes the console work without malloc and thus safe to be called before malloc is initialized. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | introduce barebox_bare_init_size to known the bare_init size and check itJean-Christophe PLAGNIOL-VILLARD2012-01-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | this allow to check we do not exceed the size of the SRAM as example introduce BAREBOX_MAX_BARE_INIT_SIZE the maximum size of bare_init this will allow your bare_init will fit in SRAM as example ARCH can overwrite it via ARCH_BAREBOX_MAX_BARE_INIT_SIZE Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | add config to check if the size of barebox exceed the target sizeJean-Christophe PLAGNIOL-VILLARD2012-01-171-0/+7
| | | | | | | | | | | | | | CONFIG_BAREBOX_MAX_IMAGE_SIZE will allow to detected silent oversize result Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | param: add config to disable itJean-Christophe PLAGNIOL-VILLARD2012-01-111-0/+2
| | | | | | | | | | | | this will allow to save 992 Bytes for TI xlaoder or AT91 bootstrap Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | filetype: add config to disable itJean-Christophe PLAGNIOL-VILLARD2012-01-112-1/+4
| | | | | | | | | | | | remove 160 bytes Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | banner: add config to disable itJean-Christophe PLAGNIOL-VILLARD2012-01-112-1/+5
| | | | | | | | | | | | this will allow to save 144 bytes Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | dummy_malloc: add calloc supportJean-Christophe PLAGNIOL-VILLARD2012-01-111-0/+12
|/ | | | | | | needed to use menu framework Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* poller_call: move from getc to is_timeoutJean-Christophe PLAGNIOL-VILLARD2012-01-042-2/+4
| | | | | | | | this will allow to always call poller_call even durring timeout and still the case in getc Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu/tlsf' into nextSascha Hauer2012-01-033-12/+85
|\
| * tlsf: remove unused stuff from tlsfbits.hSascha Hauer2011-12-231-0/+55
| | | | | | | | | | | | | | Also, as this file is locally used by the tlsf implementation, move this file to common. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * tlsf: implement malloc_statsSascha Hauer2011-12-231-2/+23
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * tlsf: enable assertionsSascha Hauer2011-12-231-10/+7
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | defaultenv: use a compressed version when embedded in bareboxJean-Christophe PLAGNIOL-VILLARD2012-01-023-3/+81
|/ | | | | | | | | | | | | | | | | | | enable it only if a compression is enabled support gzip, bzip2 and lzo you will be able to choose which compression to use -rw-r--r-- 1 root root 8436 Dec 15 01:35 barebox_default_env -rw-r--r-- 1 root root 2782 Dec 15 01:35 barebox_default_env.bz2 -rw-r--r-- 1 root root 2691 Dec 15 01:38 barebox_default_env.gz -rw-r--r-- 1 root root 3262 Dec 15 01:38 barebox_default_env.lzo with using gzip and the default env we can save 5.6KiB (5,745 bytes) with using bzip2 and the default env we can save 5.5KiB (5,654 bytes) with using lzo and the default env we can save 5.1KiB (5,174 bytes) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add tlsf-based malloc implementationAntony Pavlov2011-12-234-0/+91
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* adapt tlsf for bareboxAntony Pavlov2011-12-231-0/+11
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* import TLSF 2.0 from http://tlsf.baisoku.org/tlsf-2.0.zipAntony Pavlov2011-12-231-0/+961
| | | | | | | | | TLSF: Two Level Segregated Fit memory allocator implementation. Written by Matthew Conte (matt@baisoku.org). Public Domain, no restrictions. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* auto-completion: add auto-completion for path filesAlexander Aring2011-12-211-2/+68
| | | | | | | Add auto-completion for path files. Signed-off-by: Alexander Aring <a.aring@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move code now only used in mkimage to mkimageSascha Hauer2011-12-151-169/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove now unused uImage codeSascha Hauer2011-12-151-118/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reimplement uImage codeSascha Hauer2011-12-152-0/+506
| | | | | | | | | | | | | Provide a new API for accessing uImages which makes it easy for commands to open images, verify them, load to (free) sdram regions and show information about uImages. - We now do not load the image to malloced space anymore. - The data in the header is now stored in cpu native endianess after uimage_open which makes it easy to access the header data. - uImage can be loaded to dynamically allocated sdram regions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Add oftree detectionSascha Hauer2011-12-151-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* oftree: add of_fix_tree()Sascha Hauer2011-12-151-7/+15
| | | | | | | | | | Currently we have of_get_fixed_tree() which assumes that there is a global variable holding a oftree. This seems not very flexible, so for now introduce a of_fix_tree() which takes an fdt_header as argument and walks the list of registered of fixup functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove old ft_build supportSascha Hauer2011-12-143-625/+0
| | | | | | | This is unused now as its only user (ppc) is switched to libfdt based oftree support" Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix "no previous prototype for 'sbrk'" warningAntony Pavlov2011-12-091-0/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make dos partition support default yes if we have disk partition supportSascha Hauer2011-12-071-7/+3
| | | | | | | | | DOS partitions are the only partitions we handle at the moment and without it most MMC/SD enabled configs are useless, so make it default yes. Also, use 'depends on' instead of 'if' Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Juergen Beisert <jbe@pengutronix.de>
* ft_build: temporarily disable bootm oftree supportSascha Hauer2011-12-071-1/+2
| | | | | | | We do not have any command line parser support for bootm anymore. Disable it for now to at least be able to compile it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console_simple: fix compiler warningSascha Hauer2011-12-071-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* memory: do not try to reserve iomem on sandboxSascha Hauer2011-12-071-1/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'next'Sascha Hauer2011-12-0711-7/+554
|\
| * console: add console unregisteringRobert Jarzmik2011-12-052-6/+22
| | | | | | | | | | | | | | | | | | | | | | Some console are transient, like the USB connected serial console which should be removed when the USB connection is severed. Enable console removal for such devices. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * register sdram as resourcesSascha Hauer2011-12-041-0/+58
| | | | | | | | | | | | | | Also, request the sdram regions used by the barebox binary, bss, malloc space and stack. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * add resource management functionsSascha Hauer2011-12-032-0/+122
| | | | | | | | | | | | | | It is time to track our memory usage. Add a simple resource management. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * add file detection supportSascha Hauer2011-11-292-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several filetypes can be autodetected. Barebox could make use of this in several ways: - Add a command to detect filetypes - detect arm zImages and uImages to unify the different boot commands - maybe detect UBI or JFFS2 images to construct parts of the kernel command line - select correct uncompression function based on filetype This patch adds basic support to detect filetypes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bootm: fix various memory leaksSascha Hauer2011-11-291-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * introduce some env helpersSascha Hauer2011-11-291-0/+22
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * factor out iminfo commandSascha Hauer2011-11-291-1/+1
| | | | | | | | | | | | | | | | The rests of U-Boots iminfo command are sitting in commands/bootm.c and are in a nonusable state. Factor it out to its own file and make it work again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Merge branch 'work/magicvars' into nextSascha Hauer2011-11-291-0/+8
| |\
| | * hush: Add magicvarsSascha Hauer2011-11-291-0/+8
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Merge branch 'master' into nextSascha Hauer2011-11-293-11/+14
| |\| | | | | | | | | | | | | | | | | | | Conflicts: drivers/ata/disk_drive.c Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | DISK: Add common partition handling for disk like mediaJuergen Beisert2011-11-283-0/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | This covers disk like media like SD card, CF cards, regular hard disks and also USB mass storage devices. Most common used partition table is still of DOS type. This implementation is prepared to support more partition types in the future. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | fprintf: remove unused variableSascha Hauer2011-12-071-2/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | console_simple: Fix compilationSascha Hauer2011-12-071-2/+9
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Since fprintf and console_puts now return the number of character written the prototypes have changes. We forgot to fix console_simple which now fails to compile with: common/console_simple.c:48:6: error: conflicting types for 'fprintf' include/stdio.h:57:5: note: previous declaration of 'fprintf' was here common/console_simple.c:67:6: error: conflicting types for 'console_puts' include/stdio.h:20:5: note: previous declaration of 'console_puts' was here Fix this by returning the proper numbers of characters written. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | password: remove not used variable 'second'Jean-Christophe PLAGNIOL-VILLARD2011-11-221-2/+1
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'sent/assorted-fixes'Sascha Hauer2011-11-171-2/+1
|\ \
| * | export: do not fail on already exported variableSascha Hauer2011-11-091-2/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | fix fprintf prototype and return valueSascha Hauer2011-11-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | The puts functions now properly return the number of characters written. With this we can also fix fprintf. Also, remove never reached return in fputs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>