summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* digest: introduce digest_{init/update/final/length}Jean-Christophe PLAGNIOL-VILLARD2015-03-121-13/+13
| | | | | | | | This will allow to move from a one at a time digest to a multi-instance with too much impact on the code using it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* digest: move digest.c to cryptoJean-Christophe PLAGNIOL-VILLARD2015-03-122-175/+0
| | | | | | | with not the rest of the implementation Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: let pbl-console depend on !CONSOLE_NONELucas Stach2015-03-111-0/+1
| | | | | | | | | | | | | | | It doesn't make much sense to have a console in the pbl but not in the main barebox binary. Fixes: pbl/console.c:34:5: error: redefinition of 'ctrlc' include/stdio.h:60:19: note: previous definition of 'ctrlc' was here pbl/console.c:39:6: error: redefinition of 'console_putc' include/stdio.h:49:20: note: previous definition of 'console_putc' was here Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2015-03-091-1/+3
|\
| * bbu: make bbu confirm a bit more verboseLucas Stach2015-03-041-1/+3
| | | | | | | | | | | | | | It is a lot more user friendly if we give a bit more feedback. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-03-096-14/+66
|\ \
| * | environment: envfs_{load, save}: add possibility to call with filename and ↵Marc Kleine-Budde2015-03-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | dirname == NULL This patch moves fallback to default into the envfs_{load,save} functions. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | console: Make locally used function staticSascha Hauer2015-03-041-1/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | menu: depend on !CONFIG_SHELL_NONELucas Stach2015-03-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make much sense to have the menuframework but no shell. Fixes: In function `menu_action_command': undefined reference to `run_command' Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM/mem: handle data aborts gracefully for mdJan Luebbe2015-02-271-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes memory ranges contain inaccessible registers which trigger a data abort when accessed. To handle this gracefully, we extend the data abort exception handler to ignore the exception when configured to do so. This allows detecting inaccessible memory from the md command. It will show XX for unreadable bytes instead. The previous behaviour: barebox@TI AM335x BeagleBone:/ md 0x50000000 unable to handle paging request at address 0x500000ac pc : [<8fe2e0dc>] lr : [<8fe2e0b9>] sp : 8ffff898 ip : 00000024 fp : 00000000 r10: 8bfa0204 r9 : 00000000 r8 : 8bfa0204 r7 : 00000100 r6 : 50000000 r5 : 8bfa0204 r4 : 00000004 r3 : 00000f00 r2 : 000000ac r1 : 00000004 r0 : 00000014 Flags: nZCv IRQs off FIQs on Mode SVC_32 [<8fe2e0dc>] (memcpy_sz+0x40/0x48) from [<8fe2f337>] (mem_read+0x3b/0x48) [<8fe2f337>] (mem_read+0x3b/0x48) from [<8fe2bb13>] (cdev_read+0x25/0x2e) [<8fe2bb13>] (cdev_read+0x25/0x2e) from [<8fe2c15b>] (devfs_read+0x1b/0x1e) [<8fe2c15b>] (devfs_read+0x1b/0x1e) from [<8fe2df5b>] (__read+0x43/0x5c) [<8fe2df5b>] (__read+0x43/0x5c) from [<8fe2e61f>] (read+0x2b/0x48) [<8fe2e61f>] (read+0x2b/0x48) from [<8fe1e4a5>] (do_mem_md+0xc1/0x144) [<8fe1e4a5>] (do_mem_md+0xc1/0x144) from [<8fe02889>] (execute_command+0x21/0x48) [<8fe02889>] (execute_command+0x21/0x48) from [<8fe061c1>] (run_list_real+0x549/0x634) [<8fe061c1>] (run_list_real+0x549/0x634) from [<8fe05b43>] (parse_stream_outer+0xdb/0x174) [<8fe05b43>] (parse_stream_outer+0xdb/0x174) from [<8fe06435>] (run_shell+0x29/0x54) [<8fe06435>] (run_shell+0x29/0x54) from [<8fe02889>] (execute_command+0x21/0x48) [<8fe02889>] (execute_command+0x21/0x48) from [<8fe061c1>] (run_list_real+0x549/0x634) [<8fe061c1>] (run_list_real+0x549/0x634) from [<8fe05efb>] (run_list_real+0x283/0x634) [<8fe31e1d>] (unwind_backtrace+0x1/0x64) from [<8fe24e61>] (panic+0x1d/0x34) [<8fe24e61>] (panic+0x1d/0x34) from [<8fe322c1>] (do_exception+0xd/0x10) [<8fe322c1>] (do_exception+0xd/0x10) from [<8fe32329>] (do_data_abort+0x21/0x2c) [<8fe32329>] (do_data_abort+0x21/0x2c) from [<8fe31fe8>] (data_abort+0x48/0x60) The new behaviour: barebox@TI AM335x BeagleBone:/ md 0x50000000 50000000: 00000060 00000000 00000000 00000000 `............... 50000010: 00000000 00000001 00000000 00000000 ................ 50000020: 00000000 00000000 00000000 00000000 ................ 50000030: 00000000 00000000 00000000 00000000 ................ 50000040: 00001ff0 400000ac 00000211 00000000 .......@........ 50000050: 00000a00 00000001 00000000 00000000 ................ 50000060: 00000000 00101001 22060514 10057016 ...........".p.. 50000070: 010f1111 8f070000 00000f40 00000000 ........@....... 50000080: 00000000 00000000 00000000 00000000 ................ 50000090: 00001000 00101001 22060514 10057016 ...........".p.. 500000a0: 010f1111 8f070000 00000f00 XXXXXXXX ................ 500000b0: XXXXXXXX XXXXXXXX 00000000 00000000 ................ 500000c0: 00001000 00101001 22060514 10057016 ...........".p.. 500000d0: 010f1111 8f070000 00000f00 XXXXXXXX ................ 500000e0: XXXXXXXX XXXXXXXX 00000000 00000000 ................ 500000f0: 00001000 00101001 22060514 10057016 ...........".p.. The current implementation breaks everything except ARM and takes several shortcuts which need to be implemented more cleanly. Suggestions are very welcome! Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common/bootargs: add blkdevparts variablesHubert Feurstein2015-02-171-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel command line option blkdevparts works like mtdparts, but for all block devices. So it can be used for eMMC devices without the need of a traditional partition table. Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | imd: provide dummy imd_command_setenvLucas Stach2015-02-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CONFIG_CMD_IMD is not set there is no imd_command_setenv in the barebox binary that can be linked to. Although the whole imd infrastructure will be removed by the linker later in the build process as soon as it figures out that nothing inside barebox is using it, we still have to provide a dummy function to keep the build going. Fixes: In function `imd_command': undefined reference to `imd_command_setenv' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/arm'Sascha Hauer2015-03-091-0/+15
|\ \ \
| * | | ARM: Rockchip: Add DEBUG_LL based on mach-socfpgaAndrey Panov2015-02-131-0/+15
| |/ / | | | | | | | | | | | | Signed-off-by: Andrey Panov <rockford@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/am335x'Sascha Hauer2015-03-061-2/+3
|\ \ \ | |_|/ |/| |
| * | reset_source: Add external resetWadim Egorov2015-03-021-0/+1
| | | | | | | | | | | | | | | | | | | | | Some SoCs have special device pins for external reset signals. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | reset_source: make safe to call earlierSascha Hauer2015-03-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | reset_source_init used to set the reset source to unknown in a coredevice_initcall. This means if reset_source_set() has been called earlier the value would have been overwritten. Fix this by calling globalvar_add_simple() each time reset_source_set() is called. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | environment: Do not remove base env directorySascha Hauer2015-02-191-0/+3
| |/ |/| | | | | | | | | | | When removing empty directories do not remove the base directory. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | blspec: put blspec bootargs into a .dyn bootargs variableSascha Hauer2015-02-101-1/+1
|/ | | | | | So that they get deleted later when something else is booted. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mxs'Sascha Hauer2015-02-041-0/+1
|\
| * pbl: Add support for memory_displaySascha Hauer2015-01-281-0/+1
| | | | | | | | | | | | | | The PBL has console support now, so add memory_display support aswell which can be a good debugging aid. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-02-041-1/+1
|\ \
| * | console: allow to specify the device idJean-Christophe PLAGNIOL-VILLARD2015-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | so we can use dynamic number id with specific devname Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Fix spelling: pathes -> pathsWadim Egorov2015-01-282-4/+4
| |/ |/| | | | | | | Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | common: console_console: put functions under correct ifdefLucas Stach2015-01-191-35/+35
|/ | | | | | | | | | So they aren't build when no console support is selected. Fixes: In function `console_get_by_dev': undefined reference to `console_list' Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/netconsole'Sascha Hauer2015-01-091-0/+7
|\
| * console: Add set_active callbackSascha Hauer2014-12-171-0/+7
| | | | | | | | | | | | | | | | The netconsole needs to be able to deny activation when the network has not been enabled. Add an optional callback to the console for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mxs'Sascha Hauer2015-01-094-1/+42
|\ \
| * | console: Make sure xzalloc is only used when it's availableSascha Hauer2015-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | To make it possible to call the pr_* functions very early before malloc is initialized test if malloc is available before using it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | malloc: Add a function to detect if malloc pool is already initializedSascha Hauer2015-01-051-0/+8
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add PBL console supportSascha Hauer2015-01-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds simple console support to the PBL which makes it possible to print more complex messages in the PBL than just strings or hex numbers. For now puts_ll is used to print the messages, so it depends on CONFIG_DEBUG_LL which makes it more a debugging option. However, this could be extended later to get regular output from the PBL if desired. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | printf: move panic() to common/misc.cSascha Hauer2015-01-051-0/+22
| |/ | | | | | | | | | | | | | | panic() is not really a printf like function, so move it to common/misc.c. This is done because we want to have printf support in the PBL, but PBL has it's own panic() implementation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-01-092-3/+19
|\ \
| * | sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clock: incorporate dummy clocksource into core clock codeAntony Pavlov2014-12-171-2/+18
| |/ | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/efi'Sascha Hauer2015-01-092-0/+21
|\ \ | |/ |/|
| * efi: mount efivarfs by default if enabledLucas Stach2014-12-091-0/+6
| | | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * efi: add function to determine type of device pathLucas Stach2014-12-091-0/+15
| | | | | | | | | | | | | | | | | | Thanks to the wonders of UEFI we have to walk down the device path all the way until we arrive at the device we got this path from... Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | blspec: print error when devicetree not foundSascha Hauer2014-12-161-0/+1
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/randconfig-1'Sascha Hauer2014-12-081-1/+1
|\
| * Kconfig: make BROKEN invisibleSascha Hauer2014-11-281-1/+0
| | | | | | | | | | | | | | | | BROKEN is a developer option to keep things in the tree we know are broken. Make this option invisible so that randconfig builds do not enable it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: Let MMU depend on !CPU_ARM946ESascha Hauer2014-11-281-0/+1
| | | | | | | | | | | | | | CPU_ARM946E is selected by boards, so letting it depend on !MMU leads to broken dependencies. Let MMU depend on !CPU_ARM946E instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/persistent-vars'Sascha Hauer2014-12-084-78/+360
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/config
| * | defaultenv-2: Make use of nonvolatile variablesSascha Hauer2014-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the variable assignments previously done in /env/config-board to non volatile variables in /env/nv/. This makes the settings adjustable by the user without editing a file. Most of the changes are simple conversions which for many boards makes /env/config-board unnecessary. Some boards had some logic to assign global.boot.default based on the current bootsource. This has been moved to /env/init/bootsource. An additional check is added to not overwrite a nv.boot.default should it exist. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | globalvar: Add support for printing all global variablesSascha Hauer2014-11-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This could previously only be done with 'devinfo global'. While this is still possible this adds a more direct access via the globalvar command. This variant also adds a '*' in front of the variable if the corresponding non volatile variable exists. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add support for non volatile variablesSascha Hauer2014-11-063-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds (back) support for non volatile variables. Non volatile variables are variables which are stored in the environment over reboot. They are used in the same way as the global variables, but with a 'nv' command and device. The variables are stored under /env/nv/, one variable per file. Adding a nv variable automatically adds a global variable with the same name. Changing a nv variable also changes the same global variable, but not the other way round. This allows for example to configure the username as: nv user=sha; saveenv Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: Only save changes to the defaultenvSascha Hauer2014-11-062-14/+108
| | | | | | | | | | | | | | | | | | | | | Instead of storing the complete files with a 'saveenv' command only store the files that have changes to the default environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: refactor saveenvSascha Hauer2014-11-061-68/+75
| | | | | | | | | | | | | | | | | | | | | | | | Collect all files in a list first and iterate over the list when creating the actual environment image. Makes the next patches easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: remove unused variableSascha Hauer2014-11-051-1/+0
| | | | | | | | | | | | | | | | | | fd is unused, remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: drop unnecessary castsSascha Hauer2014-11-051-6/+6
| | | | | | | | | | | | | | | | | | No Need to cast void pointers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>