summaryrefslogtreecommitdiffstats
path: root/fs/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* treewide: add SPDX-License-Identifier for Kbuild/KconfigAhmad Fatoum2022-01-051-0/+2
| | | | | | | | | | | | | | | To verify only Kconfig/Makefile is touched: git show --numstat --format=oneline HEAD | grep -v 'Kconfig\|Makefile' will print only arch/powerpc/Kbuild. To verify nothing unexpected is added: git show -U0 | grep '^-[^-]\|^+[^+]' | sort -u Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: fat: extend for in-PBL supportAhmad Fatoum2020-07-111-1/+1
| | | | | | | | | | | The AT91 BootROM loads a boot.bin file from the first FAT partition into SRAM, when booting from MMC. To avoid the need for two barebox configurations for each of the bootloader stages, add PBL support for reading from FAT. This way each stage need only have a different PBL entry point. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: jffs2: add initial support for reading jffs2Steffen Trumtrar2020-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | Import the jffs2 filesystem code from Linux v5.5-rc1 and convert it to work with barebox. Writing is *not* supported. Testing was done with a n25q256a-compatible QuadSPI chip on a SoCFPGA-based Socrates board. Testing was done with a combination of: user@somelinuxhost: mkfs.jffs2 --eraseblock=4 -d fs/jffs2/ -o jffs2.img root@target:~ flash_erase -j /dev/mtd5 0 0 root@target:~ dd if=jffs2.img of=/dev/mtd5 barebox@EBV SOCrates:/ mount /dev/mtd0.data (...) mounted /dev/mtd0.data on /mnt/mtd0.data Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Add a driver to access U-Boot environment variablesAndrey Smirnov2019-06-071-0/+1
| | | | | | | | | Add a driver working on top of ubootvar device and exposing U-Boot environment variable data as files. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Cory Tusar <cory.tusar@zii.aero> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: dentry cache implementationSascha Hauer2018-07-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | This adds the Linux dentry cache implementation to barebox. Until now every filesystem driver resolves the full path to a file for itself. This leads to code duplication and is error prone since resolving paths is a complicated task. Also it can narrow down the lookup performance since barebox only knows ASCII paths and has no way of caching lookups. With this patch we get the Linux dcache implementation. The path resolving code from fs/namei.c is nearly taken as-is, minus the RCU and locking code. Dcaching is made simple as of now: We simply cache everything and never release any dentries. Although we do reference counting for inodes and dentries it is effectively not used yet. We never free anything until a fs is unmounted in which case we free everything no matter if references are taken or not. This patch also contains a wrapper in fs/legacy.c to support filesystems with the old API. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move parseopt to lib/Antony Pavlov2018-01-171-1/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Makefile: Add parseopt to all buildsDaniel Schultz2017-06-061-2/+2
| | | | | | | | | | parseopt.h was included to fs.c with commit 9248b, but parseopt.o has a dependency to CONFIG_FS_NFS. Moved parseopt.o to the default build to eliminate build failures. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: add support for SquashFS 4.0Yegor Yefremov2016-03-021-0/+1
| | | | | | | | | | The driver was imported from Linux 4.4. Current implementation supports only XZ decompressor. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Tested-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ratp'Sascha Hauer2016-02-081-0/+1
|\
| * fs: Add RATP fs supportJan Luebbe2016-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | This adds file transfer support over RATP. The host can export a directory using the bbremote tool which can then be mounted under barebox as a filesystem. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Andrey Smirnov <andrew.smirnov@gmail.com>
| * barebox remote controlSascha Hauer2016-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to control barebox over serial lines. The regular console is designed for human input and is unsuitable for controlling barebox from scripts since characters can be lost on both ends, the data stream contains escape sequences and the prompt cannot be easily matched upon. This approach is based on the RATP protocol. RATP packages start with a binary 0x01 which does not occur in normal console data. Whenever a 0x01 character is detected in the console barebox goes into RATP mode. The RATP packets contain a simple structure with a command/respone type and data for that type. Currently defined types are: BB_RATP_TYPE_COMMAND (host->barebox): Execute a command in the shell BB_RATP_TYPE_COMMAND_RETURN (barebox->host) Sends return value of the command back to the host, also means barebox is ready for the next command BB_RATP_TYPE_CONSOLEMSG (barebox->host) Console message from barebox Planned but not yet implemented are: BB_RATP_TYPE_PING (host->barebox) BB_RATP_TYPE_PONG (barebox->host) For testing purposes BB_RATP_TYPE_GETENV (host->barebox) BB_RATP_TYPE_GETENV_RETURN (barebox->host) Get values of environment variables Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Andrey Smirnov <andrew.smirnov@gmail.com>
* | fs: Add pstore filesystemMarkus Pargmann2015-12-101-0/+1
|/ | | | | | | | | | | | | | | | pstore is a persistent storage filesystem used for RAMOOPS. It is used to store console logs, panics, ftrace and other information in case of a crash/panic/oops/reboot. pstore is implemented for barebox as a read-only filesystem at the moment. It may be extended later on. The idea is to provide a way to extract essential data from the last running kernel. Most of the code is copied from the kernel. However this is only a lightweight implementation without real write support yet. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Add support for semihostingAndrey Smirnov2015-10-301-0/+1
| | | | | | | | | | Add semihosting API implementation and implement a filesystem driver to access debugging host filesystem using it. Tested on Freescale SabreSD board (i.MX6Q) using OpenOCD Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: implement EFI variable filesystem driverSascha Hauer2014-07-161-0/+1
| | | | | | | | This implements a filesystem for accessing EFI variables. It is compatible to the Linux Kernel efivarfs filesystem. Currently the variables can only be accessed readonly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: implement EFI filesystem driverSascha Hauer2014-07-161-0/+1
| | | | | | | This implements a filesystem driver which uses the EFI Simple File System Protocol to provide files from EFI to barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nfs: parse nfsport and mount port from file system optionsUwe Kleine-König2014-02-101-1/+1
| | | | | | | | | | | | | This allows to use unfs3 on the server side which doesn't integrate into portmap/rpcbind which results in the port not being impossible to lookup via rpc calls to the portmap program. Use it like: mount -t nfs -o port=2703,mountport=2703 192.168.77.157:/root /mnt/nfs Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/fs'Sascha Hauer2013-10-071-0/+1
|\ | | | | | | | | | | Conflicts: fs/Kconfig fs/Makefile
| * fs: add uimagefsJean-Christophe PLAGNIOL-VILLARD2013-09-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this will provide the image data and information via file # ls -l /tmp/ -rwxrwxrwx 3 arch -rwxrwxrwx 12 compression -rwxrwxrwx 16 name -rwxrwxrwx 5 os -rwxrwxrwx 24 time -rwxrwxrwx 12 type -rwxrwxrwx 10 load_addr -rwxrwxrwx 10 entry_point -rwxrwxrwx 2199875 data0 -rwxrwxrwx 2199875 data -rwxrwxrwx 10 data.crc if it's multi image # ls -l /tmp-multi/ -rwxrwxrwx 3 arch -rwxrwxrwx 12 compression -rwxrwxrwx 16 name -rwxrwxrwx 5 os -rwxrwxrwx 24 time -rwxrwxrwx 16 type -rwxrwxrwx 10 load_addr -rwxrwxrwx 10 entry_point -rwxrwxrwx 1292 data0 -rwxrwxrwx 983 data1 -rwxrwxrwx 2287 data -rwxrwxrwx 10 data.crc you can get the image header via an ioctl on any file UIMAGEFS_METADATA if you want to check the crc do # crc32 -f /tmp-multi/data -V /tmp-multi/data.crc CRC32 for /tmp-multi/data 0x00000000 ... 0x000008ee ==> 0x88d5a0db Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: add BPKFS supportJean-Christophe PLAGNIOL-VILLARD2013-10-061-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* fs: Add ubifs supportSascha Hauer2013-08-071-0/+1
| | | | | | | | This adds ubifs support from u-boot-2013.07. This is taken mostly as-is, only the necessary adjustments to attach to the barebox fs layer have been made. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: implement initial ext4 support from U-BootSascha Hauer2012-12-031-0/+1
| | | | | | | | | | | | | | The ext4 implementation has been taken from U-Boot with some changes: - No global variables to allow for multiple filesystems to be mounted and multiple files to be open. - remove fs internal link following and use the barebox link implementation. - remove write support. This is incomplete in U-Boot, so I decided to skip this for now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* omap4: add filesystem support over usb bootVicente2012-11-161-0/+1
| | | | | Signed-off-by: Vicente <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Add NFS supportSascha Hauer2012-05-141-0/+1
| | | | | | | | This patch adds readonly NFS support. Currently no links are supported. This is based on the previous U-Boot/NetBSD based code and some Kernel bits. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add suport for tftp as a filesystemSascha Hauer2012-02-191-0/+1
| | | | | | | | | | | | | | | | | | This adds tftp filesystem support. It currently duplicates significant amounts of the tftp (command) support. This is ok since we can eventually drop the original tftp command later. tftp is not really suitable to be handled as a filesystem. It lacks support for stat, reading directories and other things. Handling it as a filesystem has one big advantage though: tftp is no special case for boot scripts and/or commands anymore which makes them simpler. This implementation has some improvements to the original tftp command. It supports blocksize negotiation which speeds up transfers if the tftp server supports it. Also we can determine the filesize to transfer if the remote end supports it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: add fat filesystem supportSascha Hauer2011-04-121-0/+1
| | | | | | | | | | | | | | This code is based on: http://elm-chan.org/fsw/ff/00index_e.html FatFs Generic FAT File System Module This patch offers a read/write implementation for barebox. The code does not exaclty match barebox coding style, but works nicely and should be ready to give it a try. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devfs: factor out core devfs functionalitySascha Hauer2011-04-111-0/+1
| | | | | | | | | This makes it possible to compile without devfs. devfs_create/devfs_remove is used by drivers and thus must still be present even without devfs support. Also, this patch adds cdev_open/cdev_close/cdev_flush/cdev_ioctl calls to work with devices without using the file api. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* This is Kconfig cleanup patch (not all configurations will use CFI, SPI, ↵Menon, Nishanth2008-05-121-2/+2
| | | | | | | RAMFS and DEVFS). * Enable CFI and SPI drivers menuconfig option to be able to disable them in menuconfig. * Introduce capability to disable ramfs and devfs.
* svn_rev_465Sascha Hauer2007-07-051-3/+3
| | | | make fs support mandatory
* svn_rev_339Sascha Hauer2007-07-051-1/+1
|
* svn_rev_284Sascha Hauer2007-07-051-0/+1
| | | | add devfs
* svn_rev_252Sascha Hauer2007-07-051-0/+1
| | | | WIP
* svn_rev_234Sascha Hauer2007-07-051-29/+2
| | | | beginning filesystem support
* Add support for a saving build objects in a separate directory.Marian Balakowicz2006-09-011-2/+2
| | | | | | | | | | | | | | | | | | | | | Modifications are based on the linux kernel approach and support two use cases: 1) Add O= to the make command line 'make O=/tmp/build all' 2) Set environement variable BUILD_DIR to point to the desired location 'export BUILD_DIR=/tmp/build' 'make' The second approach can also be used with a MAKEALL script 'export BUILD_DIR=/tmp/build' './MAKEALL' Command line 'O=' setting overrides BUILD_DIR environent variable. When none of the above methods is used the local build is performed and the object files are placed in the source directory.
* ext2fs support addedstroese2004-12-161-1/+1
|
* * Patch by Pavel Bartusek, 21 Mar 2004wdenk2004-03-251-1/+1
| | | | | | | | Add Reiserfs support * Patch by Hinko Kocevar, 20 Mar 2004 - Add auto-release for SMSC LAN91c111 driver - Add save/restore of PTR and PNR regs as suggested in datasheet
* * Patch by Robert Schwebel, 15 Dec 2003:wdenk2004-01-031-1/+1
| | | | add support for cramfs (uses JFFS2 command interface)
* * Code cleanup:wdenk2003-06-271-1/+0
| | | | | | | | | - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
* * Fix CONFIG_NET_MULTI support in include/net.hwdenk2003-06-151-1/+1
| | | | | | | | | | | | | * Patches by Kyle Harris, 13 Mar 2003: - Add FAT partition support - Add command support for FAT - Add command support for MMC ---- - Add Intel PXA support for video - Add Intel PXA support for MMC ---- - Enable MMC and FAT for lubbock board - Other misc changes for lubbock board
* * Patch by Daniel Engström, 13 Nov 2002:wdenk2002-11-181-1/+1
| | | | | | | Add support for i386 architecture and AMD SC520 board * Patch by Pierre Aubert, 12 Nov 2002: Add support for DOS filesystem and booting from DOS floppy disk
* Initial revisionwdenk2002-03-081-0/+30