9
0
Fork 0
Commit Graph

5957 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD e3e71f5e66 sandbox: move __SANDBOX__ to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-23 13:36:22 +02:00
Sascha Hauer dac6e90115 fix bug introduced with fixing path_check_prereq()
This fixes a bug introduced with:

commit 74c36329c3
Author: Antony Pavlov <antonynpavlov@gmail.com>
Date:   Tue Oct 18 13:48:44 2011 +0400

    fs: fix path_check_prereq()

    This patch makes impossible the situations than path_check_prereq() can make
    'return 0' without changing errno.

    Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

path_check_prereq is supposed to return 0 when a file does
not exist and S_UB_DOES_NOT_EXIST is given. stat() changes
errno, so we have to set errno back to 0 before returning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-19 11:53:22 +02:00
Sascha Hauer 81fae63497 oftree: add fixup for memory nodes
Thanks to a common memory handling barebox knows the sdram banks
and sizes, so we can add a common fixup functions for the nodes
in the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-19 10:09:50 +02:00
Sascha Hauer ed8e58d77c ARM Linux: Add device tree support
If the user has parsed a tree, we start Linux using the
device tree, otherwise we use the traditional ATAG
mechanism.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-19 10:09:50 +02:00
Sascha Hauer c0f9d1bad2 initial oftree command support
This adds basic device tree command support. So far we can
parse a flat device tree (-p), which also stores the tree
in memory, dump it (-d) and free (-f) the internally stored tree.

The chosen node can be updated with barebox bootargs, no other
device tree manipulation is implemented yet.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-19 10:09:48 +02:00
Sascha Hauer 9135dd5f67 initial libfdt support
vanilla libfdt 1.3.0 from the dtc git:

git://git.jdl.com/software/dtc.git

Only small adjustments to compile with barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-19 10:08:48 +02:00
Sascha Hauer 4c6ac74566 nand: export some useful information about flashes to device variables
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-18 12:56:08 +02:00
Antony Pavlov a76e310abf fs: fix chdir()
chdir() allocates memory using mormalise_path(). But if path_check_prereq()
returns error than memory isn't freed.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-18 12:12:43 +02:00
Antony Pavlov 74c36329c3 fs: fix path_check_prereq()
This patch makes impossible the situations than path_check_prereq() can make
'return 0' without changing errno.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-18 12:12:43 +02:00
Loïc Minier 3808cb7a45 Avoid warnings by using format(__printf__)
When building sandbox, barebox is built with -Dprintf=barebox_printf as
to not collide with the printf provided by libc.  This would also match
the format(printf) function __attribute__.

Since gcc documents that __printf__ can be used instead of printf as a
format attribute, use this instead and avoid a lot of noisy warnings.

NB: this relates to 6b082cfe9f which was
an earlier attempt at solving this, which got reverted due to other
regressions.

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-18 09:18:41 +02:00
Loïc Minier 4e26fba680 Only pass -P to cpp when generating ld scripts
When building sandbox with ccache, one would hit warnings such as:
    warning: 'struct mmsghdr' declared inside parameter list
on random files; a way to reproduce this issue is to build a simple
file doing just:
    #include <sys/socket.h>

    int main(void) {
        return 0;
    }

    gcc -Wall -P -c -o foo foo.c

But actually the -P flag is only useful when generating non-C files,
such as linker scripts in the case of barebox.  Removing the -P flag
from all the gcc invocations, except when generating .lds files makes
the warning go away.  It turns out that this is what
linux/scripts/Makefile.build also does nowadays.

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-18 09:18:41 +02:00
Juergen Beisert 2b5d8792ac Really fix the 'bootz' command
Running the 'bootz' command always fails with

could not read <some file>

due to wrong usage of pointers and structures. This is the second try to fix
the 'bootz' command. At least on my target it is now be able again to load a
kernel without any error.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-18 09:17:35 +02:00
Antony Pavlov 44b3571591 arm: cpuinfo: import ARM architecture detection code from Linux
This code correctly detects architecture (v7) for Cortex-A9.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-15 16:28:21 +02:00
Juergen Beisert c66af9fe05 'bootz' command fails to load the zImage's header
Running the 'bootz' command always fails with

