Re: [U-Boot] [PATCH V5 2/2] ext4fs write support

2012-08-13 Thread uma . shankar

Dear Wolfgang,
We have tested this feature on Samsung Boards using mmc interface. Here is a 
sample test run with exactly the same file size which you have used for 
testing


[Mon Aug 13 19:05:51.824 2012]  # ext4load mmc 0:6 0x40007fc0 abc.tar
[Mon Aug 13 19:05:51.846 2012] Loading file abc.tar from mmc device 0:6 
(dt)

[Mon Aug 13 19:05:53.087 2012] 33554432 bytes read
[Mon Aug 13 19:05:53.091 2012] #
Time taken 1.267s
= 25.25 MiB/s

[Mon Aug 13 19:07:35.323 2012] # ext4load mmc 0:6 0x40007fc0 abc.tar
[Mon Aug 13 19:07:35.351 2012] Loading file abc.tar from mmc device 0:6 
(dt)

[Mon Aug 13 19:07:36.591 2012] 33554432 bytes read
[Mon Aug 13 19:07:36.595 2012] #
Time taken 1.272s
= 25.15 MiB/s

I tried to look into ide interface implementation. It seems in case of ide 
(cmd_ide.c), ide_read function tries to read block by block.
Whereas in case of mmc interface, it has bulk read implementation where in 
multiple continuous blocks can be read in one shot.


Previous implementation of ext2 relies on block by block read, where as in 
current implementation multiple block read has been used. Thus, we are 
getting slow performance for ide in both the cases.


Note: I am using teraterm timestamp instead of date command to measure time.

Thanks  Regards,
Uma Shankar
--
From: Wolfgang Denk w...@denx.de
Sent: Monday, August 13, 2012 5:25 PM
To: Uma Shankar uma.shan...@samsung.com
Cc: Manjunatha C Achar a.manjuna...@samsung.com; 
kim.phill...@freescale.com; u-boot@lists.denx.de; Hakgoo Lee 
goodguy@samsung.com; Iqbal Shareef iqbal@samsung.com

Subject: Re: [U-Boot] [PATCH V5 2/2] ext4fs write support


Dear Uma Shankar,

In message 20120809215050.89de2204...@gemini.denx.de I wrote:


Applied to ext4 branch, thanks.


I did some performance tests on a MPC5200 based board using the IDE
interface (no DMA):

= vers

U-Boot 2012.07-00125-ged34f34 (Aug 10 2012 - 09:36:33)
powerpc-linux-gcc (GCC) 4.6.4 20120303 (prerelease)
GNU ld (GNU Binutils) 2.22
= date ; ext2load ide 0:4 10 usr-bin.tar 200 ; date
Date: 2012-08-10 (Saturday)Time: 16:27:21
Loading file usr-bin.tar from ide device 0:4 hda4
33554432 bytes read
Date: 2012-08-10 (Saturday)Time: 16:27:48

=

27 seconds = 1.2 MiB/s

= vers

U-Boot 2012.07 (Aug 02 2012 - 10:31:44)
powerpc-linux-gcc (GCC) 4.6.4 20120303 (prerelease)
GNU ld (GNU Binutils) 2.22
= date ; ext2load ide 0:4 10 usr-bin.tar 200 ; date
Date: 2012-08-10 (Saturday)Time: 16:49:31
Loading file usr-bin.tar from ide device 0:4 (hda4)
33554432 bytes read
Date: 2012-08-10 (Saturday)Time: 16:49:57

=

26 seconds = 1.2 MiB/s


So within the accuracy of this measurement,the performance of the new
code compared to the old ext2 code appears to be pretty much the same.

Tested-by: Wolfgang Denk w...@denx.de

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: w...@denx.de
Keep your eyes wide open before marriage, half shut afterwards.
-- Benjamin Franklin 


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Add ext4 write support

2012-05-25 Thread Uma Shankar
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
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V5 0/2] *** Add ext4 filesystem support in uboot ***

2012-05-25 Thread Uma Shankar
***
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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Add ext4 write support

2012-01-09 Thread uma . shankar
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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V4 0/2] *** Add ext4 filesystem support in uboot ***

2012-01-09 Thread uma . shankar
From: uma.shankar uma.shan...@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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Add ext4 write support

2011-12-27 Thread uma . shankar
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


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V3 0/2] *** Add ext4 filesystem support in uboot ***

2011-12-27 Thread uma . shankar
From: Uma Shankar uma.shan...@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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/2] *** Add ext4 filesystem support in uboot ***

2011-12-14 Thread uma . shankar
From: Uma Shankar uma.shan...@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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] test mail

2011-12-12 Thread uma . shankar
Test mail to mailing list. Please ignore. 
Sorry for the spam.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Subject: [PATCH 0/2] ** Add ext4 filesystem support in uboot **

2011-12-12 Thread uma . shankar

Hi All,
We at Samsung have implemented ext4 file system support in uboot. Please 
review the subsequent patches.


Thanks  Regards,
Uma Shankar
Manjunatha C Achar


From: Uma Shankar uma.shan...@samsung.com
Date: Mon, 12 Dec 2011 12:01:23 +0530
Subject: [PATCH 0/2] *** Add ext4 filesystem support in uboot ***

***
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_ext4.c  |  388 ++
fs/Makefile|1 +
fs/ext2/ext2fs.c   |  303 +
fs/ext4/Makefile   |   51 ++
fs/ext4/crc16.c|   61 ++
fs/ext4/crc16.h|   17 +
fs/ext4/ext4_common.c  | 1954 


fs/ext4/ext4_common.h  |   61 ++
fs/ext4/ext4_journal.c |  657 
fs/ext4/ext4_journal.h |  147 
fs/ext4/ext4fs.c   | 1252 +++
include/ext2fs.h   |  177 +-
include/ext4fs.h   |  172 +
15 files changed, 4937 insertions(+), 307 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 


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Subject: [PATCH 1/2] ext4fs ls load support

2011-12-12 Thread uma . shankar

From: Uma Shankar uma.shan...@samsung.com
Date: Mon, 12 Dec 2011 12:01:22 +0530
Subject: [PATCH 1/2] ext4fs ls load support

Signed-off-by: Uma Shankar uma.shan...@samsung.com, Manjunatha C Achar 
a.manjuna...@samsung.com

Signed-off-by: Iqbal Shareef iqbal@samsung.com
Signed-off-by: Hakgoo Lee goodguy@samsung.com
---
Makefile  |2 +-
common/Makefile   |1 +
common/cmd_ext4.c |  255 ++
fs/Makefile   |1 +
fs/ext2/ext2fs.c  |  303 +--
fs/ext4/Makefile  |   51 +
fs/ext4/ext4_common.c |  572 
+

fs/ext4/ext4_common.h |   44 
fs/ext4/ext4fs.c  |  215 ++
include/ext2fs.h  |  177 +++-
include/ext4fs.h  |  164 ++
11 files changed, 1478 insertions(+), 307 deletions(-)
create mode 100644 common/cmd_ext4.c
create mode 100644 fs/ext4/Makefile
create mode 100644 fs/ext4/ext4_common.c
create mode 100644 fs/ext4/ext4_common.h
create mode 100644 fs/ext4/ext4fs.c
create mode 100644 include/ext4fs.h

diff --git a/Makefile b/Makefile
index fb658f4..5f29812 100644
--- a/Makefile
+++ b/Makefile
@@ -235,7 +235,7 @@ LIBS += dts/libdts.o
endif
LIBS += arch/$(ARCH)/lib/lib$(ARCH).o
LIBS += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o 
fs/jffs2/libjffs2.o \

- fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \
+ fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/ext4/libext4fs.o 
fs/yaffs2/libyaffs2.o \

 fs/ubifs/libubifs.o
LIBS += net/libnet.o
LIBS += disk/libdisk.o
diff --git a/common/Makefile b/common/Makefile
index 1b672ad..d7fd4a8 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -90,6 +90,7 @@ COBJS-$(CONFIG_CMD_EEPROM) += cmd_eeprom.o
COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o
COBJS-$(CONFIG_SYS_HUSH_PARSER) += cmd_exit.o
COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o
+COBJS-$(CONFIG_CMD_EXT4) += cmd_ext4.o
COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
COBJS-$(CONFIG_CMD_FDC)$(CONFIG_CMD_FDOS) += cmd_fdc.o
COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
diff --git a/common/cmd_ext4.c b/common/cmd_ext4.c
new file mode 100644
index 000..b223443
--- /dev/null
+++ b/common/cmd_ext4.c
@@ -0,0 +1,255 @@
+/*
+ * (C) Copyright 2011 Samsung Electronics
+ * EXT4 filesystem implementation in Uboot by
+ * Uma Shankar uma.shan...@samsung.com
+ * Manjunatha C Achar a.manjuna...@samsung.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+/*
+ * Ext4fs support
+ * made from existing cmd_ext2.c file of Uboot
+ */
+#include common.h
+#include part.h
+#include config.h
+#include command.h
+#include image.h
+#include linux/ctype.h
+#include asm/byteorder.h
+#include ext2fs.h
+#include ext4fs.h
+#include linux/stat.h
+#include ../disk/part_dos.h
+#include malloc.h
+
+#if defined(CONFIG_CMD_USB)  defined(CONFIG_USB_STORAGE)
+#include usb.h
+#endif
+
+#if !defined(CONFIG_DOS_PARTITION)  !defined(CONFIG_EFI_PARTITION)
+#error DOS or EFI partition support must be selected
+#endif
+
+uint64_t total_sector;
+uint64_t part_offset;
+static uint64_t part_size;
+static uint16_t cur_part = 1;
+
+#define DOS_PART_MAGIC_OFFSET  0x1fe
+#define DOS_FS_TYPE_OFFSET  0x36
+#define DOS_FS32_TYPE_OFFSET  0x52
+
+int do_ext4_load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+{
+ char *filename = NULL;
+ char *ep;
+ int dev, part = 1;
+ ulong addr = 0, part_length;
+ int filelen;
+ disk_partition_t info;
+ ExtFileSystem *fs;
+ char buf[12];
+ unsigned long count;
+ char *addr_str;
+
+ switch (argc) {
+ case 3:
+  addr_str = getenv(loadaddr);
+  if (addr_str != NULL)
+   addr = strict_strtoul(addr_str, NULL, 16);
+  else
+   addr = CONFIG_SYS_LOAD_ADDR;
+
+  filename = getenv(bootfile);
+  count = 0;
+  break;
+ case 4:
+  addr = strict_strtoul(argv[3], NULL, 16);
+  filename = getenv(bootfile);
+  count = 0;
+  break;
+ case 5:
+  addr = strict_strtoul(argv[3], NULL, 16);
+  filename = argv[4];
+  count = 0;
+  break;
+ case 6:
+  addr = strict_strtoul(argv[3], NULL, 16);
+  filename = argv[4];
+  count = strict_strtoul(argv[5], NULL, 16);
+  break;
+
+ default:
+  return cmd_usage(cmdtp);
+ }
+
+ if (!filename) {
+  puts(** No boot file defined **\n);
+  return 1;
+ }
+
+ dev = (int)strict_strtoul(argv[2], ep, 16);
+ ext4_dev_desc = get_dev(argv[1

Re: [U-Boot] Subject: [PATCH 0/2] ** Add ext4 filesystem support inuboot **

2011-12-12 Thread uma . shankar

Hi Graeme,
Thanks for your inputs.

Actually, the first patch [PATCH 0/2] is the cover patch containing only the 
description about the changes in the subsequent patches. (This patch 
contains information on how to test ext4 implementation)


The other two patches [PATCH 1/2] and [PATCH 2/2] containing the code are 
properly aligned and tested using checkpatch.pl script.


I think we can ignore the indentation in the cover patch. Please share your 
comments.


Thanks  Regards,
Uma Shankar
--
From: Graeme Russ graeme.r...@gmail.com
Sent: Monday, December 12, 2011 4:42 PM
To: uma.shan...@samsung.com
Cc: u-boot@lists.denx.de; iqbal@samsung.com; 
a.manjuna...@samsung.com; goodguy@samsung.com; w...@denx.de
Subject: Re: [U-Boot] Subject: [PATCH 0/2] ** Add ext4 filesystem support 
inuboot **



Hi Uma,

On 12/12/11 21:37, uma.shan...@samsung.com wrote:

Hi All,
We at Samsung have implemented ext4 file system support in uboot. Please
review the subsequent patches.

Thanks  Regards,
Uma Shankar
Manjunatha C Achar


From: Uma Shankar uma.shan...@samsung.com
Date: Mon, 12 Dec 2011 12:01:23 +0530
Subject: [PATCH 0/2] *** Add ext4 filesystem support in uboot ***

***
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


I notice different coding styles in the two patches - In particular, the
first patch uses spaces for indentation and the second (correctly) uses 
tabs


Can you please run the 'checkpatch' script (it in the root of the u-boot
tree) on both and correct any errors and warnings

Regards,

Graeme


Makefile   |2 +-
common/Makefile|1 +
common/cmd_ext4.c  |  388 ++
fs/Makefile|1 +
fs/ext2/ext2fs.c   |  303 +
fs/ext4/Makefile   |   51 ++
fs/ext4/crc16.c|   61 ++
fs/ext4/crc16.h|   17 +
fs/ext4/ext4_common.c  | 1954 


fs/ext4/ext4_common.h  |   61 ++
fs/ext4/ext4_journal.c |  657 
fs/ext4/ext4_journal.h |  147 
fs/ext4/ext4fs.c   | 1252 +++
include/ext2fs.h   |  177 +-
include/ext4fs.h   |  172 +
15 files changed, 4937 insertions(+), 307 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
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot




___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot