9
0
Fork 0
Commit Graph

21 Commits

Author SHA1 Message Date
Sascha Hauer 54bea204e2 environment: drop envfs_register_partition
The purpose of envfs_register_partition is to print an error
message when the partition does not exist. Print an error message
from generic code instead and drop this function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-28 11:37:42 +02:00
Sascha Hauer 7fa10256c3 defaultenv: Allow multiple defaultenvironment overlays
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>
2014-02-28 08:14:14 +01:00
Sascha Hauer 0a2a8f7059 environment: Add function to load envfs from buffer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-20 14:45:48 +01:00
Sascha Hauer c2428b2287 environment: constify arguments
The directory arguments to envfs_load and envfs_save can
be const.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-20 14:43:49 +01:00
Sascha Hauer 5767987b34 env: make path arguments to envfs_load/save const
These functions have no business changing the path argument, so make the
argument const.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-27 11:08:44 +01:00
Sascha Hauer 25cee7ec17 environment: Use accessor functions for default environment path
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>
2014-01-27 09:27:02 +01:00
Eric Bénard eec960e3b3 env: add register_persistent_environment
- heavily copied from register_persistant_environment which was
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:45:43 +01:00
Sascha Hauer 0c97dd0061 move prototypes for envfs_* to envfs.h
environment.h is for environment variables, not for the environment
storage (envfs), so move the prototypes to envfs.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 16:31:51 +01:00
Jean-Christophe PLAGNIOL-VILLARD d3cbc61596 envfs: add support of variable inode size
Introduce a struct envfs_inode_end with more data.
Today this will just containt the file mode to be able to add the symlink
support.

But this is compatible with the previous envfs version as they will do not
care about the extra as the previous version is just reading the filename and
then consume the extra data without using them.

Increase the envfs version to 1.0

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-05 03:22:14 +08:00
Jean-Christophe PLAGNIOL-VILLARD ff3058e3bb envfs: introduce version major and minor
they are store in the super block at byte 16th and 17th.

set the verison at 0.1

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-05 03:22:14 +08:00
Sascha Hauer 51885a7d73 Change byte order detection mechanism to kernel style
The Linux Kernel defines only one of __LITTLE_ENDIAN and
__BIG_ENDIAN. Endianess can then be tested with #ifdef __xx_ENDIAN. Userspace
always defined both __LITTLE_ENDIAN and __BIG_ENDIAN and byteorder can then
be tested with #if __BYTE_ORDER == __xx_ENDIAN.

As we tend to use a lot of Kernel code in barebox we switch to use the kernel
way of determing the byte order.

As this always causes a lot of confusion add a check to include/common.h to
make sure only one of __LITTLE_ENDIAN and __BIG_ENDIAN is defined.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-28 13:49:16 +02:00
Dirk Hörner a906e5e196 hostcc tools: include "compiler.h", fix included headers
When barebox headers get included from HOSTCC tools they should not
include other architecture specific headers as barebox might get
cross-compiled. Instead, the tool itself should include "compiler.h".

Signed-off-by: Dirk Hörner <dirker@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 21:40:15 +02:00
Sascha Hauer a3ffa97f40 rename U-Boot-v2 project to barebox
This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Sascha Hauer d85e73776a envfs: remove bogus #warning statement
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-26 11:40:51 +02:00
Sascha Hauer fa052abb64 add missing include 2008-02-20 19:07:47 +01:00
Carsten Schlote 4bc43ee28c [general] Fixed remaining defines for envfs in big-endian mode
Trivial - completed macros
2008-02-19 08:56:27 +01:00
Carsten Schlote db291de280 [general] Fixed endian handling for envfs
Fixed the handling of data similiar as found in cramfs.

This fixes the problem with an unreadable defaultenv on big-endian
targets.

The endian macors are now loaded from /asm/common.h by default.

Signed-off-by: Carsten Schlote <c.schlote@konzeptpark.de>
2008-02-19 08:56:01 +01:00
Sascha Hauer 7c17ff7c45 Reimplement environment. Now we only have one crc for the whole image. 2007-09-27 12:04:17 +02:00
Sascha Hauer 913691eccd add directory handling for environment 2007-09-25 12:58:52 +02:00
Sascha Hauer a9416dd8a6 svn_rev_417
use uint32_t to compile it with linux
2007-07-05 18:01:52 +02:00
Sascha Hauer e5b0bbd39b svn_rev_347 2007-07-05 18:01:45 +02:00