could not read <some file>

due to it loads only a size of a pointer, instead of the size of the expected
header structure.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-14 14:14:45 +02:00
Sascha Hauer 7d5aee0467 Merge branch 'master' into next 2011-10-14 09:36:17 +02:00
Sascha Hauer 0092823005 Merge branch 'pu/omap' 2011-10-14 09:36:10 +02:00
Franck Jullien 2f74da06b4 nios2: remove warnings generated by include/io.h
This patch remove those warnings in nios2 drivers:

include/io.h:7:5: warning: "__BYTE_ORDER" is not defined
include/io.h:7:21: warning: "__BIG_ENDIAN" is not defined

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-14 09:33:00 +02:00
Thomas Petazzoni 02777bf7c6 arm: at91: Add Atmel NAND support in config for at91sam9m10g45ek
Contrary to other Atmel boards, the AT91SAM9M10G45EK board file only
describes the case where NAND is used as the storage for Barebox and
its environment. Therefore, it makes sense to enable the Atmel NAND
driver in the default configuration for this board.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-14 09:28:40 +02:00
Thomas Petazzoni 30a124d046 arm: at91: fix environment location in flash for multiple boards
The environment partition was overlapping the Barebox partition in
those three Atmel boards. Saving the environment resulted in the
Barebox being overwritten.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-14 09:28:40 +02:00
Loïc Minier c351dab999 Fix spelling of "omitted"; found by lintian
Signed-off-by: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-14 09:27:31 +02:00
Sascha Hauer a5257e9cde ARM i.MX53: Fix nand registration helper
We switched to resources recently and the nand controller
of the i.MX53 needs two of them, so fix the helper in the
same way as the i.MX51

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-13 17:27:19 +02:00
Sascha Hauer c3a1bd4fe1 mtd nand i.MX: depend on ARCH_IMX instead of individual SoCs
This hardware is present on nearly all i.MX SoCs so do not
extend this list even further.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-13 17:27:19 +02:00
Sascha Hauer 64c1007a69 mtd nand i.MX: Add i.MX53 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-13 17:27:19 +02:00
Sascha Hauer 7caed07217 ARM i.MX53: sync iomux data with latest kernel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-13 17:27:19 +02:00
Sascha Hauer 504d951ec3 ARM i.MX53 Loco: Use generic lowlevel init code
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-13 17:27:19 +02:00
Sascha Hauer 2d6568b408 ARM i.MX53: Add lowlevel init code
This adds lowlevel (AIPS, PLL, L2) initialization for i.MX53 boards.
This is a direct transcription of Freescales U-Boot assembler code
with the exception that we initialize PLL1 with 1000MHz and assume
that all necessary voltages are already adjusted when we arrive here.

It must be explicitely called from the boards so a board is free to
do it's own initialization. However, boards should use this code
and make it more configurable if necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-13 17:27:19 +02:00
Sascha Hauer 3e5058e31f ARM panda: fix default env path in config
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-13 16:56:26 +02:00
Sascha Hauer ec1ebda198 mci omap: do not fail on nonexistent pdata
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-13 16:53:51 +02:00
Alexander Shiyan d9c41ea692 ID fix for mx51 SDHC2
Hello.

Please review this patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-12 10:28:57 +02:00
Jean-Christophe PLAGNIOL-VILLARD 51b74cf426 command/digest: add sha224 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-12 08:52:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD a86f883747 crypto: add sha224 support
the sha224sum is nearly the same as sha256sum except for the init of the
context and the hash length

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-12 08:52:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD e08eae4173 sha1: drop never used sha1_hmac
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-12 08:52:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD 05bd7afb3a digest: factorise file digest to common/digest.c
rename it to digest_file_window

