summaryrefslogtreecommitdiffstats
path: root/include/envfs.h
Commit message (Collapse)AuthorAgeFilesLines
* envfs: include errno.hLucas Stach2014-11-261-0/+1
| | | | | | | Fixes: include/envfs.h:124:10: error: 'ENOSYS' undeclared Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* envfs: change API to be able to forward special flags into the envfs superblockJuergen Borleis2014-08-011-1/+1
| | | | | | | | | | In order to be able to mark an stored envfs image with special features (intentional ignore for example), we now can feed forward these flags. By forwarding a '0' for the flags nothing changes because the envfs superblock was already allocated with xzalloc. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* envfs: provide an intentional way to ignore an existing external environmentJuergen Borleis2014-08-011-0/+1
| | | | | | | | | | | Add a simple flag to envfs to be able to mark an external environment as "not to be used". This change should not affect existing systems, because the current envfs implementation ensures the 'flags' member in the envfs master block is always zeroed. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: drop envfs_register_partitionSascha Hauer2014-04-281-2/+0
| | | | | | | | 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>
* defaultenv: Allow multiple defaultenvironment overlaysSascha Hauer2014-02-281-0/+31
| | | | | | | | | | 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>
* environment: Add function to load envfs from bufferSascha Hauer2014-02-201-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: constify argumentsSascha Hauer2014-02-201-2/+2
| | | | | | | The directory arguments to envfs_load and envfs_save can be const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* env: make path arguments to envfs_load/save constSascha Hauer2014-01-271-2/+2
| | | | | | | These functions have no business changing the path argument, so make the argument const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: Use accessor functions for default environment pathSascha Hauer2014-01-271-1/+13
| | | | | | | | | 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>
* env: add register_persistent_environmentEric Bénard2013-02-211-0/+2
| | | | | | | | - 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>
* move prototypes for envfs_* to envfs.hSascha Hauer2013-01-201-1/+7
| | | | | | | 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>
* envfs: add support of variable inode sizeJean-Christophe PLAGNIOL-VILLARD2012-09-051-3/+9
| | | | | | | | | | | | | | 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>
* envfs: introduce version major and minorJean-Christophe PLAGNIOL-VILLARD2012-09-051-1/+6
| | | | | | | | 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>
* Change byte order detection mechanism to kernel styleSascha Hauer2012-06-281-4/+18
| | | | | | | | | | | | | | | 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>
* hostcc tools: include "compiler.h", fix included headersDirk Hörner2012-06-051-0/+2
| | | | | | | | | 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>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* envfs: remove bogus #warning statementSascha Hauer2008-08-261-2/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add missing includeSascha Hauer2008-02-201-0/+2
|
* [general] Fixed remaining defines for envfs in big-endian modeCarsten Schlote2008-02-191-8/+4
| | | | Trivial - completed macros
* [general] Fixed endian handling for envfsCarsten Schlote2008-02-191-1/+17
| | | | | | | | | | | 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>
* Reimplement environment. Now we only have one crc for the whole image.Sascha Hauer2007-09-271-4/+6
|
* add directory handling for environmentSascha Hauer2007-09-251-3/+7
|
* svn_rev_417Sascha Hauer2007-07-051-7/+7
| | | | use uint32_t to compile it with linux
* svn_rev_347Sascha Hauer2007-07-051-0/+48