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