public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] *** Add ext4 filesystem support in uboot ***
  2011-12-15 17:38 ` [U-Boot] [PATCH 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
@ 2011-12-15 14:18   ` Wolfgang Denk
  2011-12-28  2:19   ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
  1 sibling, 0 replies; 12+ messages in thread
From: Wolfgang Denk @ 2011-12-15 14:18 UTC (permalink / raw)
  To: u-boot

Dear uma.shankar at samsung.com,

In message <1323970732-23803-2-git-send-email-uma.shankar@samsung.com> you wrote:
> From: Uma Shankar <uma.shankar@samsung.com>
> 
> ***
> This patch series adds support for ext4 ls,load and write features in uboot
> Journaling is supported for write feature.
> 
> To Enable EXT4 commands, modify the board specific config file with 
> #define CONFIG_CMD_EXT2 1
> #define CONFIG_CMD_EXT4 1

No.  This selects a feature only, so a plain #define without any value
should be used.

> Steps to test:
> 
> 1. After applying the patch, ext4 specific commands can be seen
>    in the boot loader prompt using 
> 	UBOOT #help 	
> 	
> 	ext4load- load binary file from a Ext4 file system
> 	ext4ls  - list files in a directory (default /)
> 	ext4write- create a file in ext4 formatted partition 

Could you please add these explanations as doc/README.ext4 so they
don't get lost?

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
No one may kill a man.  Not for any purpose.  It cannot be condoned.
	-- Kirk, "Spock's Brain", stardate 5431.6

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] Add ext4 filesystem support in uboot
@ 2011-12-15 17:38 uma.shankar at samsung.com
  2011-12-15 17:38 ` [U-Boot] [PATCH 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
  0 siblings, 1 reply; 12+ messages in thread
From: uma.shankar at samsung.com @ 2011-12-15 17:38 UTC (permalink / raw)
  To: u-boot

Resending patches for ext4 filesystem support in uboot, fixing checkpatch warnings and errors.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 0/2] *** Add ext4 filesystem support in uboot ***
  2011-12-15 17:38 [U-Boot] Add ext4 filesystem support in uboot uma.shankar at samsung.com
@ 2011-12-15 17:38 ` uma.shankar at samsung.com
  2011-12-15 14:18   ` Wolfgang Denk
  2011-12-28  2:19   ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
  0 siblings, 2 replies; 12+ messages in thread
From: uma.shankar at samsung.com @ 2011-12-15 17:38 UTC (permalink / raw)
  To: u-boot

From: Uma Shankar <uma.shankar@samsung.com>

***
This patch series adds support for ext4 ls,load and write features in uboot
Journaling is supported for write feature.

To Enable EXT4 commands, modify the board specific config file with 
#define CONFIG_CMD_EXT2 1
#define CONFIG_CMD_EXT4 1
Steps to test:

1. After applying the patch, ext4 specific commands can be seen
   in the boot loader prompt using 
	UBOOT #help 	
	
	ext4load- load binary file from a Ext4 file system
	ext4ls  - list files in a directory (default /)
	ext4write- create a file in ext4 formatted partition 

2. To list the files in ext4 formatted partition, execute
	ext4ls <interface> <dev[:part]> [directory]
	For example:
	UBOOT #ext4ls mmc 0:5 /usr/lib

3. To read and load a file from an ext4 formatted partition to RAM, execute
	ext4load <interface> <dev[:part]> [addr] [filename] [bytes]
	For example:
	UBOOT #ext4load mmc 2:2 0x30007fc0 uImage

4. To write a file to a ext4 formatted partition.
	a) First load a file to RAM at a particular address for example 0x30007fc0.
	Now execute ext4write command
	ext4write <interface> <dev[:part]> [filename] [Address] [sizebytes]
	For example:
	UBOOT #ext4write mmc 2:2 /boot/uImage 0x30007fc0 6183120 
	(here 6183120 is the size of the file to be written)
	Note: Absolute path is required for the file to be written

***

Uma Shankar (2):
  ext4fs ls load support
  ext4fs write support

 Makefile               |    2 +-
 common/Makefile        |    1 +
 common/cmd_ext2.c      |    1 +
 common/cmd_ext4.c      |  388 ++++++++++
 fs/Makefile            |    1 +
 fs/ext2/dev.c          |    1 +
 fs/ext2/ext2fs.c       |  340 +--------
 fs/ext4/Makefile       |   51 ++
 fs/ext4/crc16.c        |   62 ++
 fs/ext4/crc16.h        |   16 +
 fs/ext4/ext4_common.c  | 1955 ++++++++++++++++++++++++++++++++++++++++++++++++
 fs/ext4/ext4_common.h  |   61 ++
 fs/ext4/ext4_journal.c |  650 ++++++++++++++++
 fs/ext4/ext4_journal.h |  147 ++++
 fs/ext4/ext4fs.c       | 1251 +++++++++++++++++++++++++++++++
 include/ext2fs.h       |   16 +-
 include/ext4fs.h       |  124 +++
 include/ext_common.h   |  199 +++++
 18 files changed, 4942 insertions(+), 324 deletions(-)
 create mode 100644 common/cmd_ext4.c
 create mode 100644 fs/ext4/Makefile
 create mode 100644 fs/ext4/crc16.c
 create mode 100644 fs/ext4/crc16.h
 create mode 100644 fs/ext4/ext4_common.c
 create mode 100644 fs/ext4/ext4_common.h
 create mode 100644 fs/ext4/ext4_journal.c
 create mode 100644 fs/ext4/ext4_journal.h
 create mode 100644 fs/ext4/ext4fs.c
 create mode 100644 include/ext4fs.h
 create mode 100644 include/ext_common.h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] Add ext4 write support
  2011-12-15 17:38 ` [U-Boot] [PATCH 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
  2011-12-15 14:18   ` Wolfgang Denk
@ 2011-12-28  2:19   ` uma.shankar at samsung.com
  2011-12-28  2:19     ` [U-Boot] [PATCH V3 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
  2012-01-09 17:51     ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
  1 sibling, 2 replies; 12+ messages in thread
From: uma.shankar at samsung.com @ 2011-12-28  2:19 UTC (permalink / raw)
  To: u-boot

We are still keeping crc16.c file in fs/ext4 because the lib/crc16.c file ( Poly - x^16 + x^12 + x^5 + 1)
is not compatible with Linux kernel crc implementation (Poly - x^16 + x^15 + x^2 + 1). Also, fs/ubifs/crc16.c
is also giving some errors. Kernel does not mount the partition if we use this particular crc file. Hence, we are keeping 
the existing crc16.c.

We have also added a README file in fs/ext4/ folder with steps to test the uboot ext4 feature.

Thanks to Wolfgang Denk, Kim Phillips, Graeme Russ and Mike Frysinger for your valuable suggestions and review comments.

Thanks & Regards,
Uma Shankar
Manjunatha C Achar

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH V3 0/2] *** Add ext4 filesystem support in uboot ***
  2011-12-28  2:19   ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
@ 2011-12-28  2:19     ` uma.shankar at samsung.com
  2012-01-09 17:51     ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
  1 sibling, 0 replies; 12+ messages in thread
From: uma.shankar at samsung.com @ 2011-12-28  2:19 UTC (permalink / raw)
  To: u-boot

From: Uma Shankar <uma.shankar@samsung.com>

***
This patch series adds support for ext4 ls,load and write features in uboot
Journaling is supported for write feature.

To Enable ext4 ls and load commands, modify the board specific config file with
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_EXT4

To enable ext4 write command, modify the board specific config file with
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_EXT4
#define CONFIG_CMD_EXT4_WRITE
Steps to test:

1. After applying the patch, ext4 specific commands can be seen
   in the boot loader prompt using
        UBOOT #help

        ext4load- load binary file from a Ext4 file system
        ext4ls  - list files in a directory (default /)
        ext4write- create a file in ext4 formatted partition

2. To list the files in ext4 formatted partition, execute
        ext4ls <interface> <dev[:part]> [directory]
        For example:
        UBOOT #ext4ls mmc 0:5 /usr/lib

3. To read and load a file from an ext4 formatted partition to RAM, execute
        ext4load <interface> <dev[:part]> [addr] [filename] [bytes]
        For example:
        UBOOT #ext4load mmc 2:2 0x30007fc0 uImage

4. To write a file to a ext4 formatted partition.
        a) First load a file to RAM at a particular address for example 0x30007fc0.
        Now execute ext4write command
        ext4write <interface> <dev[:part]> [filename] [Address] [sizebytes]
        For example:
        UBOOT #ext4write mmc 2:2 /boot/uImage 0x30007fc0 6183120
        (here 6183120 is the size of the file to be written)
        Note: Absolute path is required for the file to be written

