9
0
Fork 0
Commit Graph

9983 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD 0d09ccdf75 fs: bpkfs: add missing include
was not include when applying bpkfs patch

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-21 09:13:51 +02:00
Sascha Hauer 42cb98c6ae fs: ignore O_TRUNC open flag for devices
The O_TRUNC flag has to be ignored when opening devices. Otherwise
cp /somefile /dev/somedev fails. This is broken since:

| commit d4f5bb1e01
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Sat Sep 28 13:12:50 2013 +0200
|
|     copy_file: Add missing O_TRUNC
|
|     Without it, when copying a smaller file over a larger file the
|     resulting file still has the remaining space from the larger file.
|
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-16 10:59:25 +02:00
Sascha Hauer 0ce9083582 boot: remove incomplete 'title' handling in menu
The 'boot -m' command executes the /env/boot/* scripts in order to
determine the title of a boot menu entry. This is not complete and
depends on changes in the environment, so remove it for now.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-16 09:31:52 +02:00
Jan Luebbe 579cbebf41 at91: fix typo in Kconfig description
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-15 08:37:24 +02:00
Jan Luebbe 0a45810d29 common: fix possible build problem without password support
In the case where CONFIG_PASSWORD is off, CONFIG_PASSWORD_DEFAULT is
undefined. As undefined is not "", this causes make to call find -type f.
If there is a filename containing a :, make will complain about having
"multiple target patterns"

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-15 08:36:53 +02:00
Sascha Hauer 8f23a17f9b Merge branch 'pu/bootloader-spec' 2013-10-14 15:46:10 +02:00
Sascha Hauer 61cf2b51bc add kernel-install tool for bootloader Spec
This adds a tool for installing kernels according to the bootloader
spec. systemd already has a similar tool, but it is limited to installing
kernels on the currently running system. The barebox kernel-install
tool instead can also be used to install kernels on removable media on a
development host for cross development. It is compiled in two variants,
as 'kernel-install' for the host and as 'kernel-install-target' using
$CROSS_COMPILE.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 15:28:06 +02:00
Sascha Hauer 51c92d290b x86: Fix compiler warnings
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 14:04:46 +02:00
Sascha Hauer ef5dac9c2b Implement bootloader spec support for barebox
The Bootloader Specification describes a way how kernels can
be installed on devices and how they can be started by the bootloader.

The bootloader spec is currently supported by (x86) gummiboot and
by systemd which provides a kernel-install script. With the bootloader
spec it's possible for the Operating system to install a new kernel
without knowing about the bootloader and for the bootloader it's possible
to discover and start Operating Systems on a media without being
configured.

For more details about the spec see:

http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/

This patch adds barebox support for the spec. It enhances the 'boot'
command so that not only boot script names can be given, but also
devices containing bootloader spec entries. With this it's possible
to call the 'boot' command like: 'boot sd emmc net'. It would then
first look for bootloader spec entries on the (removable) sd card,
then, is nothing is found, on the internal emmc and if still
unsuccessful would call the 'net' bootscript.

The bootloader Spec currently doesn't specify which entry should be
default if multiple entries are found on a single device. Therefore
barebox currently has two extensions of the spec. The $BOOT diretory
can contain a file named 'default'. If present, the content of the
file is treated as a filename under $BOOT/loader/entries/ which is
used as default. Similarly if a file named 'once' is present, the
entry is started once and the file is removed afterwards. This is
useful for testing if a newly installed kernel works before making
it the default.

As on ARM and other Architectures a devicetree has to be specified
for the kernel, the 'devicetree' property is used to specify a
devicetree. Like 'kernel' and 'initrd' this also contains a pth
relative to $BOOT.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 14:04:20 +02:00
Sascha Hauer 1369bfd44f cdev: store dos partition type in struct cdev
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 14:04:20 +02:00
Sascha Hauer 51dce5facb add function to read single line files
Often small files are used to store the value od a variable. This
adds a function to easily read such a variable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 14:04:20 +02:00
Sascha Hauer 95c9690c9e ARM: i.MX: remove now unused image-y from Makefile.imx
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 13:53:43 +02:00
Jan Weitzel 0abb8a6c2a i2c-omap: fix reported revison
Report correct major and minor revision
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 11:13:10 +02:00
Sascha Hauer 6e30646fa2 Merge branch 'for-next/tegra'
Conflicts:
	arch/arm/dts/Makefile
	images/Makefile
2013-10-07 08:02:36 +02:00
Sascha Hauer 904298deb0 Merge branch 'for-next/socfpga'
Conflicts:
	scripts/Makefile
2013-10-07 08:02:24 +02:00
Sascha Hauer ebf9022f2e Merge branch 'for-next/rs485'
Conflicts:
	common/console_common.c
2013-10-07 08:02:14 +02:00
Sascha Hauer a293dc2753 Merge branch 'for-next/omap' 2013-10-07 08:00:39 +02:00
Sascha Hauer 01f37a992f Merge branch 'for-next/net'
Conflicts:
	arch/arm/boards/animeo_ip/init.c
2013-10-07 08:00:36 +02:00
Sascha Hauer 71fbdfbb13 Merge branch 'for-next/mxs' 2013-10-07 08:00:28 +02:00
Sascha Hauer d9870d782a Merge branch 'for-next/mount' 2013-10-07 08:00:28 +02:00
Sascha Hauer 33c56e21eb Merge branch 'for-next/misc'
Conflicts:
	commands/Makefile
2013-10-07 08:00:25 +02:00
Sascha Hauer d32008b279 Merge branch 'for-next/mips' 2013-10-07 08:00:16 +02:00
Sascha Hauer 409885aaf3 Merge branch 'for-next/mci' 2013-10-07 08:00:16 +02:00
Sascha Hauer c26a46f0db Merge branch 'for-next/lzo' 2013-10-07 08:00:16 +02:00
Sascha Hauer 9aa6dd0270 Merge branch 'for-next/login'
Conflicts:
	include/console.h
2013-10-07 08:00:13 +02:00
Sascha Hauer 408f054247 Merge branch 'for-next/gpio' 2013-10-07 07:59:45 +02:00
Sascha Hauer bf8988d820 Merge branch 'for-next/fs'
Conflicts:
	fs/Kconfig
	fs/Makefile
2013-10-07 07:59:42 +02:00
Sascha Hauer 574947ef76 Merge branch 'for-next/console' 2013-10-07 07:59:18 +02:00
Sascha Hauer fb0c2ee1ae Merge branch 'for-next/bpkfs' 2013-10-07 07:59:18 +02:00
Sascha Hauer e48331d6e2 Merge branch 'for-next/bootm' 2013-10-07 07:59:18 +02:00
Sascha Hauer b32f56e7dd Merge branch 'for-next/at91' 2013-10-07 07:59:18 +02:00
Sascha Hauer 2a10286e49 Merge branch 'for-next/arm' 2013-10-07 07:59:18 +02:00
Sascha Hauer d28c9bb55d dhcp: replace dhcp_getenv_int with getenv_uint
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-07 07:59:00 +02:00
Sascha Hauer 0546e669a2 bootm: Replace getenv_loadaddr with getenv_ul
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-07 07:57:42 +02:00
Sascha Hauer 577de193df Release v2013.10.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-07 07:40:36 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7ccaaf71fe macb: add support to read the mac address from register
check the 4 mac address register and return at the first valid

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:36:14 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2f677b9b1e fs: add BPKFS support
Simple update file format developed for Somfy, tools and library are
available under LGPLv2 (https://www.gitorious.org/libbpk).

This format in the v1.0 allow you to store 6 types a binary stream for
a unique hardware id:
 - bootloader
 - bootloader_version
 - description.gz
 - kernel
 - rootfs
 - firmware_version

and you can easly add more binary stream type.

The fs will display you in a directory per hw id

and if a binary stream type is unknown will be display
as unknown_%08x

 # mount image.bpk /tmp
 # ls -l /tmp/hw_id_0/
-rwxrwxrwx         10 firmware_version
-rwxrwxrwx          8 firmware_version.crc
-rwxrwxrwx    1845968 kernel
-rwxrwxrwx          8 kernel.crc
-rwxrwxrwx    5062656 rootfs
-rwxrwxrwx          8 rootfs.crc
-rwxrwxrwx        248 bootloader
-rwxrwxrwx          8 bootloader.crc
-rwxrwxrwx     248925 description.gz
-rwxrwxrwx          8 description.gz.crc
-rwxrwxrwx          4 bootloader_version
-rwxrwxrwx          8 bootloader_version.crc
-rwxrwxrwx          4 unknown_1234567g
-rwxrwxrwx          8 unknown_1234567g.crc

Why BPK and not CPIO or uImage

1) CPIO

cpio does not handle > 4GiB image and does not have any crc checksum

2) uImage

uImage only provide one crc32 for the all data part and only a list of binary
stream with no information about what is what (in multi-image format)

3) BPK

BPK provide a crc32 for the header part and one crc32 per binary stream
so if you does not care of some data you are not force to check them

And you known exactly the binary stream type and for which hw to
use it.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Fargier Sylvain <sylvain.fargier@somfy.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:31:55 +02:00
Jean-Christophe PLAGNIOL-VILLARD 32d88d9a86 filetype: add Binary PacKage BPK type
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:26:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD 6a5121f748 console: factorise function to get the first enabled console
rename it to console_get_first_active

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:19:46 +02:00
Jan Luebbe 453fe26ed7 beaglebone: use most recent timings for white variant
These values come from the U-Boot source code.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:13:53 +02:00
Jan Luebbe 58bed295c2 arm: omap: am33xx_generic: fix DDR setup for DDR2
For DDR2 RAMs, regs->zq_config is not used, which causes the
AM33XX_EMIF4_0_REG(SDRAM_CONFIG) register to be left unconfigured, resulting
in boot failure.

It seems that the DDR2 case was missed during the consolidation in commit
9f122f8bf0. The actual call for the Bone was
removed in 88659d9c4a.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:13:53 +02:00
Jan Luebbe 138f604bb2 arm: mmu: be more verbose if ttb setup fails
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:13:53 +02:00
Jan Luebbe 45b1e9c274 am33xx_generic: convert from switch to if/else
The function am33xx_get_cpu_rev may be called before barebox_arm_entry(),
so we need to avoid switch statements. One example is the BeagleBone,
where we use this function to differenciate between the white and black
variants.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:13:53 +02:00
Teresa Gámez 363843eba7 mci: omap: Fix default value of mci.f_max
With commit c2ef47887 mci.f_max default value is
only set when pdata is available.

Fix this with always setting the mci.f_max default
value and overrite it when pdata available.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-02 10:26:17 +02:00
Lucas Stach f93b5f8eb9 tegra: switch to multi image
To keep things clean I removed all support for the old way to build
images. There is now a single tegra_v7 defconfig which builds both
supported Tegra boards as images.
The new image generation also paves the way for integration of the
tegra-cbootimage tool to produce directly flashable images.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-02 10:24:05 +02:00
Lucas Stach f3cf0157fb tegra: ac100: delete custom Kconfig
Now that tegra arch is both DT only and forced relocatable
there is nothing interesting left in here.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-02 10:24:05 +02:00
Lucas Stach 4581ea746f tegra: don't force to choose between Tegra arches
There is nothing technically preventing a single Tegra 20/30
image to be built. Don't force this split in Kconfig.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-02 10:24:05 +02:00
Lucas Stach c7aa6cc731 tegra: mandate relocatable binary
Allows us to drop some silly code workaround.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-02 10:24:04 +02:00
Lucas Stach c05a80c825 tegra: fix PBL build
Drop useless BUG(), we are too early for them to be of any use.
Make sure we build the AVP code as ARMv4 even in PBL case.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-02 10:24:04 +02:00
Lucas Stach 02568520ee tegra: start maincomplex execution at correct offset
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-02 10:24:04 +02:00