blob: 6657ef5ca4797c108d77d7e34307148cdfd4252f [file] [log] [blame]
stroesebcd0be52004-12-16 17:33:10 +00001/*
Uma Shankara1596432012-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
stroesebcd0be52004-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 Denk1a459662013-07-08 09:37:19 +020017 * SPDX-License-Identifier: GPL-2.0+
stroesebcd0be52004-12-16 17:33:10 +000018 */
19
20/*
21 * Ext2fs support
22 */
Stephen Warren045fa1e2012-10-22 06:43:51 +000023#include <fs.h>
stroesebcd0be52004-12-16 17:33:10 +000024
Jeroen Hofstee0e350f82014-06-23 00:22:08 +020025static int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
stroesebcd0be52004-12-16 17:33:10 +000026{
Stephen Warren045fa1e2012-10-22 06:43:51 +000027 return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT);
Uma Shankara1596432012-05-25 21:21:44 +053028}
Wolfgang Denk47e26b12010-07-17 01:06:04 +020029
Uma Shankara1596432012-05-25 21:21:44 +053030/******************************************************************************
31 * Ext2fs boot command intepreter. Derived from diskboot
32 */
Jeroen Hofstee0e350f82014-06-23 00:22:08 +020033int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
Uma Shankara1596432012-05-25 21:21:44 +053034{
Wolfgang Denkb770e882013-10-05 21:07:25 +020035 return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT);
stroesebcd0be52004-12-16 17:33:10 +000036}
37
38U_BOOT_CMD(
39 ext2ls, 4, 1, do_ext2ls,
Peter Tyser2fb26042009-01-27 18:03:12 -060040 "list files in a directory (default /)",
stroesebcd0be52004-12-16 17:33:10 +000041 "<interface> <dev[:part]> [directory]\n"
Wolfgang Denka89c33d2009-05-24 17:06:54 +020042 " - list files from 'dev' on 'interface' in a 'directory'"
Jeroen Hofstee0e350f82014-06-23 00:22:08 +020043)
stroesebcd0be52004-12-16 17:33:10 +000044
stroesebcd0be52004-12-16 17:33:10 +000045U_BOOT_CMD(
46 ext2load, 6, 0, do_ext2load,
Peter Tyser2fb26042009-01-27 18:03:12 -060047 "load binary file from a Ext2 filesystem",
Pavel Machek6b367462014-07-09 22:40:07 +020048 "<interface> [<dev[:part]> [addr [filename [bytes [pos]]]]]\n"
stroesebcd0be52004-12-16 17:33:10 +000049 " - load binary file 'filename' from 'dev' on 'interface'\n"
Wolfgang Denkb770e882013-10-05 21:07:25 +020050 " to address 'addr' from ext2 filesystem."
Jeroen Hofstee0e350f82014-06-23 00:22:08 +020051)