stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 1 | /* |
Uma Shankar | 71014b6 | 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 | 084f67c | 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 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 17 | * SPDX-License-Identifier: GPL-2.0+ |
stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | /* |
| 21 | * Ext2fs support |
| 22 | */ |
Stephen Warren | eefbc3f | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 23 | #include <fs.h> |
stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 24 | |
Wolfgang Denk | 6262d021 | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 25 | int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 26 | { |
Stephen Warren | eefbc3f | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 27 | return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT); |
stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 28 | } |
| 29 | |
stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 30 | /****************************************************************************** |
| 31 | * Ext2fs boot command intepreter. Derived from diskboot |
| 32 | */ |
Wolfgang Denk | 6262d021 | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 33 | int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 34 | { |
Wolfgang Denk | a10c7a5 | 2013-10-05 21:07:25 +0200 | [diff] [blame] | 35 | return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT); |
stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | U_BOOT_CMD( |
Uma Shankar | 71014b6 | 2012-05-25 21:21:44 +0530 | [diff] [blame] | 39 | ext2ls, 4, 1, do_ext2ls, |
| 40 | "list files in a directory (default /)", |
| 41 | "<interface> <dev[:part]> [directory]\n" |
| 42 | " - list files from 'dev' on 'interface' in a 'directory'" |
| 43 | ); |
| 44 | |
| 45 | U_BOOT_CMD( |
stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 46 | ext2load, 6, 0, do_ext2load, |
Peter Tyser | dfb72b8 | 2009-01-27 18:03:12 -0600 | [diff] [blame] | 47 | "load binary file from a Ext2 filesystem", |
stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 48 | "<interface> <dev[:part]> [addr] [filename] [bytes]\n" |
| 49 | " - load binary file 'filename' from 'dev' on 'interface'\n" |
Wolfgang Denk | a10c7a5 | 2013-10-05 21:07:25 +0200 | [diff] [blame] | 50 | " to address 'addr' from ext2 filesystem." |
stroese | 084f67c | 2004-12-16 17:33:10 +0000 | [diff] [blame] | 51 | ); |