From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- roms/u-boot/cmd/ext2.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 roms/u-boot/cmd/ext2.c (limited to 'roms/u-boot/cmd/ext2.c') diff --git a/roms/u-boot/cmd/ext2.c b/roms/u-boot/cmd/ext2.c new file mode 100644 index 000000000..57a99516a --- /dev/null +++ b/roms/u-boot/cmd/ext2.c @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2011 - 2012 Samsung Electronics + * EXT4 filesystem implementation in Uboot by + * Uma Shankar + * Manjunatha C Achar + + * (C) Copyright 2004 + * esd gmbh + * Reinhard Arlt + * + * made from cmd_reiserfs by + * + * (C) Copyright 2003 - 2004 + * Sysgo Real-Time Solutions, AG + * Pavel Bartusek + */ + +/* + * Ext2fs support + */ +#include +#include +#include + +static int do_ext2ls(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT); +} + +/****************************************************************************** + * Ext2fs boot command intepreter. Derived from diskboot + */ +int do_ext2load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT); +} + +U_BOOT_CMD( + ext2ls, 4, 1, do_ext2ls, + "list files in a directory (default /)", + " [directory]\n" + " - list files from 'dev' on 'interface' in a 'directory'" +) + +U_BOOT_CMD( + ext2load, 6, 0, do_ext2load, + "load binary file from a Ext2 filesystem", + " [ [addr [filename [bytes [pos]]]]]\n" + " - load binary file 'filename' from 'dev' on 'interface'\n" + " to address 'addr' from ext2 filesystem." +) -- cgit