blob: 6657ef5ca4797c108d77d7e34307148cdfd4252f [file] [log] [blame]
stroese084f67c2004-12-16 17:33:10 +00001/*
Uma Shankar71014b62012-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
stroese084f67c2004-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 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +020017 * SPDX-License-Identifier: GPL-2.0+
stroese084f67c2004-12-16 17:33:10 +000018 */
19
20/*
21 * Ext2fs support
22 */
Stephen Warreneefbc3f2012-10-22 06:43:51 +000023#include <fs.h>
stroese084f67c2004-12-16 17:33:10 +000024
Jeroen Hofsteef384fbf2014-06-23 00:22:08 +020025static int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
stroese084f67c2004-12-16 17:33:10 +000026{
Stephen Warreneefbc3f2012-10-22 06:43:51 +000027 return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT);
stroese084f67c2004-12-16 17:33:10 +000028}
29
stroese084f67c2004-12-16 17:33:10 +000030/******************************************************************************
31 * Ext2fs boot command intepreter. Derived from diskboot
32 */
Jeroen Hofsteef384fbf2014-06-23 00:22:08 +020033int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
stroese084f67c2004-12-16 17:33:10 +000034{
Wolfgang Denka10c7a52013-10-05 21:07:25 +020035 return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT);
stroese084f67c2004-12-16 17:33:10 +000036}
37
38U_BOOT_CMD(
Uma Shankar71014b62012-05-25 21:21:44 +053039 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'"
Jeroen Hofsteef384fbf2014-06-23 00:22:08 +020043)
Uma Shankar71014b62012-05-25 21:21:44 +053044
45U_BOOT_CMD(
stroese084f67c2004-12-16 17:33:10 +000046 ext2load, 6, 0, do_ext2load,
Peter Tyserdfb72b82009-01-27 18:03:12 -060047 "load binary file from a Ext2 filesystem",
Pavel Machek264ebb52014-07-09 22:40:07 +020048 "<interface> [<dev[:part]> [addr [filename [bytes [pos]]]]]\n"
stroese084f67c2004-12-16 17:33:10 +000049 " - load binary file 'filename' from 'dev' on 'interface'\n"
Wolfgang Denka10c7a52013-10-05 21:07:25 +020050 " to address 'addr' from ext2 filesystem."
Jeroen Hofsteef384fbf2014-06-23 00:22:08 +020051)