***

Uma Shankar (2):
  ext4fs ls load support
  ext4fs write support

Changes for v2:
	- Code cleanup, changed comment style
	- camel case removed, resolved code alignment issues
	- memory allocation logic changed, removed busybox logic
	- Modified ext4 load to remove grub dependency (GPLv3)
	- Introduced new Config for ext4 write 

Changes for v1:
	- Removed checkpatch warnings and errors
	- Moved common API's of ext2 and ext4 to one generic header file

 Makefile               |    2 +-
 common/Makefile        |    1 +
 common/cmd_ext2.c      |    1 +
 common/cmd_ext4.c      |  390 ++++++++++
 fs/Makefile            |    1 +
 fs/ext2/dev.c          |    1 +
 fs/ext2/ext2fs.c       |  340 +--------
 fs/ext4/Makefile       |   52 ++
 fs/ext4/README         |   46 ++
 fs/ext4/crc16.c        |   62 ++
 fs/ext4/crc16.h        |   16 +
 fs/ext4/ext4_common.c  | 1945 ++++++++++++++++++++++++++++++++++++++++++++++++
 fs/ext4/ext4_common.h  |   68 ++
 fs/ext4/ext4_journal.c |  662 ++++++++++++++++
 fs/ext4/ext4_journal.h |  147 ++++
 fs/ext4/ext4fs.c       | 1191 +++++++++++++++++++++++++++++
 include/ext2fs.h       |   16 +-
 include/ext4fs.h       |  145 ++++
 include/ext_common.h   |  198 +++++
 19 files changed, 4960 insertions(+), 324 deletions(-)
 create mode 100644 common/cmd_ext4.c
 create mode 100644 fs/ext4/Makefile
 create mode 100644 fs/ext4/README
 create mode 100644 fs/ext4/crc16.c
 create mode 100644 fs/ext4/crc16.h
 create mode 100644 fs/ext4/ext4_common.c
 create mode 100644 fs/ext4/ext4_common.h
 create mode 100644 fs/ext4/ext4_journal.c
 create mode 100644 fs/ext4/ext4_journal.h
 create mode 100644 fs/ext4/ext4fs.c
 create mode 100644 include/ext4fs.h
 create mode 100644 include/ext_common.h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] Add ext4 write support
  2011-12-28  2:19   ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
  2011-12-28  2:19     ` [U-Boot] [PATCH V3 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
@ 2012-01-09 17:51     ` uma.shankar at samsung.com
  2012-01-09 17:51       ` [U-Boot] [PATCH V4 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
                         ` (3 more replies)
  1 sibling, 4 replies; 12+ messages in thread
