9
0
Fork 0
Commit Graph

12822 Commits

Author SHA1 Message Date
Sascha Hauer ac2407db7a crypto: digest: Make string arguments const
Most string arguments for keys and filenames can be const. Change
that.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-13 08:32:28 +01:00
Jean-Christophe PLAGNIOL-VILLARD 102d59f91f command: add hmac sum supportfor md5, sha1, sha224, sha256, sha384, sha512
pass the key via -h param

barebox@barebox sandbox:/ sha256sum -h test /dev/fd0
c297473e9bb221c5dc51d47ad75c76095f1bdc4ca9dff1d5931c2e22bf11a0de  /dev/fd0 0x00000000 ... 0xffffffffffffffff

use the same idea as openssl command

$ openssl dgst -sha256 -hmac "test" TODO
HMAC-SHA256(TODO)= c297473e9bb221c5dc51d47ad75c76095f1bdc4ca9dff1d5931c2e22bf11a0de

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-13 08:32:28 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2f3c3f512b digest: add HMAC support for md5, sha1, sha224, sha256, sha384, sha512
the hmac algo will be registered as hmac(%s) such as hmac(sha256)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-13 08:32:28 +01:00
Sascha Hauer 5dd5884801 lib: Add hex2bin and bin2hex implementations
Taken from the Kernel, put into the same place as in the kernel,
although the hexdump.c does not actually contain hexdum functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-13 08:22:27 +01:00
Teresa Gámez 24b4a5d2fd ARM: phytec-som-am335x: Remove bootargs-ip from boot scripts
We do not pass the ip to kernel any more. So remove adding
it to bootargs when booting from nand, mmc or spi nor.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-13 06:45:06 +01:00
Sascha Hauer 08a50cd306 clk: clk-divider: fix _get_maxdiv for table based divider
The divider lacks the code for calculating the maximum divider for table
based dividers. Add it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-12 12:01:17 +01:00
Bo Shen 510a3b54ea ARM: atmel: sama5d4_xplained: switch to env2
Switch sama5d4 xplained board to use default environment 2.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-12 08:30:49 +01:00
Sascha Hauer 1487e6b9ad state: add framework for persistent state handling
This patch adds a framework to describe, access, store and restore a set of
variables. A state variable set can be fully described in a devicetree node.
This node could be part of the regular devicetree blob or it could be an extra
devicetree solely for the state. The state variable set contains variables of
different types and a place to store the variable set.

For more information see:
    Documentation/devicetree/bindings/barebox/barebox,state.rst

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-12 08:28:31 +01:00
Jean-Christophe PLAGNIOL-VILLARD dcc4a70a3c gitignore: only ignore include/config.h
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-12 08:18:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3a43692412 password: add support for sha512
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-12 07:58:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2505dd9b41 command: add sha384sum and sha512sum support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-12 07:58:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5149be813f crypto: add sha384 & sha512 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-12 07:58:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 27b2336029 digest: make it multi-instance
Now you need to call digest_alloc and when you finish to use it digest_free.

We need this for upcomming aes encryption support and secure boot
as we will need multiple instance of the same digest.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-12 07:58:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 804fae5d16 digest: introduce digest_{init/update/final/length}
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>
2015-03-12 07:58:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1ac61317c6 digest: move digest.c to crypto
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>
2015-03-12 07:58:24 +01:00
Lucas Stach 3c5e8206c2 parameter: include header for ERR_PTR and errno
Commit 03b59bdb64 (paramter: The dev_add_param_*() return ERR_PTR(),
change no-ops to return ERR_PTR(-ENOSYS) instead of NULL) started using
ERR_PTR and errnos without including the relevant header.

This fixes the build for a lot of configurations.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-11 09:36:38 +01:00
Lucas Stach 73c23eec0e ARM: radxa-rock: select options for regulator
Fixes the build with a minimal config while maintaining
functionality of the board.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-11 09:36:26 +01:00
Lucas Stach 2084bface2 ARM: zynq: zedboard: don't select serial
Selecting the serial driver breaks the build with CONFIG_SERIAL_NONE.
Move it to the defconfig of the board instead, like we do on other
boards.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-11 09:36:26 +01:00
Lucas Stach 0ca1bc43e8 ARM: versatile: provide clk_set_rate stub
Some drivers depend on this symbol and this fixes a failure
to link them.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-11 09:36:26 +01:00
Lucas Stach 444e04ff90 pbl: let pbl-console depend on !CONSOLE_NONE
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>
2015-03-11 09:36:25 +01:00
Jan Luebbe a1a5a21298 Documentation: handle missing group declaration
Use group 'misc' as a default and print a warning.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
2015-03-10 15:04:23 +01:00
Marc Kleine-Budde 03b59bdb64 paramter: The dev_add_param_*() return ERR_PTR(), change no-ops to return ERR_PTR(-ENOSYS) instead of NULL
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-10 11:08:23 +01:00
Lucas Stach a5b9eb1ceb images: fix Tegra out-of-tree build
The BCTs are build objects and as such are located in the objtree instead of
the srctree. Fix out-of-tree build by defining a variable which refers to the
board directories in the objtree and use it for Tegra.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 11:52:58 +01:00
Lucas Stach 2a2522eb8d images: move board variable to parent makefile
A lot of the image makefiles define an equal board variable, which
gives the impression that this variable is unique for this makefile.
As those files aren't freestanding makefiles but get included into a
parent makefile this is not actually true. Attempts to override this
variable will not work reliable as make is picking up a random instance.

