cmd_ext2.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * (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. * (C) Copyright 2004
  7. * esd gmbh <www.esd-electronics.com>
  8. * Reinhard Arlt <reinhard.arlt@esd-electronics.com>
  9. *
  10. * made from cmd_reiserfs by
  11. *
  12. * (C) Copyright 2003 - 2004
  13. * Sysgo Real-Time Solutions, AG <www.elinos.com>
  14. * Pavel Bartusek <pba@sysgo.com>
  15. *
  16. * See file CREDITS for list of people who contributed to this
  17. * project.
  18. *
  19. * This program is free software; you can redistribute it and/or
  20. * modify it under the terms of the GNU General Public License as
  21. * published by the Free Software Foundation; either version 2 of
  22. * the License, or (at your option) any later version.
  23. *
  24. * This program is distributed in the hope that it will be useful,
  25. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  27. * GNU General Public License for more details.
  28. *
  29. * You should have received a copy of the GNU General Public License
  30. * along with this program; if not, write to the Free Software
  31. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  32. * MA 02111-1307 USA
  33. *
  34. */
  35. /*
  36. * Ext2fs support
  37. */
  38. #include <common.h>
  39. #include <ext_common.h>
  40. int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  41. {
  42. if (do_ext_ls(cmdtp, flag, argc, argv))
  43. return -1;
  44. return 0;
  45. }
  46. /******************************************************************************
  47. * Ext2fs boot command intepreter. Derived from diskboot
  48. */
  49. int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  50. {
  51. if (do_ext_load(cmdtp, flag, argc, argv))
  52. return -1;
  53. return 0;
  54. }
  55. U_BOOT_CMD(
  56. ext2ls, 4, 1, do_ext2ls,
  57. "list files in a directory (default /)",
  58. "<interface> <dev[:part]> [directory]\n"
  59. " - list files from 'dev' on 'interface' in a 'directory'"
  60. );
  61. U_BOOT_CMD(
  62. ext2load, 6, 0, do_ext2load,
  63. "load binary file from a Ext2 filesystem",
  64. "<interface> <dev[:part]> [addr] [filename] [bytes]\n"
  65. " - load binary file 'filename' from 'dev' on 'interface'\n"
  66. " to address 'addr' from ext2 filesystem"
  67. );