From: uma.shankar at samsung.com @ 2012-01-09 17:51 UTC (permalink / raw)
  To: u-boot

Hi All,
We have resolved the coding style issues and updated the copyrights correctly in the respective header files.
Ext4fs code has been made independant of ext2 code. A separate config CONFIG_CMD_EXT4 is provided for ext4ls and load,
also CONFIG_CMD_EXT4_WRITE for ext4 write feature. 

We are still keeping crc16.c file in fs/ext4 because the lib/crc16.c file ( Poly - x^16 + x^12 + x^5 + 1)
is not compatible with Linux kernel crc implementation (Poly - x^16 + x^15 + x^2 + 1). Also, fs/ubifs/crc16.c
is also giving some errors. Kernel does not mount the partition if we use this particular crc file. Hence, we are keeping
the existing crc16.c file.

We have also added a README.ext4 file in doc/ folder with steps to test the uboot ext4 feature.

Thanks to Wolfgang Denk, Kim Phillips, Graeme Russ and Mike Frysinger for your valuable suggestions and review comments.

Thanks & Regards,
Uma Shankar
Manjunatha C Achar

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH V4 0/2] *** Add ext4 filesystem support in uboot ***
  2012-01-09 17:51     ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
@ 2012-01-09 17:51       ` uma.shankar at samsung.com
  2012-01-10  2:30       ` [U-Boot] Add ext4 write support Kim Phillips
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: uma.shankar at samsung.com @ 2012-01-09 17:51 UTC (permalink / raw)
  To: u-boot