Fix this confusion by moving this variable out of the individual makefiles.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 11:52:58 +01:00
Sascha Hauer 60a4277b3e Use linux.bootargs.console for specifying the console
Use linux.bootargs.console to specify the console since this
is the variable the console code uses for automatically assigning
a console.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 11:47:34 +01:00
Teresa Gámez 3d77abfe88 ARM: phycore-am335x-som: Fix boards with no SPI
Boards like phyBOARD-WEGA-rdk do not have SPI Flash.
The compatible string was not updated when merging all phytec
am335x SOMs to one board file.
Updating this now.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 11:41:26 +01:00
Andrey Panov 2d829f5c8a ARM: Rockchip: Update defconfig
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 11:40:20 +01:00
Andrey Panov fb1c0b2380 MMC: dw_mmc: PIO mode fixes
Simplify PIO mode routines.
Fix a bug when IO is possibly performed twice because of using old
interrupt status.
Support for slow-speed card writes.

Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 11:40:20 +01:00
Sascha Hauer fa20ea45e0 Merge branch 'for-next/tegra' 2015-03-09 08:32:26 +01:00
Sascha Hauer 4680b375b9 Merge branch 'for-next/streaming-dma'
Conflicts:
	drivers/mci/dw_mmc.c
2015-03-09 08:32:21 +01:00
Sascha Hauer 5544581e98 Merge branch 'for-next/socfpga' 2015-03-09 08:30:38 +01:00
Sascha Hauer 55ab01c7ff Merge branch 'for-next/rockchip'
Conflicts:
	arch/arm/Kconfig
2015-03-09 08:30:35 +01:00
Sascha Hauer 5c8ced1a6d Merge branch 'for-next/openrisc' 2015-03-09 08:30:25 +01:00
Sascha Hauer ac81a0d876 Merge branch 'for-next/misc' 2015-03-09 08:30:24 +01:00
Sascha Hauer c3efa8470b Merge branch 'for-next/mips' 2015-03-09 08:30:24 +01:00
Sascha Hauer 696bd38337 Merge branch 'for-next/imx' 2015-03-09 08:30:24 +01:00
Sascha Hauer ac1bffb220 Merge branch 'for-next/fs' 2015-03-09 08:30:24 +01:00
Sascha Hauer 22e42ca3fc Merge branch 'for-next/arm' 2015-03-09 08:30:24 +01:00
Sascha Hauer 6977292a34 fs: rename inode member of struct filep to priv
Because that's what it is. 'inode' will become confusing
once we support real inodes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 08:06:41 +01:00
Sascha Hauer 478fb5c3dd ARM: i.MX6: switch to COMMON_CLK_OF_PROVIDER
Use COMMON_CLK_OF_PROVIDER to provide clocks from the device tree.
This needs several changes:
- use the clock number defines from dt-bindings/clock/imx6qdl-clock.h
- register the (previously skipped) gates, because these are bound to
  the consumers
- select COMMON_CLK_OF_PROVIDER

With this we also no longer register the fixed clocks twice.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 06:34:21 +01:00
Sascha Hauer 2ae785dea1 ARM: i.MX: remove i.MX6 ARM2 board support
This board is an early development sample that was never sold. Remove
support for it. With this the last non device tree i.MX6 board is gone.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 06:34:20 +01:00
Sascha Hauer 05a1e4bf10 ARM: i.MX5: Do not register fixed clocks twice
When booting with device tree the fixed clocks are registered from
the device tree, so do not register them again in the clock driver.

This also removes the ckih1 and ckih2 clocks which are unused at least
when booting without device tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 06:34:20 +01:00
Sascha Hauer 9b133915f6 PWM: i.MX: register successfully without alias
When a PWM does not have an of alias generate a name from the
base address so that we can register it successfully.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 06:34:20 +01:00
Sascha Hauer a55c8d806e ARM: i.MX: remove __naked from imx*_barebox_entry
Since the stack is already configured when entering imx*_barebox_entry
we can remove the __naked attribute. This fixes some compilation issues
when some of the imx*_barebox_entry got too complicated to compile without
stack.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 06:34:20 +01:00
Sascha Hauer e74955c2fd ARM: i.MX: boards: Setup stack before calling imx*_barebox_entry
This allows imx*_barebox_entry to use the stack.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 06:34:17 +01:00
Sascha Hauer 1629b5835a Merge branch 'for-next/dtc' 2015-03-06 08:34:02 +01:00
Sascha Hauer e9fe7ecc5f Merge branch 'for-next/at91' 2015-03-06 08:33:57 +01:00
Sascha Hauer 6bcfcece08 Merge branch 'for-next/sandbox-of' 2015-03-06 08:33:50 +01:00
Sascha Hauer 0e055c254c Merge branch 'for-next/mtd-partitions' 2015-03-06 08:33:43 +01:00
Sascha Hauer 9524e7d0d7 Merge branch 'for-next/mtd' 2015-03-06 08:33:39 +01:00