stroese | bcd0be5 | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 1 | /* |
Uma Shankar | a159643 | 2012-05-25 21:21:44 +0530 | [diff] [blame] | 2 | * (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 | |
stroese | bcd0be5 | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 7 | * (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 | */ |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 40 | #include <fs.h> |
stroese | bcd0be5 | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 41 | |
Wolfgang Denk | 54841ab | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 42 | int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
stroese | bcd0be5 | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 43 | { |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 44 | return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT); |
Uma Shankar | a159643 | 2012-05-25 21:21:44 +0530 | [diff] [blame] | 45 | } |
Wolfgang Denk | 47e26b1 | 2010-07-17 01:06:04 +0200 | [diff] [blame] | 46 | |
Uma Shankar | a159643 | 2012-05-25 21:21:44 +0530 | [diff] [blame] | 47 | /****************************************************************************** |
| 48 | * Ext2fs boot command intepreter. Derived from diskboot |
| 49 | */ |
| 50 | int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
| 51 | { |
Stephen Warren | f9b55e2 | 2012-10-31 11:05:07 +0000 | [diff] [blame^] | 52 | return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT, 16); |
stroese | bcd0be5 | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | U_BOOT_CMD( |
| 56 | ext2ls, 4, 1, do_ext2ls, |
Peter Tyser | 2fb2604 | 2009-01-27 18:03:12 -0600 | [diff] [blame] | 57 | "list files in a directory (default /)", |
stroese | bcd0be5 | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 58 | "<interface> <dev[:part]> [directory]\n" |
Wolfgang Denk | a89c33d | 2009-05-24 17:06:54 +0200 | [diff] [blame] | 59 | " - list files from 'dev' on 'interface' in a 'directory'" |
stroese | bcd0be5 | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 60 | ); |
| 61 | |
stroese | bcd0be5 | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 62 | U_BOOT_CMD( |
| 63 | ext2load, 6, 0, do_ext2load, |
Peter Tyser | 2fb2604 | 2009-01-27 18:03:12 -0600 | [diff] [blame] | 64 | "load binary file from a Ext2 filesystem", |
stroese | bcd0be5 | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 65 | "<interface> <dev[:part]> [addr] [filename] [bytes]\n" |
| 66 | " - load binary file 'filename' from 'dev' on 'interface'\n" |
Stephen Warren | 3f83c87 | 2012-10-30 12:04:19 +0000 | [diff] [blame] | 67 | " to address 'addr' from ext2 filesystem.\n" |
| 68 | " All numeric parameters are assumed to be hex." |
stroese | bcd0be5 | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 69 | ); |