summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
...
| * | common/kallsyms.c: Fix sparse warningAlexander Shiyan2014-02-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | CHECK common/kallsyms.c common/kallsyms.c:170:12: warning: symbol 'kallsyms_lookup' was not declared. Should it be static? Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common: env: properly propagate error codeLucas Stach2014-02-101-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remove redundant NULL check on freeLucas Stach2014-02-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | free() already checks the pointer to be non NULL. No need to do it again. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Load PBL into SRAMDavid Vincent2014-02-091-1/+12
| |/ | | | | | | | | | | | | | | | | | | This allows to load all the lowlevel init code, including the uncompressor, inside SRAM and not just the bare init part. This is useful when pbl is used as a first-stage bootloader but is loaded by an external firmware. Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/gpio-keys'Sascha Hauer2014-03-072-11/+11
|\ \
| * | input: Add BB_ prefix to KEY_ definesSascha Hauer2014-02-172-11/+11
| | | | | | | | | | | | | | | | | | | | | Our KEY_ defines conflict with the standard Linux KEY_ defines, so add a BB_ prefix to them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | defaultenv: Add boot option for DFUSascha Hauer2014-02-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DFU is for device firmware upgrade, but for development purposes it's sometmes useful to just start a kernel vie DFU. This adds a boot option for doing this and also the corresponding counterpart on the host. With this it's possible to boot a system with: scripts/dfuboot.sh -k linuximage -d dtb -c "root=ubi0:root ubi.mtd=ubi rootfstype=ubifs ignore_loglevel" Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | defaultenv: Allow multiple defaultenvironment overlaysSascha Hauer2014-02-284-74/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can compile barebox for multiple boards at once, but currently they all share a single default environment. This patch adds a defaultenv_append() which boards can call to customize the default environment during runtime. Each board now generate default environment snippets using bbenv-y and add them during runtime with defaultenv_append() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | move defaultenv-2 to defaultenv/defaultenv-2-*Sascha Hauer2014-02-211-2/+2
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | move defaultenv-1 to defaultenv/defaultenv-1Sascha Hauer2014-02-211-1/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | defaultenv: Align defaultenv arraySascha Hauer2014-02-202-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default environment buffer is an unsigned char array and thus may be unaligned. Some decompression algorithms expect the buffer to be sufficiently aligned for u32 accesses. We make this sure by copying the default env to a temporary buffer. Instead of doing this just add a __aligned(4) to the default environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | environment: Add function to load envfs from bufferSascha Hauer2014-02-201-65/+116
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | environment: constify argumentsSascha Hauer2014-02-201-2/+2
| | | | | | | | | | | | | | | | | | | | | The directory arguments to envfs_load and envfs_save can be const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | filetype: Add detection for barebox environmentSascha Hauer2014-02-201-0/+4
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Kconfig: Select default compression typeSascha Hauer2014-02-193-31/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of asking explicitly for the default environment compression type ask for the in-barebox default compression type. This also adds a DEFAULT_COMPRESSION_SUFFIX make variable which can be used together with the wildcard rules for compressed files to generate compressed files without explicitly support each compression type. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | defaultenv: use wildcard compression rulesSascha Hauer2014-02-181-11/+0
| | | | | | | | | | | | | | | | | | Now that we have wildcard rules for compresed files use them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | defaultenv: simplify env dependenciesSascha Hauer2014-02-181-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finding out whether to rebuild the environment is a difficult task since we have to track all files in a directory. Instead of trying this, just rebuild the environment during every build and only if it differs to the last one overwrite the target. This way make only sees a change when the environment is changed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | common/Makefile: reorder targetsSascha Hauer2014-02-181-45/+42
|/ / | | | | | | | | | | | | Reorder targets alphabetically to make the file look nicer, no functional change. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / bootm: Return error when devicetree file is not a dtbSascha Hauer2014-02-131-0/+1
|/ | | | | | | We check whether the file passed as devicetree actually is a devicetree, but we missed to return an error if it's not. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/pxa'Sascha Hauer2014-02-031-4/+14
|\
| * reset_source: add reset_source_getSascha Hauer2014-01-291-0/+10
| | | | | | | | | | | | To get reset_source from C code, not only from shell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * reset_source: rename set_reset_source to reset_source_setSascha Hauer2014-01-291-4/+4
| | | | | | | | | | | | | | To get all reset source related functions into the same function namespace. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2014-02-035-8/+48
|\ \
| * | Make generated variables staticAlexander Shiyan2014-02-031-3/+3
| | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | env: make path arguments to envfs_load/save constSascha Hauer2014-01-271-2/+2
| | | | | | | | | | | | | | | | | | | | | These functions have no business changing the path argument, so make the argument const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: Fix wrong Kconfig dependencySascha Hauer2014-01-271-1/+1
| | | | | | | | | | | | | | | | | | DEFAULT_ENVIRONMENT needs ENV_HANDLING, not CMD_LOADENV. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: Use accessor functions for default environment pathSascha Hauer2014-01-272-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | default_environment_path only exists when CONFIG_ENV_HANDLING is enabled. Boards would have to #ifdef this if they wanted to use default_environment_path. Use accessor functions instead which can be ifdeffed on a single place. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | console: Set Linux console parameter automaticallySascha Hauer2014-01-221-1/+28
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux specifies the linux,stdout-path property in the /chosen node in the devicetree. Unfortunately this is ignored in most cases. For cases in which barebox uses this property for its own use we translate this into a Linux boot arg with: - the console name provided by the serial driver - the the instance from the 'serial' alias - the baudrate from the actual baudrate. So with this it's for devicetee enabled boards no longer necessary to manually assign a console= parameter. Should a user not want to use the automatically assigned parameter it should do: global.linux.bootargs.console= in the environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootm: introduce bootm_load_devicetree helperSascha Hauer2014-01-141-0/+63
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootm: introduce bootm_load_initrd helperSascha Hauer2014-01-141-0/+38
| | | | | | | | | | | | | | Make the bootm handlers simpler by factoring out an initrd load function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootm: introduce bootm_load_os helperSascha Hauer2014-01-101-9/+40
|/ | | | | | | | | | The common bootm code used to load uImage contents to SDRAM before calling into the handlers if possible. This makes the handlers complicated since they have to handle many cases. Instead, introduce a helper to load the os after the handlers have figured out a good load address. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/poller'Sascha Hauer2014-01-071-0/+58
|\
| * poller: Allow to call functions asynchronouslySascha Hauer2013-12-181-0/+58
| | | | | | | | | | | | | | | | | | Sometimes execution of a function has to be delayed, for example when a backlight can only be turned on when the picture has stabilized. To help in such situations add a convenience function around the poller stuff to call a function after a delay. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/omap-devicetree-prepare'Sascha Hauer2013-12-061-0/+34
|\ \
| * | ARM: OMAP: Make debug_ll UART Kconfig selectableSascha Hauer2013-11-221-0/+34
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2013-12-068-12/+106
|\ \ | | | | | | | | | | | | Conflicts: scripts/Makefile
| * | scripts: bareboxcrc32 as host and target userspacetoolMichael Grzeschik2013-12-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds the crc32 command to be build as host and optionally as target tool. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common Kconfig: disable unused options for SHELL_NONESascha Hauer2013-11-261-0/+2
| | | | | | | | | | | | | | | | | | Let commandline editing and long help depend on !SHELL_NONE. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common Kconfig: Add missing depends onSascha Hauer2013-11-261-5/+6
| | | | | | | | | | | | | | | | | | | | | CONFIG_MAXARGS is only used with the simple console support, so add a 'depends on'. While at it, move it below the shell selection. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | treewide: Add missing includesSascha Hauer2013-11-086-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | A lot of files rely on include/driver.h including include/of.h (and this including include/errno.h. include the files explicitly so we can eventually get rid of including of.h from driver.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | partitions: dos: parse extended partitionUwe Kleine-König2013-11-081-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | DOS MBRs might contain an extended partition that holds several logical partitions. Add these to the partitions of the block device. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | partitions: dos: don't open code get_unaligned_le32Uwe Kleine-König2013-11-081-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | partitions: dos: improve guess of disk sizeUwe Kleine-König2013-11-081-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code used to ineffectively take the end of the last partition as guess for the disk size. Better use the end of the partition that has its end rearmost. Also return an unsigned type instead of int as the result is always non-negative. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/hush'Sascha Hauer2013-12-061-81/+107
|\ \ \ | |_|/ |/| |
| * | hush: refactor reserved_word()Sascha Hauer2013-11-121-32/+32
| | | | | | | | | | | | | | | | | | Save indentation level for easier readability. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | hush: use standard ARRAY_SIZESascha Hauer2013-11-121-2/+4
| | | | | | | | | | | | | | | | | | Use standard ARRAY_SIZE instead of handcrafted NRES. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | hush: Be more informative on syntax errorSascha Hauer2013-11-121-3/+22
| | | | | | | | | | | | | | | | | | | | | Print the token that led to a syntax error, at least for the common case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | consolidate syntax() and syntax_err()Sascha Hauer2013-11-121-4/+3
| | | | | | | | | | | | | | | | | | syntax is defined as syntax_err. Drop syntax_err and call syntax instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | hush: rename __promptme to interruptSascha Hauer2013-11-121-10/+8
| | | | | | | | | | | | | | | | | | | | | the name '__promptme' does not make clear what the variable means. rename it to 'interrupt' which is set to true when the user has hit ctrl-c. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | hush: refactor file_get()Sascha Hauer2013-11-121-13/+15
| | | | | | | | | | | | | | | | | | Save indentation level by returning early. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>