summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* | | console: fix return values of puts functionsSascha Hauer2011-11-111-4/+10
| |/ |/| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | oftree: add fixup for memory nodesSascha Hauer2011-10-191-0/+80
| | | | | | | | | | | | | | | | Thanks to a common memory handling barebox knows the sdram banks and sizes, so we can add a common fixup functions for the nodes in the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | initial oftree command supportSascha Hauer2011-10-192-0/+313
| | | | | | | | | | | | | | | | | | | | | | This adds basic device tree command support. So far we can parse a flat device tree (-p), which also stores the tree in memory, dump it (-d) and free (-f) the internally stored tree. The chosen node can be updated with barebox bootargs, no other device tree manipulation is implemented yet. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | digest: factorise file digest to common/digest.cJean-Christophe PLAGNIOL-VILLARD2011-10-121-0/+101
|/ | | | | | | | | | rename it to digest_file_window introduce digest_file to digest a file and digest_file_by_name where we specify the algo by name Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image: move map_image amd unmap_image to image.cJean-Christophe PLAGNIOL-VILLARD2011-09-281-0/+121
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image: use data base addr for image_print_contents, image_multi_count/getimgJean-Christophe PLAGNIOL-VILLARD2011-09-281-16/+15
| | | | | | | | as in barebox the data could be the mapped file or a allocated memory with just the data (non header) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove EARLY_INIT and EARLY_CONSOLE supportSascha Hauer2011-09-274-81/+5
| | | | | | Bitrotted over time and nearly unused, so remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce generic memory bank handlingSascha Hauer2011-09-231-0/+18
| | | | | | | | | On arm we have the concept of memory banks which can be registered and iterated over. This is useful for other architectures aswell, so add some generic infrastructure for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename include/mem_malloc.h to include/memory.hSascha Hauer2011-09-232-2/+2
| | | | | | | Which is a better name and also better to collect other things. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add option LOCALVERSION to common/KconfigJan Weitzel2011-09-201-0/+9
| | | | | | | | Add Kconfig option LOCALVERSION so you can set a customizable suffix to the barebox version string. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/loads.c: make it compile againAntony Pavlov2011-08-231-0/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* put env_push_context into postcore_initcallSascha Hauer2011-08-171-1/+1
| | | | | | env_push_context only needs malloc, so initialize it earlier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: make console device a child of the hardware deviceSascha Hauer2011-08-151-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* login: add timeout supportJean-Christophe PLAGNIOL-VILLARD2011-08-111-39/+48
| | | | | | | | If a timeout is specified and expired the command will be executed by default boot Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove now unnecessary HAVE_MMU from KconfigSascha Hauer2011-08-031-4/+0
| | | | | | | MMU now can be enabled on every ARM board, so remove the dependency. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add option DEBUG_LL to common/KconfigAntony Pavlov2011-07-271-0/+10
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: move resource generic management to driver/base/resource.cJean-Christophe PLAGNIOL-VILLARD2011-07-212-47/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* add a add_mem_device functionSascha Hauer2011-07-183-13/+50
| | | | | | | | | | | Add a helper function for boards to register their memory devices. This makes the board code smaller and also helps getting rid of map_base and struct memory_platform_data. And switch all of the memory to it Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* startup.c: make DEBUG_LL output more usefulAntony Pavlov2011-07-181-1/+5
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'next'Sascha Hauer2011-07-061-0/+55
|\
| * shift and clocksourceCarlo Caione2011-06-221-0/+55
| | | | | | | | | | | | | | Added clocks_calc_mult_shift() Signed-off-by: Carlo Caione <carlo.caione@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>