From: uma.shankar <uma.shankar@samsung.com>

***
This patch series adds support for ext4 ls,load and write features in uboot
Journaling is supported for write feature.

To Enable ext4 ls and load commands, modify the board specific config file with
#define CONFIG_CMD_EXT4

To enable ext4 write command, modify the board specific config file with
#define CONFIG_CMD_EXT4_WRITE

Steps to test:

1. After applying the patch, ext4 specific commands can be seen
   in the boot loader prompt using
        UBOOT #help

        ext4load- load binary file from a Ext4 file system
        ext4ls  - list files in a directory (default /)
        ext4write- create a file in ext4 formatted partition

2. To list the files in ext4 formatted partition, execute
        ext4ls <interface> <dev[:part]> [directory]
        For example:
        UBOOT #ext4ls mmc 0:5 /usr/lib

3. To read and load a file from an ext4 formatted partition to RAM, execute
        ext4load <interface> <dev[:part]> [addr] [filename] [bytes]
        For example:
        UBOOT #ext4load mmc 2:2 0x30007fc0 uImage

4. To write a file to a ext4 formatted partition.
        a) First load a file to RAM at a particular address for example 0x30007fc0.
        Now execute ext4write command
        ext4write <interface> <dev[:part]> [filename] [Address] [sizebytes]
        For example:
        UBOOT #ext4write mmc 2:2 /boot/uImage 0x30007fc0 6183120
        (here 6183120 is the size of the file to be written)
        Note: Absolute path is required for the file to be written

***

uma.shankar (2):
  ext4fs ls load support
  ext4fs write support

Changes for v3:
	- Copyright has been updated in respective files
	- ext4fs has been made independant of ext2fs.c
	- Fixed API namespace
	- Removed endianness conversion API, used uboot defined API
	  for the same
	- Fixed coding style issues
	- Moved README.ext4 file into doc folder

Changes for v2:
	- Code cleanup, changed comment style
	- camel case removed, resolved code alignment issues
	- memory allocation logic changed, removed busybox logic
	- Modified ext4 load to remove grub dependency (GPLv3)
	- Introduced new Config for ext4 write 

Changes for v1:
	- Removed checkpatch warnings and errors
	- Moved common API's of ext2 and ext4 to one generic header file

 Makefile               |    2 +-
 common/Makefile        |    4 +
 common/cmd_ext4.c      |  407 +++++++++
 doc/README.ext4        |   43 +
 fs/Makefile            |    1 +
 fs/ext2/dev.c          |    1 +
 fs/ext2/ext2fs.c       |  181 +----
 fs/ext4/Makefile       |   55 ++
 fs/ext4/crc16.c        |   62 ++
 fs/ext4/crc16.h        |   16 +
 fs/ext4/dev.c          |  145 ++++
 fs/ext4/ext4_common.c  | 2221 ++++++++++++++++++++++++++++++++++++++++++++++++
 fs/ext4/ext4_common.h  |   88 ++
 fs/ext4/ext4_journal.c |  666 +++++++++++++++
 fs/ext4/ext4_journal.h |  141 +++
 fs/ext4/ext4fs.c       | 1188 ++++++++++++++++++++++++++
 include/ext4fs.h       |  144 ++++
 include/ext_common.h   |  188 ++++
 18 files changed, 5396 insertions(+), 157 deletions(-)
 create mode 100644 common/cmd_ext4.c
 create mode 100644 doc/README.ext4
 create mode 100644 fs/ext4/Makefile
 create mode 100644 fs/ext4/crc16.c
 create mode 100644 fs/ext4/crc16.h
 create mode 100644 fs/ext4/dev.c
 create mode 100644 fs/ext4/ext4_common.c
 create mode 100644 fs/ext4/ext4_common.h
 create mode 100644 fs/ext4/ext4_journal.c
 create mode 100644 fs/ext4/ext4_journal.h
 create mode 100644 fs/ext4/ext4fs.c
 create mode 100644 include/ext4fs.h
 create mode 100644 include/ext_common.h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] Add ext4 write support
  2012-01-09 17:51     ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
  2012-01-09 17:51       ` [U-Boot] [PATCH V4 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
@ 2012-01-10  2:30       ` Kim Phillips
  2012-01-16  0:04         ` Mike Frysinger
  2012-05-25 15:48       ` Uma Shankar
  2012-05-25 15:48       ` [U-Boot] [PATCH V5 0/2] *** Add ext4 filesystem support in uboot *** Uma Shankar
  3 siblings, 1 reply; 12+ messages in thread
From: Kim Phillips @ 2012-01-10  2:30 UTC (permalink / raw)
  To: u-boot

On Mon, 9 Jan 2012 23:21:40 +0530
<uma.shankar@samsung.com> wrote:

> We are still keeping crc16.c file in fs/ext4 because the lib/crc16.c file ( Poly - x^16 + x^12 + x^5 + 1)
> is not compatible with Linux kernel crc implementation (Poly - x^16 + x^15 + x^2 + 1).

I see that now - lib/crc16.c implements the CCITT version, whereas
it appears filesystems use the IBM/ANSI polynomials.

> Also, fs/ubifs/crc16.c
> is also giving some errors.

strange - ubifs uses the same polynomial.  I diffed fs/ubifs/crc16.c
and linux' lib/crc16.c, and found no difference in the table.  Is
there a possibility of an endianness problem, or that the test was
based on data a prior CCITT test wrote?

> Kernel does not mount the partition if we use this particular crc file. Hence, we are keeping
> the existing crc16.c file.

setting the standard for new filesystem implementations to do the
same?

The implementations should be cleaned up before too many
duplications occur - linux calls the IBM/ANSI version plain 'crc16',
and the CCITT version crc-ccitt (linux/lib/crc-ccitt.c). Is it
possible instead to move u-boot's ubifs implementation into
lib/crc16.c, and the current u-boot lib/crc16.c be renamed
lib/crc-ccitt.c?

Thanks,

Kim

[1] http://en.wikipedia.org/wiki/Crc16

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] Add ext4 write support
  2012-01-10  2:30       ` [U-Boot] Add ext4 write support Kim Phillips
