summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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
| * of: Print model name in bannerSascha Hauer2012-10-091-2/+9
| | | | | | | | | | | | | | If we know the model name from the devicetree print this in the banner instead of the hardcoded board name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * memory: return error in barebox_add_memory_bankSascha Hauer2012-10-081-3/+5
| | | | | | | | | | | | | | | | When a memory bank is already registered, return an error code instead of throwing a bug. This can happen if a board has registered a memory bank and the same bank is then probed from the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2012-11-166-73/+79
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: commands/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment variables: use linux listSascha Hauer2012-10-302-62/+71
| | | | | | | | | | | | | | | | | | | | | | | | This switches environment variables to use linux list. This is easier to read. An additional plus is that the environment variables no longer need an initcall, so malloc is the only requirement for them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UIMAGE: improve transfer speedVicente Bergas2012-10-151-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common/partitions.c: make use of is_fat_or_mbrFranck Jullien2012-10-121-1/+2
| | | | | | | | | | | | | | | Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | startup: Print error message when initcall failsSascha Hauer2012-10-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a time when we used to panic when initcalls failed. Then it was changed to totally ignore the return value. Instead, print an error message now so that the user can get a clue when something bad happened. So initcalls are now recommended to actually return negative error codes when something fails. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | resource: statically initialize iomem resourceSascha Hauer2012-10-071-8/+2
| |/ | | | | | | | | | | | | This gets us rid of an initcall and also has the advantage that request_iomem_region can be called at any time now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2012-11-163-0/+154
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/boards/guf-neso/lowlevel.c arch/arm/boards/pcm038/lowlevel.c commands/Makefile
| * | Add in-system barebox update infrastructureSascha Hauer2012-10-173-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently in-system update means to write an arbitrary file to an arbitrary device. There is no sanity check if the flashed image is of the right type or will fit onto the device. Furthermore some SoCs need a special preparation step for their images before flashing them. This adds a barebox in-system update infrastructure. Boards can register update handlers which know how to make the board bootable. The available handlers can be listed to be able to select one, different force levels give the user the chance to know it better. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/filetype-command'Sascha Hauer2012-11-161-19/+32
|\ \ \
| * | | filetype: add shortnamesSascha Hauer2012-10-301-19/+32
| |/ / | | | | | | | | | | | | | | | | | | The filetype strings are not really suitable for shell scripts, so add a shortname array of filetypes usable for shell scripts. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/console'Sascha Hauer2012-11-163-35/+64
|\ \ \
| * | | console: display Switch to console [csxx] when switching from debug_ll to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | real console Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console: use debug_ll before the console is availableJean-Christophe PLAGNIOL-VILLARD2012-10-302-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow to have the same feature as earlyprintk in the kernel Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console/of: evaluate linux,stdout-path propertySascha Hauer2012-10-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a linux,stdout-path property is given in the devicetree activate the corresponding console. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console: cleanup KconfigSascha Hauer2012-10-091-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a choice for the CONSOLE_ACTIVATE_* variables, which is the natural way of specifying mutually exclusive variabled in Kconfig. Also update the help texts a bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console: Cleanup console activationSascha Hauer2012-10-091-25/+26
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_CONSOLE_ACTIVATE_ALL is set, the banner will never be printed. Also, the console buffer is emptied when the first console is registered, even when it's not enabled. This patch cleans it up in a way that: - the console buffer is emptied once the first console is activated, not when it's registered. - Make sure that the banner is printed first, so that we can output things to the buffer before the banner is printed without ending up in having the banner in the middle of the other boot messages. - Use IS_ENABLED rather than ifdefs Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/w1' into for-next/at91Sascha Hauer2012-11-151-5/+11
|\ \ \
| * | | clock: introduce non interruptible timeoutJean-Christophe PLAGNIOL-VILLARD2012-10-291-5/+11
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is_timeout call poller_call if the timeout is >= 100us but on 1-wire bus we need to wait 500us and not more than 930us for the bus reset. So if the poller_call is caller we can not guarantee it. So for this introduce is_non_interruptible_timeout than we only wait. Use it for ndelay too. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | command: return 1 on unknown commandSascha Hauer2012-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | hush now prints the error value if a command returns a value < 0, so do not return -1 (EPERM) when we encounter an unknown command. Instead, return 1 so that hush is quiet. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | uimage: Fix deleting of temporary fileSascha Hauer2012-10-301-2/+2
|/ / | | | | | | | | | | | | the uImage support may generate a temporary file which ought to be deleted after usage. Due to the wrong filename this never happened. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | defaultenv: dependencies fixesSascha Hauer2012-10-122-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a build with a compressed default environment is done and then environment compression is disabled, barebox_default_env.h is not regenerated because its dependency (now barebox_default_env) is still up to date. This results in a corrupt default environment. This patch fixes this by adding a cmd_env_h and changing barebox_default_env.h to FORCE. As a side effect barebox_default_env.h is no longer generated in include/generated/ but in common/ as we have to add barebox_default_env.h to $(targets) (extra-y). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | common/paritions.c: force little endian readsFranck Jullien2012-10-121-4/+4
|/ | | | | | | | When reading values from a DOS disk, we need to force a little endian reading. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+1
| | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'for-next/defaultenv-deps'Sascha Hauer2012-10-031-12/+20
|\
| * environment generation: Fix dependenciesSascha Hauer2012-09-281-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dependencies for generating the environment do not work properly: - If files are removed from the defaultenv, a subsequent make will not update the default environment. - If CONFIG_DEFAULT_ENVIRONMENT_PATH changes, the default environment also will not be regenerated. This patch fixes this by introducing a cmd_env which has the content of $(ENV_FILES) in the command so that the if_changed mechanism recognizes a change when $(ENV_FILE) changes. This also results in a nice " ENV " string in the build process. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * environment generation: remove unused CLEAN_FILESSascha Hauer2012-09-281-4/+0
| | | | | | | | | | | | | | The CLEAN_FILES in common/Makefile are unused. All generated files are removed from the toplevel Makefile. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arm-remove-arch-init-ll'Sascha Hauer2012-10-031-3/+0
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/include/asm/barebox-arm.h
| * | ARM: remove ARCH_HAS_LOWLEVEL_INITSascha Hauer2012-09-251-3/+0
| |/ | | | | | | | | | | | | | | This is unused now and not needed. We have a board_init_lowlevel. If a board needs some architecture setup it can always call it from its board_init_lowlevel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-0326-92/+0
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * | Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-1726-92/+0
| |/ | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/png'Sascha Hauer2012-10-031-0/+7
|\ \ | | | | | | | | | | | | | | | Conflicts: common/filetype.c include/filetype.h
| * | filetype: add PNG supportJean-Christophe PLAGNIOL-VILLARD2012-09-121-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | filetype: add BMP supportJean-Christophe PLAGNIOL-VILLARD2012-09-121-0/+3
| |/ | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/openrisc'Sascha Hauer2012-10-031-0/+2
|\ \
| * | Add OpenRISC Image typeFranck Jullien2012-09-141-0/+2
| |/ | | | | | | | | | | | | | | This patch sync the image type list with the kernel in order to add openrisc support. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/omap'Sascha Hauer2012-10-031-1/+1
|\ \ | | | | | | | | | | | | Conflicts: Makefile
| * | xload: get barebox size from barebox_arm_headJan Weitzel2012-09-071-1/+1
| |/ | | | | | | | | | | | | | | | | Add functions to read the barebox_arm_head, check barebox magicword and read out the barebox image size. Create a inital partion of 1Mb to access the barebox image on nand. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2012-10-034-21/+28
|\ \
| * | common: split out meminfo output and make it optionalJan Luebbe2012-09-064-21/+28
| |/ | | | | | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/fat-detection'Sascha Hauer2012-10-031-12/+56
|\ \
| * | filetype: Improve FAT detectionFranck Jullien2012-09-201-12/+56
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may have some disk with MBR as a first sector. In this case, the current FAT check returns an error. However, the FAT sector exist and the MBR can tell us where it is. This patch add to file_name_detect_type function the ability to find the FAT boot sector on the first sector of the first partition in case it is not on sector 0. It also introduce is_fat_or_mbr to check if a buffer is a FAT boot or MBR sector Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/boot-sequence-dhcp'Sascha Hauer2012-10-032-0/+11
|\ \ | | | | | | | | | | | | Conflicts: drivers/net/miidev.c
| * | defaultenv: enable glovalvar supportJean-Christophe PLAGNIOL-VILLARD2012-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | This will allow to do not have 2 set of var for defaultenv and the new defaultenv-2. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | globalvar: add support to set a value to of all globalvars beginning with ↵Jean-Christophe PLAGNIOL-VILLARD2012-09-141-0/+10
| |/ | | | | | | | | | | | | | | 'match' via c global_set_match and global -r Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>