introduce digest_file to digest a file and digest_file_by_name
where we specify the algo by name

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-12 08:52:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4ac3a1f9e0 move digest to crypto/
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-12 08:52:48 +02:00
Robert Schwebel c3d7a97726 mci-core: fix typo for pr_warn
It is pr_warning(), not pr_warn().

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-12 08:50:28 +02:00
Robert Schwebel 79c698b6f4 menu: fix alinment
Fixes alignment for the "System Type" menu entry.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-12 08:50:28 +02:00
Jean-Christophe PLAGNIOL-VILLARD fd552936d6 defaultenv: add bootm_opt var to allow the board to pass parameter to bootm
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-09 11:35:43 +02:00
Jean-Christophe PLAGNIOL-VILLARD a0746e71c2 arm/bootm: enable multi uimage support
tested on imx53 loco board with a Multi uImage file

generate like this

mkimage -A arm -O linux -T multi -C none -a 0x70008000 -e 0x70008000 -n Linux-2.6.35.3-00745-gce4c61a-dirty -d zImage:rootfs.cpio.lzma uImage.Multi

and boot via bootm

bootm -r @1 -L 0x72000000 /dev/ram0.kernel

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-09 11:35:42 +02:00
Jean-Christophe PLAGNIOL-VILLARD 83cf63d763 bootm: add -L option to specify the initrd load address
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-09 11:35:42 +02:00
Jean-Christophe PLAGNIOL-VILLARD 774f88c79b get_fake_image_handle: set nb_data_entries to 1 and update the header size
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-09 11:35:42 +02:00
Jean-Christophe PLAGNIOL-VILLARD 176c244d45 bootm: ensure the uImage is mapped first to allow option to used it
needed for multi image support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-09 11:35:42 +02:00
Fabian van der Werf 97f3cc022c Fixed unaligned access
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-09 11:31:31 +02:00
Sascha Hauer 597da1b76e Merge branch 'next' 2011-10-09 03:58:49 +02:00
Sascha Hauer 0e7c77a3fd Release v2011.10.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-08 11:26:13 +02:00
Sascha Hauer 78f4c9f4c1 sandbox: make asm/io.h nonempty
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-08 11:17:42 +02:00
Sascha Hauer c072195d41 ARM nomadik: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-08 11:14:21 +02:00
Hubert Feurstein 0a716d4211 at91: add missing clkdev changes
This fixes the following compile errors
  arch/arm/mach-at91/at91sam9g45.c:185:3: error: 'ohci_clk' undeclared here (not in a function)
  arch/arm/mach-at91/at91sam9g45.c:186:3: error: 'tcb1_clk' undeclared here (not in a function)
  arch/arm/mach-at91/at91sam9g45_devices.c: In function 'at91_add_device_mci':
  arch/arm/mach-at91/at91sam9g45_devices.c:258:2: warning: implicit declaration of function 'at91_clock_associate'
    [...]
  arch/arm/mach-at91/built-in.o: In function `at91_add_device_mci':
  sam9_smc.c:(.text.at91_add_device_mci+0x1d0): undefined reference to `at91_clock_associate'

  arch/arm/mach-at91/at91sam9260_devices.c: In function 'at91_add_device_mci':
  arch/arm/mach-at91/at91sam9260_devices.c:251:2: warning: implicit declaration of function 'at91_clock_associate'

which were introduced in commit:
  "at91: swtich to clkdev" (ae19fe26cc)

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-08 11:12:14 +02:00
Hubert Feurstein 5edd6ef8e8 at91: add spi clock connection id entries
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-08 11:12:09 +02:00
Rosen Kolev 502ecda2d1 Allow data-only i2c transfers
Modified the i2c_imx driver to support data-only transfers, without
command byte.  This allows to construct more complex i2c transfers
and support non genuine devices like Atmel ATxx secure memory, where the
master reads data after a write command.

Signed-off-by: Rosen Kolev <rosen.kolev@amk-drives.bg>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-07 15:42:48 +02:00
Juergen Beisert c7efd11b38 x86: Define byteorder
This is required to avoid warnings like this:

In file included from <some file>:
include/io.h:7:5: warning: "__BYTE_ORDER" is not defined
include/io.h:7:21: warning: "__BIG_ENDIAN" is not defined

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-04 09:46:37 +02:00