@ 2012-01-16  0:04         ` Mike Frysinger
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2012-01-16  0:04 UTC (permalink / raw)
  To: u-boot

On Monday 09 January 2012 21:30:41 Kim Phillips wrote:
> On Mon, 9 Jan 2012 23:21:40 +0530 uma shankar wrote:
> > Kernel does not mount the partition if we use this particular crc file.
> > Hence, we are keeping the existing crc16.c file.
> 
> setting the standard for new filesystem implementations to do the
> same?
> 
> The implementations should be cleaned up before too many
> duplications occur - linux calls the IBM/ANSI version plain 'crc16',
> and the CCITT version crc-ccitt (linux/lib/crc-ccitt.c). Is it
> possible instead to move u-boot's ubifs implementation into
> lib/crc16.c, and the current u-boot lib/crc16.c be renamed
> lib/crc-ccitt.c?

this sounds good to me
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120115/dfc0e5fc/attachment.pgp>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] Add ext4 write support
  2012-01-09 17:51     ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
  2012-01-09 17:51       ` [U-Boot] [PATCH V4 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
  2012-01-10  2:30       ` [U-Boot] Add ext4 write support Kim Phillips
@ 2012-05-25 15:48       ` Uma Shankar
  2012-05-25 15:48       ` [U-Boot] [PATCH V5 0/2] *** Add ext4 filesystem support in uboot *** Uma Shankar
  3 siblings, 0 replies; 12+ messages in thread
From: Uma Shankar @ 2012-05-25 15:48 UTC (permalink / raw)
  To: u-boot

Hi All,
We have resolved the review comments received for uboot ext4 feature. 
Ext4 code is based on existing ext2 implementation in uboot, and is capable to ls, load ext2 partitions as well.
Hence we have removed the ext2 folder from fs folder and will maintain one ext4 directory. 
Since ext4 is based on ext2, all ext2 developers name has been added to the respective file headers

To make the command line interface clean, we are maintaining cmd_ext2.c and cmd_ext4.c files. They will act as a wrapper and
a new file cmd_ext_common.c is introduced which will act as an interface file with ext4 directory.

Hence, it will avoid lot of code duplicacy and also will maintain a cleaner command interface.
Also, the current ext4 ls and load is optimized and around 10 times faster than the existing ext2 ls and load in uboot.

Thanks to Wolfgang Denk, Kim Phillips, Graeme Russ, Rob and Mike Frysinger for your valuable suggestions and review comments.

Thanks & Regards,
Uma Shankar
Manjunatha C Achar

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH V5 0/2] *** Add ext4 filesystem support in uboot ***
  2012-01-09 17:51     ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
                         ` (2 preceding siblings ...)
  2012-05-25 15:48       ` Uma Shankar
@ 2012-05-25 15:48       ` Uma Shankar
  2012-05-25 16:57         ` Rob Herring
  3 siblings, 1 reply; 12+ messages in thread
From: Uma Shankar @ 2012-05-25 15:48 UTC (permalink / raw)
  To: u-boot

***
This patch series adds support for ext4 ls,load and write features in uboot
Journaling is supported for write feature.

To Enable ext2 ls and load commands, modify the board specific config file with
#define CONFIG_CMD_EXT2

To Enable ext4 ls and load commands, modify the board specific config file with
#define CONFIG_CMD_EXT4

To enable ext4 write command, modify the board specific config file with
#define CONFIG_CMD_EXT4
#define CONFIG_CMD_EXT4_WRITE

Steps to test:

1. After applying the patch, ext4 specific commands can be seen
   in the boot loader prompt using
        UBOOT #help

        ext4load- load binary file from a Ext4 file system
        ext4ls  - list files in a directory (default /)
        ext4write- create a file in ext4 formatted partition

2. To list the files in ext4 formatted partition, execute
        ext4ls <interface> <dev[:part]> [directory]
        For example:
        UBOOT #ext4ls mmc 0:5 /usr/lib

3. To read and load a file from an ext4 formatted partition to RAM, execute
        ext4load <interface> <dev[:part]> [addr] [filename] [bytes]
        For example:
        UBOOT #ext4load mmc 2:2 0x30007fc0 uImage

4. To write a file to a ext4 formatted partition.
        a) First load a file to RAM at a particular address for example 0x30007fc0.
        Now execute ext4write command
        ext4write <interface> <dev[:part]> [filename] [Address] [sizebytes]
        For example:
        UBOOT #ext4write mmc 2:2 /boot/uImage 0x30007fc0 6183120
        (here 6183120 is the size of the file to be written)
        Note: Absolute path is required for the file to be written

***


Uma Shankar (2):
  ext4fs ls load support
  ext4fs write support

Changes for v4:
	- Redesigned ext2, ext4 command interface
	- Removed ext2 folder from fs/
	- Memory Leak issue handled

Changes for v3:
        - Copyright has been updated in respective files
        - ext4fs has been made independant of ext2fs.c
        - Fixed API namespace
        - Removed endianness conversion API, used uboot defined API
          for the same
        - Fixed coding style issues
        - Moved README.ext4 file into doc folder

Changes for v2:
        - Code cleanup, changed comment style
        - camel case removed, resolved code alignment issues
        - memory allocation logic changed, removed busybox logic
        - Modified ext4 load to remove grub dependency (GPLv3)
        - Introduced new Config for ext4 write

Changes for v1:
        - Removed checkpatch warnings and errors
        - Moved common API's of ext2 and ext4 to one generic header file

 Makefile                   |    2 +-
 common/Makefile            |    6 +
 common/cmd_ext2.c          |  219 +----
 common/cmd_ext4.c          |  237 +++++
 common/cmd_ext_common.c    |  259 +++++
 doc/README.ext4            |   46 +
 fs/Makefile                |    5 +-
 fs/ext2/dev.c              |  131 ---
 fs/ext2/ext2fs.c           |  897 ------------------
 fs/{ext2 => ext4}/Makefile |    9 +-
 fs/ext4/crc16.c            |   62 ++
 fs/ext4/crc16.h            |   16 +
 fs/ext4/dev.c              |  145 +++
 fs/ext4/ext4_common.c      | 2228 ++++++++++++++++++++++++++++++++++++++++++++
 fs/ext4/ext4_common.h      |   88 ++
 fs/ext4/ext4_journal.c     |  667 +++++++++++++
 fs/ext4/ext4_journal.h     |  141 +++
 fs/ext4/ext4fs.c           | 1189 +++++++++++++++++++++++
 include/ext2fs.h           |   81 --
 include/ext4fs.h           |  144 +++
 include/ext_common.h       |  199 ++++
 21 files changed, 5455 insertions(+), 1316 deletions(-)
 create mode 100644 common/cmd_ext4.c
 create mode 100644 common/cmd_ext_common.c
 create mode 100644 doc/README.ext4
 delete mode 100644 fs/ext2/dev.c
 delete mode 100644 fs/ext2/ext2fs.c
 rename fs/{ext2 => ext4}/Makefile (86%)
 create mode 100644 fs/ext4/crc16.c
 create mode 100644 fs/ext4/crc16.h
 create mode 100644 fs/ext4/dev.c
 create mode 100644 fs/ext4/ext4_common.c
 create mode 100644 fs/ext4/ext4_common.h
 create mode 100644 fs/ext4/ext4_journal.c
 create mode 100644 fs/ext4/ext4_journal.h
 create mode 100644 fs/ext4/ext4fs.c
 delete mode 100644 include/ext2fs.h
 create mode 100644 include/ext4fs.h
 create mode 100644 include/ext_common.h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH V5 0/2] *** Add ext4 filesystem support in uboot ***
  2012-05-25 15:48       ` [U-Boot] [PATCH V5 0/2] *** Add ext4 filesystem support in uboot *** Uma Shankar
@ 2012-05-25 16:57         ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2012-05-25 16:57 UTC (permalink / raw)
  To: u-boot

On 05/25/2012 10:48 AM, Uma Shankar wrote:
> ***
> This patch series adds support for ext4 ls,load and write features in uboot
> Journaling is supported for write feature.
> 
> To Enable ext2 ls and load commands, modify the board specific config file with
> #define CONFIG_CMD_EXT2
> 
> To Enable ext4 ls and load commands, modify the board specific config file with
> #define CONFIG_CMD_EXT4
> 
> To enable ext4 write command, modify the board specific config file with
> #define CONFIG_CMD_EXT4
> #define CONFIG_CMD_EXT4_WRITE
> 
> Steps to test:
> 
> 1. After applying the patch, ext4 specific commands can be seen
>    in the boot loader prompt using
>         UBOOT #help
> 
>         ext4load- load binary file from a Ext4 file system
>         ext4ls  - list files in a directory (default /)
>         ext4write- create a file in ext4 formatted partition
> 
> 2. To list the files in ext4 formatted partition, execute
>         ext4ls <interface> <dev[:part]> [directory]
>         For example:
>         UBOOT #ext4ls mmc 0:5 /usr/lib
> 
> 3. To read and load a file from an ext4 formatted partition to RAM, execute
>         ext4load <interface> <dev[:part]> [addr] [filename] [bytes]
>         For example:
>         UBOOT #ext4load mmc 2:2 0x30007fc0 uImage
> 
> 4. To write a file to a ext4 formatted partition.
>         a) First load a file to RAM at a particular address for example 0x30007fc0.
>         Now execute ext4write command
>         ext4write <interface> <dev[:part]> [filename] [Address] [sizebytes]
>         For example:
>         UBOOT #ext4write mmc 2:2 /boot/uImage 0x30007fc0 6183120
>         (here 6183120 is the size of the file to be written)
>         Note: Absolute path is required for the file to be written
> 
> ***

FYI, in the prior version, I'm seeing some issues with reading
sub-directories on ext4 filesystem. When doing an ls some directories
are present, but have a size of 0 and can't be listed. In Linux, they
are fine.

Rob

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-05-25 16:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-15 17:38 [U-Boot] Add ext4 filesystem support in uboot uma.shankar at samsung.com
2011-12-15 17:38 ` [U-Boot] [PATCH 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
2011-12-15 14:18   ` Wolfgang Denk
2011-12-28  2:19   ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
2011-12-28  2:19     ` [U-Boot] [PATCH V3 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
2012-01-09 17:51     ` [U-Boot] Add ext4 write support uma.shankar at samsung.com
2012-01-09 17:51       ` [U-Boot] [PATCH V4 0/2] *** Add ext4 filesystem support in uboot *** uma.shankar at samsung.com
2012-01-10  2:30       ` [U-Boot] Add ext4 write support Kim Phillips
2012-01-16  0:04         ` Mike Frysinger
2012-05-25 15:48       ` Uma Shankar
2012-05-25 15:48       ` [U-Boot] [PATCH V5 0/2] *** Add ext4 filesystem support in uboot *** Uma Shankar
2012-05-25 16:57         ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox