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