Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 1 | /* Yaffs commands. |
| 2 | * Modified by Charles Manning by adding ydevconfig command. |
| 3 | * |
| 4 | * Use ydevconfig to configure a mountpoint before use. |
| 5 | * For example: |
| 6 | * # Configure mountpt xxx using nand device 0 using blocks 100-500 |
| 7 | * ydevconfig xxx 0 100 500 |
| 8 | * # Mount it |
| 9 | * ymount xxx |
| 10 | * # yls, yrdm etc |
| 11 | * yls -l xxx |
| 12 | * yrdm xxx/boot-image 82000000 |
| 13 | * ... |
| 14 | */ |
| 15 | |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 16 | #include <common.h> |
| 17 | |
| 18 | #include <config.h> |
| 19 | #include <command.h> |
| 20 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 21 | #ifdef YAFFS2_DEBUG |
| 22 | #define PRINTF(fmt, args...) printf(fmt, ##args) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 23 | #else |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 24 | #define PRINTF(fmt, args...) do { } while (0) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 25 | #endif |
| 26 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 27 | extern void cmd_yaffs_dev_ls(void); |
| 28 | extern void cmd_yaffs_tracemask(unsigned set, unsigned mask); |
| 29 | extern void cmd_yaffs_devconfig(char *mp, int flash_dev, |
| 30 | int start_block, int end_block); |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 31 | extern void cmd_yaffs_mount(char *mp); |
| 32 | extern void cmd_yaffs_umount(char *mp); |
| 33 | extern void cmd_yaffs_read_file(char *fn); |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 34 | extern void cmd_yaffs_write_file(char *fn, char bval, int sizeOfFile); |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 35 | extern void cmd_yaffs_ls(const char *mountpt, int longlist); |
| 36 | extern void cmd_yaffs_mwrite_file(char *fn, char *addr, int size); |
| 37 | extern void cmd_yaffs_mread_file(char *fn, char *addr); |
| 38 | extern void cmd_yaffs_mkdir(const char *dir); |
| 39 | extern void cmd_yaffs_rmdir(const char *dir); |
| 40 | extern void cmd_yaffs_rm(const char *path); |
| 41 | extern void cmd_yaffs_mv(const char *oldPath, const char *newPath); |
| 42 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 43 | extern int yaffs_dump_dev(const char *path); |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 44 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 45 | /* ytrace - show/set yaffs trace mask */ |
| 46 | int do_ytrace(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 47 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 48 | if (argc > 1) |
| 49 | cmd_yaffs_tracemask(1, simple_strtol(argv[1], NULL, 16)); |
| 50 | else |
| 51 | cmd_yaffs_tracemask(0, 0); |
Wolfgang Denk | 4b07080 | 2008-08-14 14:41:06 +0200 | [diff] [blame] | 52 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 53 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 54 | } |
| 55 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 56 | /* ydevls - lists yaffs mount points. */ |
| 57 | int do_ydevls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 58 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 59 | cmd_yaffs_dev_ls(); |
Wolfgang Denk | 4b07080 | 2008-08-14 14:41:06 +0200 | [diff] [blame] | 60 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 61 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 62 | } |
| 63 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 64 | /* ydevconfig mount_pt mtd_dev_num start_block end_block */ |
| 65 | int do_ydevconfig(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 66 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 67 | char *mtpoint; |
| 68 | int mtd_dev; |
| 69 | int start_block; |
| 70 | int end_block; |
Wolfgang Denk | 4b07080 | 2008-08-14 14:41:06 +0200 | [diff] [blame] | 71 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 72 | if (argc != 5) { |
| 73 | printf |
| 74 | ("Bad arguments: ydevconfig mount_pt mtd_dev start_block end_block\n"); |
| 75 | return -1; |
| 76 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 77 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 78 | mtpoint = argv[1]; |
| 79 | mtd_dev = simple_strtol(argv[2], NULL, 16); |
| 80 | start_block = simple_strtol(argv[3], NULL, 16); |
| 81 | end_block = simple_strtol(argv[4], NULL, 16); |
| 82 | |
| 83 | cmd_yaffs_devconfig(mtpoint, mtd_dev, start_block, end_block); |
| 84 | |
| 85 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 86 | } |
| 87 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 88 | int do_ymount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 89 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 90 | char *mtpoint; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 91 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 92 | if (argc != 2) { |
| 93 | printf("Bad arguments: ymount mount_pt\n"); |
| 94 | return -1; |
| 95 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 96 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 97 | mtpoint = argv[1]; |
| 98 | printf("Mounting yaffs2 mount point %s\n", mtpoint); |
| 99 | |
| 100 | cmd_yaffs_mount(mtpoint); |
| 101 | |
| 102 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 103 | } |
| 104 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 105 | int do_yumount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 106 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 107 | char *mtpoint; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 108 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 109 | if (argc != 2) { |
| 110 | printf("Bad arguments: yumount mount_pt\n"); |
| 111 | return -1; |
| 112 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 113 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 114 | mtpoint = argv[1]; |
| 115 | printf("Unmounting yaffs2 mount point %s\n", mtpoint); |
| 116 | cmd_yaffs_umount(mtpoint); |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 117 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 118 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 119 | } |
| 120 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 121 | int do_yls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 122 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 123 | char *dirname; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 124 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 125 | if (argc < 2 || argc > 3 || (argc == 3 && strcmp(argv[1], "-l"))) { |
| 126 | printf("Bad arguments: yls [-l] dir\n"); |
| 127 | return -1; |
| 128 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 129 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 130 | dirname = argv[argc - 1]; |
| 131 | |
| 132 | cmd_yaffs_ls(dirname, (argc > 2) ? 1 : 0); |
| 133 | |
| 134 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 135 | } |
| 136 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 137 | int do_yrd(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 138 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 139 | char *filename; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 140 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 141 | if (argc != 2) { |
| 142 | printf("Bad arguments: yrd file_name\n"); |
| 143 | return -1; |
| 144 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 145 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 146 | filename = argv[1]; |
| 147 | |
| 148 | printf("Reading file %s ", filename); |
| 149 | |
| 150 | cmd_yaffs_read_file(filename); |
| 151 | |
| 152 | printf("done\n"); |
| 153 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 154 | } |
| 155 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 156 | int do_ywr(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 157 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 158 | char *filename; |
| 159 | ulong value; |
| 160 | ulong numValues; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 161 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 162 | if (argc != 4) { |
| 163 | printf("Bad arguments: ywr file_name value n_values\n"); |
| 164 | return -1; |
| 165 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 166 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 167 | filename = argv[1]; |
| 168 | value = simple_strtoul(argv[2], NULL, 16); |
| 169 | numValues = simple_strtoul(argv[3], NULL, 16); |
| 170 | |
| 171 | printf("Writing value (%lx) %lx times to %s... ", value, numValues, |
| 172 | filename); |
| 173 | |
| 174 | cmd_yaffs_write_file(filename, value, numValues); |
| 175 | |
| 176 | printf("done\n"); |
| 177 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 178 | } |
| 179 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 180 | int do_yrdm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 181 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 182 | char *filename; |
| 183 | ulong addr; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 184 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 185 | if (argc != 3) { |
| 186 | printf("Bad arguments: yrdm file_name addr\n"); |
| 187 | return -1; |
| 188 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 189 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 190 | filename = argv[1]; |
| 191 | addr = simple_strtoul(argv[2], NULL, 16); |
| 192 | |
| 193 | cmd_yaffs_mread_file(filename, (char *)addr); |
| 194 | |
| 195 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 196 | } |
| 197 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 198 | int do_ywrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 199 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 200 | char *filename; |
| 201 | ulong addr; |
| 202 | ulong size; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 203 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 204 | if (argc != 4) { |
| 205 | printf("Bad arguments: ywrm file_name addr size\n"); |
| 206 | return -1; |
| 207 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 208 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 209 | filename = argv[1]; |
| 210 | addr = simple_strtoul(argv[2], NULL, 16); |
| 211 | size = simple_strtoul(argv[3], NULL, 16); |
| 212 | |
| 213 | cmd_yaffs_mwrite_file(filename, (char *)addr, size); |
| 214 | |
| 215 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 216 | } |
| 217 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 218 | int do_ymkdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 219 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 220 | char *dirname; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 221 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 222 | if (argc != 2) { |
| 223 | printf("Bad arguments: ymkdir dir_name\n"); |
| 224 | return -1; |
| 225 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 226 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 227 | dirname = argv[1]; |
| 228 | cmd_yaffs_mkdir(dirname); |
| 229 | |
| 230 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 231 | } |
| 232 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 233 | int do_yrmdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 234 | { |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 235 | char *dirname; |
| 236 | |
| 237 | if (argc != 2) { |
| 238 | printf("Bad arguments: yrmdir dir_name\n"); |
| 239 | return -1; |
| 240 | } |
| 241 | |
| 242 | dirname = argv[1]; |
| 243 | cmd_yaffs_rmdir(dirname); |
| 244 | |
| 245 | return 0; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 246 | } |
| 247 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 248 | int do_yrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
| 249 | { |
| 250 | char *name; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 251 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 252 | if (argc != 2) { |
| 253 | printf("Bad arguments: yrm name\n"); |
| 254 | return -1; |
| 255 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 256 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 257 | name = argv[1]; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 258 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 259 | cmd_yaffs_rm(name); |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 260 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 261 | return 0; |
| 262 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 263 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 264 | int do_ymv(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
| 265 | { |
| 266 | char *oldPath; |
| 267 | char *newPath; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 268 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 269 | if (argc != 3) { |
| 270 | printf("Bad arguments: ymv old_path new_path\n"); |
| 271 | return -1; |
| 272 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 273 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 274 | oldPath = argv[1]; |
| 275 | newPath = argv[2]; |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 276 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 277 | cmd_yaffs_mv(newPath, oldPath); |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 278 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 279 | return 0; |
| 280 | } |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 281 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 282 | U_BOOT_CMD(ytrace, 2, 0, do_ytrace, |
| 283 | "show/set yaffs trace mask", |
| 284 | "ytrace [new_mask] show/set yaffs trace mask"); |
William Juul | 90ef117 | 2007-11-15 12:23:57 +0100 | [diff] [blame] | 285 | |
Charles Manning | 753ac61 | 2012-05-09 16:55:17 +0000 | [diff] [blame] | 286 | U_BOOT_CMD(ydevls, 1, 0, do_ydevls, |
| 287 | "list yaffs mount points", "list yaffs mount points"); |
| 288 | |
| 289 | U_BOOT_CMD(ydevconfig, 5, 0, do_ydevconfig, |
| 290 | "configure yaffs mount point", |
| 291 | "ydevconfig mtpoint mtd_id start_block end_block configures a yaffs2 mount point"); |
| 292 | |
| 293 | U_BOOT_CMD(ymount, 2, 0, do_ymount, |
| 294 | "mount yaffs", "ymount mtpoint mounts a yaffs2 mount point"); |
| 295 | |
| 296 | U_BOOT_CMD(yumount, 2, 0, do_yumount, |
| 297 | "unmount yaffs", "yunmount mtpoint unmounts a yaffs2 mount point"); |
| 298 | |
| 299 | U_BOOT_CMD(yls, 3, 0, do_yls, "yaffs ls", "yls [-l] dirname"); |
| 300 | |
| 301 | U_BOOT_CMD(yrd, 2, 0, do_yrd, |
| 302 | "read file from yaffs", "yrd path read file from yaffs"); |
| 303 | |
| 304 | U_BOOT_CMD(ywr, 4, 0, do_ywr, |
| 305 | "write file to yaffs", |
| 306 | "ywr filename value num_vlues write values to yaffs file"); |
| 307 | |
| 308 | U_BOOT_CMD(yrdm, 3, 0, do_yrdm, |
| 309 | "read file to memory from yaffs", |
| 310 | "yrdm filename offset reads yaffs file into memory"); |
| 311 | |
| 312 | U_BOOT_CMD(ywrm, 4, 0, do_ywrm, |
| 313 | "write file from memory to yaffs", |
| 314 | "ywrm filename offset size writes memory to yaffs file"); |
| 315 | |
| 316 | U_BOOT_CMD(ymkdir, 2, 0, do_ymkdir, |
| 317 | "YAFFS mkdir", "ymkdir dir create a yaffs directory"); |
| 318 | |
| 319 | U_BOOT_CMD(yrmdir, 2, 0, do_yrmdir, |
| 320 | "YAFFS rmdir", "yrmdir dirname removes a yaffs directory"); |
| 321 | |
| 322 | U_BOOT_CMD(yrm, 2, 0, do_yrm, "YAFFS rm", "yrm path removes a yaffs file"); |
| 323 | |
| 324 | U_BOOT_CMD(ymv, 4, 0, do_ymv, |
| 325 | "YAFFS mv", |
| 326 | "ymv old_path new_path moves/rename files within a yaffs mount point"); |