blob: c27d9c7edeb744442239bde4122de727ed94c84b [file] [log] [blame]
stroesebcd0be52004-12-16 17:33:10 +00001/*
Uma Shankara1596432012-05-25 21:21:44 +05302 * (C) Copyright 2011 - 2012 Samsung Electronics
3 * EXT4 filesystem implementation in Uboot by
4 * Uma Shankar <uma.shankar@samsung.com>
5 * Manjunatha C Achar <a.manjunatha@samsung.com>
6
stroesebcd0be52004-12-16 17:33:10 +00007 * (C) Copyright 2004
8 * esd gmbh <www.esd-electronics.com>
9 * Reinhard Arlt <reinhard.arlt@esd-electronics.com>
10 *
11 * made from cmd_reiserfs by
12 *
13 * (C) Copyright 2003 - 2004
14 * Sysgo Real-Time Solutions, AG <www.elinos.com>
15 * Pavel Bartusek <pba@sysgo.com>
16 *
17 * See file CREDITS for list of people who contributed to this
18 * project.
19 *
20 * This program is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU General Public License as
22 * published by the Free Software Foundation; either version 2 of
23 * the License, or (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
29 *
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
33 * MA 02111-1307 USA
34 *
35 */
36
37/*
38 * Ext2fs support
39 */
40#include <common.h>
Uma Shankara1596432012-05-25 21:21:44 +053041#include <ext_common.h>
stroesebcd0be52004-12-16 17:33:10 +000042
Wolfgang Denk54841ab2010-06-28 22:00:46 +020043int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
stroesebcd0be52004-12-16 17:33:10 +000044{
Uma Shankara1596432012-05-25 21:21:44 +053045 if (do_ext_ls(cmdtp, flag, argc, argv))
46 return -1;
stroesebcd0be52004-12-16 17:33:10 +000047
Uma Shankara1596432012-05-25 21:21:44 +053048 return 0;
49}
Wolfgang Denk47e26b12010-07-17 01:06:04 +020050
Uma Shankara1596432012-05-25 21:21:44 +053051/******************************************************************************
52 * Ext2fs boot command intepreter. Derived from diskboot
53 */
54int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
55{
56 if (do_ext_load(cmdtp, flag, argc, argv))
57 return -1;
stroesebcd0be52004-12-16 17:33:10 +000058
Wolfgang Denk4b751142009-07-28 22:07:37 +020059 return 0;
stroesebcd0be52004-12-16 17:33:10 +000060}
61
62U_BOOT_CMD(
63 ext2ls, 4, 1, do_ext2ls,
Peter Tyser2fb26042009-01-27 18:03:12 -060064 "list files in a directory (default /)",
stroesebcd0be52004-12-16 17:33:10 +000065 "<interface> <dev[:part]> [directory]\n"
Wolfgang Denka89c33d2009-05-24 17:06:54 +020066 " - list files from 'dev' on 'interface' in a 'directory'"
stroesebcd0be52004-12-16 17:33:10 +000067);
68
stroesebcd0be52004-12-16 17:33:10 +000069U_BOOT_CMD(
70 ext2load, 6, 0, do_ext2load,
Peter Tyser2fb26042009-01-27 18:03:12 -060071 "load binary file from a Ext2 filesystem",
stroesebcd0be52004-12-16 17:33:10 +000072 "<interface> <dev[:part]> [addr] [filename] [bytes]\n"
73 " - load binary file 'filename' from 'dev' on 'interface'\n"
Wolfgang Denka89c33d2009-05-24 17:06:54 +020074 " to address 'addr' from ext2 filesystem"
stroesebcd0be52004-12-16 17:33:10 +000075);