summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* menu: fix remove superfluous newline: change puts() -> printf("%s", )Fabio Porcedda2013-02-261-1/+1
| | | | | | | | | | | | Fix previous commit: 638f91b "fix compiler warnings: use puts() instead of printf()". Because puts() function add a newline, use instead printf("%s", ). Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix compiler warnings: use puts() instead of printf()Fabio Porcedda2013-02-211-1/+1
| | | | | | | | | | | | | | | | Use puts() because printf() isn't necessary, to fix the following compiler warnings: /barebox/common/menu.c: In function ‘menu_show’: /barebox/common/menu.c:277:4: warning: format not a string literal and no format arguments [-Wformat-security] /barebox/scripts/omap4_usbboot.c: In function ‘read_asic_id’: /barebox/scripts/omap4_usbboot.c:101:3: warning: format not a string literal and no format arguments [-Wformat-security] Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Vicente <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add warning above get_ram_sizeSascha Hauer2013-02-131-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Enable mmu earlySascha Hauer2013-02-041-0/+9
| | | | | | | | | This optionally enabled the MMU in the PBL or during early startup for the non PBL case. The regular MMU init code will pickup the already enabled MMU later. This might complicate debugging early code, so this has been made optional. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Setup stack at end of SDRAMSascha Hauer2013-02-041-5/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: remove now unused MACH_[HAS|DO]_LOWLEVEL_INITSascha Hauer2013-02-041-12/+0
| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'for-next/pbl'Sascha Hauer2013-02-041-41/+1
|\
| * pbl: move configs to pbl/KconfigJean-Christophe PLAGNIOL-VILLARD2013-01-301-41/+1
| | | | | | | | | | | | | | so it more easy to add new entry and to maintain Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/oftree'Sascha Hauer2013-02-041-8/+51
|\ \ | | | | | | | | | | | | Conflicts: drivers/of/base.c
| * | oftree command: refactorSascha Hauer2013-01-191-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has several improvements for the oftree command: - loading a devicetree (-l) and actually probing (-p) it now is separated - the command now can dump the internal devicetree or a dtb given on the command line. - The -f option now actually frees the internal devicetree With this the usage pattern for this command is: oftree -l /env/oftree oftree -d -n /sound oftree -d /env/oftree oftree -f oftree -p oftree -l -p /env/oftree Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: remove unused barebox_fdtSascha Hauer2013-01-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | barebox_fdt should once become the pointer to the barebox internal devicetree. Since barebox has its own internal devicetree format this was never used. remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: make of_get_fixed_tree more universally usableSascha Hauer2013-01-111-5/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the bootm code uses of_fix_tree to apply the fixups to the devicetree given on the command line. This function assumes that there is enough space for the fixups available. Also on ARM we have to make sure the tree does not cross 1Mib boundaries. This patch moves the space allocation and alignment ensurance to of_get_fixed_tree and uses it in bootm. This is the first step for making of_get_fixed_tree the single point of devicetree handling in barebox. of_get_fixed_tree now takes an argument of the input fdt. If it is given, this one is used, otherwise an internal oftree is used which will be created in subsequent patches. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2013-02-044-7/+62
|\ \ \
| * | | introduce console none supportJean-Christophe PLAGNIOL-VILLARD2013-01-233-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this will allow to have no console support Use full for bootstrap as we can save 6.5 KiB (barebox.bin) and 3.8 KiB (zbarebox.bin lzo) on at91sam9263 as example vs console simple As on bootstrap we have often very limited size. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console: switch select to choiceJean-Christophe PLAGNIOL-VILLARD2013-01-231-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | so we can add easly the console_none support Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | barebox-data: add barebox-data sectionsAlexander Aring2013-01-181-0/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | Add barebox-data section in arm branch to get complete barebox regions in sdram regions tree. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/compile-log-level'Sascha Hauer2013-02-047-20/+47
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: drivers/usb/host/ehci-hcd.c
| * | | introduce compile time loglevelSascha Hauer2013-01-271-0/+16
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | treewide: fix format specifiersSascha Hauer2013-01-276-20/+31
| |/ / | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | menu: the dependancy on process escape is wrong drop itJean-Christophe PLAGNIOL-VILLARD2013-01-311-1/+0
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | filetype: add is_barebox_mips_head supportJean-Christophe PLAGNIOL-VILLARD2013-01-221-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | filetype: Make buf in file_detect_type constSascha Hauer2013-01-201-5/+5
| | | | | | | | | | | | | | | | | | This function has no business changing the buffer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | defaultenv loading: rework to use less ifdefs/definesSascha Hauer2013-01-201-18/+22
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | startup: add __noreturn to start_bareboxSascha Hauer2013-01-201-2/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | startup: Use IS_ENABLED for loading environmentSascha Hauer2013-01-201-9/+11
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | startup: use IS_ENABLED instead of ifdefSascha Hauer2013-01-201-9/+8
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | move prototypes for envfs_* to envfs.hSascha Hauer2013-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | environment.h is for environment variables, not for the environment storage (envfs), so move the prototypes to envfs.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | make file_*_action staticSascha Hauer2013-01-201-2/+2
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | move struct action_data to the only file using itSascha Hauer2013-01-201-0/+7
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | startup: call a barebox_main function pointer at the end of the startupSascha Hauer2013-01-202-7/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently Kconfig dependencies are used to allow non-interactive builds. This leads to problems in Kconfig getting the dependencies right. This patch adds a barebox_main function pointer which is called at the end of the startup process. This defaults to run_shell when a shell is enabled. With this the HAVE_NOSHELL Kconfig variable can be removed. Non interactive builds can now be enabled for every board allowing to compile a binary without further Kconfig dependencies. This also allows for more flexibility, for example boards may decide to try non-interactive startup first and call run_shell if that fails. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | meminfo: fix display of allocated addressesAlexander Aring2013-01-141-3/+3
| | | | | | | | | | | | | | Fix display to stdout of allocated addresses. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | memory: fix size address calculationAlexander Aring2013-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix size address calculation. Global variables from <asm/sections.h> which are defined in linker script *.lds files for end addresses has already a +1 calculation. For example: stext = 0x100 with a size about 0x50 will result a etext = 0x150. In this case a correct size calculation is (etext - stext) = 0x50. In function 'request_sdram_region' the end address will be calculated with (start + size - 1) which result a correct end address of 0x149 in this example. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | meminfo: fix missing includeAlexander Aring2013-01-141-0/+1
|/ | | | | | | | Fix include for linkerscript variables like _etext. Otherwise build with #define DEBUG will fail. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers/base: fix corrupt device treeSascha Hauer2012-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_add_child is a very unsafe function. If called multiple times it allows setting the same device to different parents thus corrupting the siblings list. This happens regularly since: | commit c2e568d19c5c34a05a1002d25280bf113b72b752 | Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | Date: Sat Nov 3 16:11:05 2012 +0100 | | bus: add bus device | | automatically add it as parent of any bus device if none already specified | | we have now a nice output per bus If for example a FATfs is mounted this nice output per bus often ends with: > `---- fat0 > `---- 0 > `---- 0x86f0000087020031-0x86f000410df27124: /dev/<NULL> > `---- sram00 > `---- 0x00000000-0xffffffffffffffff: /dev/<NULL> > `---- 0x00000000-0xffffffffffffffff: /dev/<NULL> > unable to handle NULL pointer dereference at address 0x0000000c > pc : [<87f08a20>] lr : [<87f08a04>] > sp : 86eff8c0 ip : 87f3fbde fp : ffffffff > r10: ffffffff r9 : 00000000 r8 : 00000003 > r7 : 86f075b8 r6 : 00000002 r5 : ffffffec r4 : 86f07544 > r3 : 00000000 r2 : 43f900b4 r1 : 00000020 r0 : 00000005 > Flags: Nzcv IRQs off FIQs off Mode SVC_32 > [<87f08a20>] (do_devinfo_subtree+0x90/0x130) from [<87f08a90>] (do_devinfo_subtree+0x100/0x130) > > [<87f3e070>] (unwind_backtrace+0x0/0x90) from [<87f28514>] (panic+0x28/0x3c) > [<87f28514>] (panic+0x28/0x3c) from [<87f3e4b8>] (do_exception+0x10/0x14) > [<87f3e4b8>] (do_exception+0x10/0x14) from [<87f3e544>] (do_data_abort+0x2c/0x38) > [<87f3e544>] (do_data_abort+0x2c/0x38) from [<87f3e268>] (data_abort+0x48/0x60) This patch fixes this by adding a device to its parents children list in register_device so that dev_add_child is no longer needed. This function is removed from the tree. Now callers of register_device have to clearly set the parent *before* registering a device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Jan Lübbe <jlu@pengutronix.de>
* Merge branch 'kconfig'Sascha Hauer2012-12-081-8/+8
|\
| * Cleanup Kconfig filesAlexander Shiyan2012-12-081-8/+8
| | | | | | | | | | | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format, removing extraneous lines and spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/tftp'Sascha Hauer2012-12-071-24/+0
|\ \
| * | uimage: fix misunderstanding in common/uimage.cVicente Bergas2012-11-261-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The option of reading the file at once was discarded because the option of increasing the buffer size provided almost the same benefit. Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2012-12-071-5/+8
|\ \ \
| * | | password: fixed underflow on <backspace>Enrico Scholz2012-12-051-5/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | due to missing/misplaced boundary check, deleting characters could underflow the password buffer. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2012-12-071-0/+2
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: arch/arm/mach-imx/include/mach/devices-imx53.h
| * | | debug_ll: Add some usage commentsSascha Hauer2012-12-051-0/+2
| | |/ | |/| | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/ext4'Sascha Hauer2012-12-072-13/+36
|\ \ \
| * | | add ext fs detection supportSascha Hauer2012-12-031-0/+8
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | filetype: Pass bufsizeSascha Hauer2012-12-032-13/+28
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the buffer size to the file detection code. This makes sure we do not read past the buffer. This is especially useful for ext filesystem detection as the magic is at byte offset 1080. Also introduce a FILE_TYPE_SAFE_BUFSIZE define which is set to the minimum bufsize the detection code needs to detect all known filetypes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/commands'Sascha Hauer2012-12-072-4/+12
|\ \ \ | |/ / |/| |
| * | loadenv: allow more fine grained environment loadingSascha Hauer2012-11-292-4/+12
| |/ | | | | | | | | | | | | | | | | | | | | This implements two new options for the loadenv command: -s: removes (scrubs) old directory contents to be able to create a fresh environment from for example /dev/defaultenv -n: no overwrite. Do not overwrite existing files. This allows to keep parts of the old environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / barebox update: fix finding default handlerSascha Hauer2012-12-031-5/+8
|/ | | | | | | It was not possible to register another handler when already a default handler is registered. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* uimage: improve transfer speedVicente2012-11-161-2/+25
| | | | | Signed-off-by: Vicente <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/of'Sascha Hauer2012-11-162-5/+14
|\ | | | | | | | | | | Conflicts: drivers/of/base.c include/of.h