blob: dc56ab25ffdff54fd6844bdc55cdc931a1875d74 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
stroesebcd0be52004-12-16 17:33:10 +00002/*
Uma Shankara1596432012-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
stroesebcd0be52004-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>
stroesebcd0be52004-12-16 17:33:10 +000017 */
18
19/*
20 * Ext2fs support
21 */
Stephen Warren045fa1e2012-10-22 06:43:51 +000022#include <fs.h>
stroesebcd0be52004-12-16 17:33:10 +000023
Jeroen Hofstee0e350f82014-06-23 00:22:08 +020024static int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
stroesebcd0be52004-12-16 17:33:10 +000025{
Stephen Warren045fa1e2012-10-22 06:43:51 +000026 return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT);
Uma Shankara1596432012-05-25 21:21:44 +053027}
Wolfgang Denk47e26b12010-07-17 01:06:04 +020028
Uma Shankara1596432012-05-25 21:21:44 +053029/******************************************************************************
30 * Ext2fs boot command intepreter. Derived from diskboot
31 */
Jeroen Hofstee0e350f82014-06-23 00:22:08 +020032int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
Uma Shankara1596432012-05-25 21:21:44 +053033{
Wolfgang Denkb770e882013-10-05 21:07:25 +020034 return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT);
stroesebcd0be52004-12-16 17:33:10 +000035}
36
37U_BOOT_CMD(
38 ext2ls, 4, 1, do_ext2ls,
Peter Tyser2fb26042009-01-27 18:03:12 -060039 "list files in a directory (default /)",
stroesebcd0be52004-12-16 17:33:10 +000040 "<interface> <dev[:part]> [directory]\n"
Wolfgang Denka89c33d2009-05-24 17:06:54 +020041 " - list files from 'dev' on 'interface' in a 'directory'"
Jeroen Hofstee0e350f82014-06-23 00:22:08 +020042)
stroesebcd0be52004-12-16 17:33:10 +000043
stroesebcd0be52004-12-16 17:33:10 +000044U_BOOT_CMD(
45 ext2load, 6, 0, do_ext2load,
Peter Tyser2fb26042009-01-27 18:03:12 -060046 "load binary file from a Ext2 filesystem",
Pavel Machek6b367462014-07-09 22:40:07 +020047 "<interface> [<dev[:part]> [addr [filename [bytes [pos]]]]]\n"
stroesebcd0be52004-12-16 17:33:10 +000048 " - load binary file 'filename' from 'dev' on 'interface'\n"
Wolfgang Denkb770e882013-10-05 21:07:25 +020049 " to address 'addr' from ext2 filesystem."
Jeroen Hofstee0e350f82014-06-23 00:22:08 +020050)