[转]Uboot对Ext4文件系统的支持

7 篇文章 0 订阅

1. 2012-01-09 Samsung工程师提供了一系列patch,支持

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

 

    2012-05-25在Uboot maillist中,结束公示,然后Shankar发了一封mail:

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.

 

2. 上述3个命令的使用说明

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

    (2). 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

    (3). To write a file to a ext4 formatted partition.
            (3.1) 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

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值