9
0
Fork 0
Commit Graph

24 Commits

Author SHA1 Message Date
Sascha Hauer 9f8aab600d drop CONFIG_PARTITION_NEED_MTD
With CONFIG_PARTITION_NEED_MTD enabled we use mtd rather than devfs
directly to create partitions on mtd devices. Since:

| commit b32cd8df87
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Wed Apr 9 15:49:32 2014 +0200
|
|     mtd: nand: bb: use mtd api directly
|
|     The devfs layer just adds an addition indirection between mtd
|     and the bb devices with no purpose. Drop it.
|
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

The bad block aware device creation doesn't work if this option
is disabled. With this we remove CONFIG_PARTITION_NEED_MTD and always
use mtd partitions on mtd devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-13 09:19:46 +02:00
Sascha Hauer bf8988d820 Merge branch 'for-next/fs'
Conflicts:
	fs/Kconfig
	fs/Makefile
2013-10-07 07:59:42 +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 12158a28d4 fs: add uimagefs
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>
2013-09-27 10:39:56 +02:00
Sascha Hauer 551b412b16 fs: Add ubifs support
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>
2013-08-07 08:44:48 +02:00
Sascha Hauer 8030ab24fa Merge branch 'kconfig' 2012-12-08 12:22:21 +01:00
Alexander Shiyan 4c20f9af97 Cleanup Kconfig files
This patch provides a global cleanup barebox Kconfig files. This includes
replacing spaces to tabs, formatting in accordance format, removing
extraneous lines and spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Sascha Hauer ac6e464cb2 fs: implement initial ext4 support from U-Boot
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>
2012-12-03 11:23:25 +01:00
Vicente 64254636af omap4: add filesystem support over usb boot
Signed-off-by: Vicente <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-16 15:32:31 +01:00
Jean-Christophe PLAGNIOL-VILLARD a1b1aec6af fs/mount: add autodetection type support
if NULL is pass as type mount will try to autodetect the filesystem type

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-04 09:08:39 +02:00
Sascha Hauer 11632d1eb3 fs nfs: depend on net
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:27 +02:00
Sascha Hauer 497d1c49f4 Merge branch 'next' 2012-06-06 14:11:57 +02:00
Sascha Hauer e48c51bda8 fs tftp: depend on NET, not on NET_TFTP
The tftp filesystem support is by no means dependent on the old tftp
support, it depends on NET though.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-31 20:23:52 +02:00
Eric Bénard dadcf5bd8f fs/tftp: depend on NET_TFTP
else the option remains selected when network gets disabled

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 19:53:54 +02:00
Sascha Hauer 9ede56ad24 fs: Add NFS support
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>
2012-05-14 08:36:03 +02:00
Sascha Hauer b5e5b06d8b Add automount support
This patch adds an automount command which makes it possible
to execute a script when a certain directory is first accessed.
It's the commands responsibility to make this directory available
(bringing devices up and mounting it). This results in automount
support which makes sure that from the shell every file can
be accessed without having to care for device bringup. Bringing
up devices may be expensive (USB, dhcp). The automount support
makes it easy for the environment to bringup devices when they
are actually needed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-18 15:03:26 +01:00
Sascha Hauer abd21d1f67 Add suport for tftp as a filesystem
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>
2012-02-19 18:48:38 +01:00
Sascha Hauer 17e91068b1 fs: add fat filesystem support
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>
2011-04-12 09:54:56 +02:00
Sascha Hauer acc46ca4f0 add partition mtd support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-05 13:00:02 +02:00
Menon, Nishanth b9655280e2 This is Kconfig cleanup patch (not all configurations will use CFI, SPI, 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.
2008-05-12 15:59:48 +02:00
Sascha Hauer edc878b37e svn_rev_566
fs support is not optional
2007-07-05 18:02:05 +02:00
Sascha Hauer e390c672eb svn_rev_544
make fs menuconfig
2007-07-05 18:02:03 +02:00
Sascha Hauer a4b07792b9 svn_rev_465
make fs support mandatory
2007-07-05 18:01:56 +02:00
Sascha Hauer 0ed157cd19 svn_rev_234
beginning filesystem support
2007-07-05 18:01:35 +02:00