blob: dc56ab25ffdff54fd6844bdc55cdc931a1875d74 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
stroese084f67c2004-12-16 17:33:10 +00002/*
Uma Shankar71014b62012-05-25 21:21:44 +05303 * (C) Copyright 2011 - 2012 Samsung Electronics
4 * EXT4 filesystem implementation in Uboot by
5 * Uma Shankar <uma.shankar@samsung.com>
6 * Manjunatha C Achar <a.manjunatha@samsung.com>
7
stroese084f67c2004-12-16 17:33:10 +00008 * (C) Copyright 2004
9 * esd gmbh <www.esd-electronics.com>
10 * Reinhard Arlt <reinhard.arlt@esd-electronics.com>
11 *
12 * made from cmd_reiserfs by
13 *
14 * (C) Copyright 2003 - 2004
15 * Sysgo Real-Time Solutions, AG <www.elinos.com>
16 * Pavel Bartusek <pba@sysgo.com>
stroese084f67c2004-12-16 17:33:10 +000017 */
18
19/*
20 * Ext2fs support
21 */
Stephen Warreneefbc3f2012-10-22 06:43:51 +000022#include <fs.h>
stroese084f67c2004-12-16 17:33:10 +000023
Jeroen Hofsteef384fbf2014-06-23 00:22:08 +020024static int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
stroese084f67c2004-12-16 17:33:10 +000025{
Stephen Warreneefbc3f2012-10-22 06:43:51 +000026 return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT);
stroese084f67c2004-12-16 17:33:10 +000027}
28
stroese084f67c2004-12-16 17:33:10 +000029/******************************************************************************
30 * Ext2fs boot command intepreter. Derived from diskboot
31 */
Jeroen Hofsteef384fbf2014-06-23 00:22:08 +020032int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
stroese084f67c2004-12-16 17:33:10 +000033{
Wolfgang Denka10c7a52013-10-05 21:07:25 +020034 return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT);
stroese084f67c2004-12-16 17:33:10 +000035}
36
37U_BOOT_CMD(
Uma Shankar71014b62012-05-25 21:21:44 +053038 ext2ls, 4, 1, do_ext2ls,
39 "list files in a directory (default /)",
40 "<interface> <dev[:part]> [directory]\n"
41 " - list files from 'dev' on 'interface' in a 'directory'"
Jeroen Hofsteef384fbf2014-06-23 00:22:08 +020042)
Uma Shankar71014b62012-05-25 21:21:44 +053043
44U_BOOT_CMD(
stroese084f67c2004-12-16 17:33:10 +000045 ext2load, 6, 0, do_ext2load,
Peter Tyserdfb72b82009-01-27 18:03:12 -060046 "load binary file from a Ext2 filesystem",
Pavel Machek264ebb52014-07-09 22:40:07 +020047 "<interface> [<dev[:part]> [addr [filename [bytes [pos]]]]]\n"
stroese084f67c2004-12-16 17:33:10 +000048 " - load binary file 'filename' from 'dev' on 'interface'\n"
Wolfgang Denka10c7a52013-10-05 21:07:25 +020049 " to address 'addr' from ext2 filesystem."
Jeroen Hofsteef384fbf2014-06-23 00:22:08 +020050)