]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/karo/tx28/flash.c
TX6 Release 2013-04-22
[karo-tx-uboot.git] / board / karo / tx28 / flash.c
1 #include <common.h>
2 #include <malloc.h>
3 #include <nand.h>
4 #include <errno.h>
5
6 #include <linux/err.h>
7
8 #include <asm/io.h>
9 #include <asm/sizes.h>
10 #include <asm/arch/regs-base.h>
11 #include <asm/arch/regs-gpmi.h>
12 #include <asm/arch/regs-bch.h>
13
14 #define FCB_START_BLOCK         0
15 #define NUM_FCB_BLOCKS          1
16 #define MAX_FCB_BLOCKS          32768
17
18 struct mx28_nand_timing {
19         u8 data_setup;
20         u8 data_hold;
21         u8 address_setup;
22         u8 dsample_time;
23         u8 nand_timing_state;
24         u8 tREA;
25         u8 tRLOH;
26         u8 tRHOH;
27 };
28
29 struct mx28_fcb {
30         u32 checksum;
31         u32 fingerprint;
32         u32 version;
33         struct mx28_nand_timing timing;
34         u32 page_data_size;
35         u32 total_page_size;
36         u32 sectors_per_block;
37         u32 number_of_nands;    /* not used by ROM code */
38         u32 total_internal_die; /* not used by ROM code */
39         u32 cell_type;          /* not used by ROM code */
40         u32 ecc_blockn_type;
41         u32 ecc_block0_size;
42         u32 ecc_blockn_size;
43         u32 ecc_block0_type;
44         u32 metadata_size;
45         u32 ecc_blocks_per_page;
46         u32 rsrvd[6];            /* not used by ROM code */
47         u32 bch_mode;
48         u32 boot_patch;
49         u32 patch_sectors;
50         u32 fw1_start_page;
51         u32 fw2_start_page;
52         u32 fw1_sectors;
53         u32 fw2_sectors;
54         u32 dbbt_search_area;
55         u32 bb_mark_byte;
56         u32 bb_mark_startbit;
57         u32 bb_mark_phys_offset;
58 };
59
60 struct mx28_dbbt_header {
61         u32 checksum;
62         u32 fingerprint;
63         u32 version;
64         u32 number_bb;
65         u32 number_pages;
66         u8 spare[492];
67 };
68
69 struct mx28_dbbt {
70         u32 nand_number;
71         u32 number_bb;
72         u32 bb_num[2040 / 4];
73 };
74
75 #define BF_VAL(v, bf)           (((v) & bf##_MASK) >> bf##_OFFSET)
76
77 static nand_info_t *mtd = &nand_info[0];
78
79 extern void *_start;
80
81 #define BIT(v,n)        (((v) >> (n)) & 0x1)
82
83 static u8 calculate_parity_13_8(u8 d)
84 {
85         u8 p = 0;
86
87         p |= (BIT(d, 6) ^ BIT(d, 5) ^ BIT(d, 3) ^ BIT(d, 2))             << 0;
88         p |= (BIT(d, 7) ^ BIT(d, 5) ^ BIT(d, 4) ^ BIT(d, 2) ^ BIT(d, 1)) << 1;
89         p |= (BIT(d, 7) ^ BIT(d, 6) ^ BIT(d, 5) ^ BIT(d, 1) ^ BIT(d, 0)) << 2;
90         p |= (BIT(d, 7) ^ BIT(d, 4) ^ BIT(d, 3) ^ BIT(d, 0))             << 3;
91         p |= (BIT(d, 6) ^ BIT(d, 4) ^ BIT(d, 3) ^ BIT(d, 2) ^ BIT(d, 1) ^ BIT(d, 0)) << 4;
92         return p;
93 }
94
95 static void encode_hamming_13_8(void *_src, void *_ecc, size_t size)
96 {
97         int i;
98         u8 *src = _src;
99         u8 *ecc = _ecc;
100
101         for (i = 0; i < size; i++)
102                 ecc[i] = calculate_parity_13_8(src[i]);
103 }
104
105 static u32 calc_chksum(void *buf, size_t size)
106 {
107         u32 chksum = 0;
108         u8 *bp = buf;
109         size_t i;
110
111         for (i = 0; i < size; i++) {
112                 chksum += bp[i];
113         }
114         return ~chksum;
115 }
116
117 /*
118   Physical organisation of data in NAND flash:
119   metadata
120   payload chunk 0 (may be empty)
121   ecc for metadata + payload chunk 0
122   payload chunk 1
123   ecc for payload chunk 1
124 ...
125   payload chunk n
126   ecc for payload chunk n
127  */
128
129 static int calc_bb_offset(nand_info_t *mtd, struct mx28_fcb *fcb)
130 {
131         int bb_mark_offset;
132         int chunk_data_size = fcb->ecc_blockn_size * 8;
133         int chunk_ecc_size = (fcb->ecc_blockn_type << 1) * 13;
134         int chunk_total_size = chunk_data_size + chunk_ecc_size;
135         int bb_mark_chunk, bb_mark_chunk_offs;
136
137         bb_mark_offset = (mtd->writesize - fcb->metadata_size) * 8;
138         if (fcb->ecc_block0_size == 0)
139                 bb_mark_offset -= (fcb->ecc_block0_type << 1) * 13;
140
141         bb_mark_chunk = bb_mark_offset / chunk_total_size;
142         bb_mark_chunk_offs = bb_mark_offset - (bb_mark_chunk * chunk_total_size);
143         if (bb_mark_chunk_offs > chunk_data_size) {
144                 printf("Unsupported ECC layout; BB mark resides in ECC data: %u\n",
145                         bb_mark_chunk_offs);
146                 return -EINVAL;
147         }
148         bb_mark_offset -= bb_mark_chunk * chunk_ecc_size;
149         return bb_mark_offset;
150 }
151
152 static struct mx28_fcb *create_fcb(void *buf, int fw1_start_block,
153                                 int fw2_start_block, size_t fw_size)
154 {
155         struct gpmi_regs *gpmi_base = (void *)GPMI_BASE_ADDRESS;
156         struct bch_regs *bch_base = (void *)BCH_BASE_ADDRESS;
157         u32 fl0, fl1;
158         u32 t0, t1;
159         int metadata_size;
160         int bb_mark_bit_offs;
161         struct mx28_fcb *fcb;
162         int fcb_offs;
163
164         if (gpmi_base == NULL || bch_base == NULL) {
165                 return ERR_PTR(-ENOMEM);
166         }
167
168         fl0 = readl(&bch_base->hw_bch_flash0layout0);
169         fl1 = readl(&bch_base->hw_bch_flash0layout1);
170         t0 = readl(&gpmi_base->hw_gpmi_timing0);
171         t1 = readl(&gpmi_base->hw_gpmi_timing1);
172
173         metadata_size = BF_VAL(fl0, BCH_FLASHLAYOUT0_META_SIZE);
174
175         fcb = buf + ALIGN(metadata_size, 4);
176         fcb_offs = (void *)fcb - buf;
177
178         memset(buf, 0xff, fcb_offs);
179         memset(fcb, 0x00, sizeof(*fcb));
180         memset(fcb + 1, 0xff, mtd->erasesize - fcb_offs - sizeof(*fcb));
181
182         strncpy((char *)&fcb->fingerprint, "FCB ", 4);
183         fcb->version = cpu_to_be32(1);
184
185         fcb->timing.data_setup = BF_VAL(t0, GPMI_TIMING0_DATA_SETUP);
186         fcb->timing.data_hold = BF_VAL(t0, GPMI_TIMING0_DATA_HOLD);
187         fcb->timing.address_setup = BF_VAL(t0, GPMI_TIMING0_ADDRESS_SETUP);
188
189         fcb->page_data_size = mtd->writesize;
190         fcb->total_page_size = mtd->writesize + mtd->oobsize;
191         fcb->sectors_per_block = mtd->erasesize / mtd->writesize;
192
193         fcb->ecc_block0_type = BF_VAL(fl0, BCH_FLASHLAYOUT0_ECC0);
194         fcb->ecc_block0_size = BF_VAL(fl0, BCH_FLASHLAYOUT0_DATA0_SIZE);
195         fcb->ecc_blockn_type = BF_VAL(fl1, BCH_FLASHLAYOUT1_ECCN);
196         fcb->ecc_blockn_size = BF_VAL(fl1, BCH_FLASHLAYOUT1_DATAN_SIZE);
197
198         fcb->metadata_size = BF_VAL(fl0, BCH_FLASHLAYOUT0_META_SIZE);
199         fcb->ecc_blocks_per_page = BF_VAL(fl0, BCH_FLASHLAYOUT0_NBLOCKS);
200         fcb->bch_mode = readl(&bch_base->hw_bch_mode);
201 /*
202         fcb->boot_patch = 0;
203         fcb->patch_sectors = 0;
204 */
205         fcb->fw1_start_page = fw1_start_block * mtd->erasesize / mtd->writesize;
206         fcb->fw1_sectors = DIV_ROUND_UP(fw_size, mtd->writesize);
207
208         if (fw2_start_block != 0 && fw2_start_block < mtd->size / mtd->erasesize) {
209                 fcb->fw2_start_page = fw2_start_block * mtd->erasesize / mtd->writesize;
210                 fcb->fw2_sectors = fcb->fw1_sectors;
211         }
212
213         fcb->dbbt_search_area = 1;
214
215         bb_mark_bit_offs = calc_bb_offset(mtd, fcb);
216         if (bb_mark_bit_offs < 0)
217                 return ERR_PTR(bb_mark_bit_offs);
218         fcb->bb_mark_byte = bb_mark_bit_offs / 8;
219         fcb->bb_mark_startbit = bb_mark_bit_offs % 8;
220         fcb->bb_mark_phys_offset = mtd->writesize;
221
222         fcb->checksum = calc_chksum(&fcb->fingerprint, 512 - 4);
223         return fcb;
224 }
225
226 static int find_fcb(void *ref, int page)
227 {
228         int ret = 0;
229         struct nand_chip *chip = mtd->priv;
230         void *buf = malloc(mtd->erasesize);
231
232         if (buf == NULL) {
233                 return -ENOMEM;
234         }
235         chip->select_chip(mtd, 0);
236         chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page);
237         ret = chip->ecc.read_page_raw(mtd, chip, buf, page);
238         if (ret) {
239                 printf("Failed to read FCB from page %u: %d\n", page, ret);
240                 return ret;
241         }
242         chip->select_chip(mtd, -1);
243         if (memcmp(buf, ref, mtd->writesize) == 0) {
244                 printf("%s: Found FCB in page %u (%08x)\n", __func__,
245                         page, page * mtd->writesize);
246                 ret = 1;
247         }
248         free(buf);
249         return ret;
250 }
251
252 static int write_fcb(void *buf, int block)
253 {
254         int ret;
255         struct nand_chip *chip = mtd->priv;
256         int page = block * mtd->erasesize / mtd->writesize;
257
258         ret = find_fcb(buf, page);
259         if (ret > 0) {
260                 printf("FCB at block %d is up to date\n", block);
261                 return 0;
262         }
263
264         ret = nand_erase(mtd, block * mtd->erasesize, mtd->erasesize);
265         if (ret) {
266                 printf("Failed to erase FCB block %u\n", block);
267                 return ret;
268         }
269
270         printf("Writing FCB to block %d @ %08x\n", block,
271                 block * mtd->erasesize);
272         chip->select_chip(mtd, 0);
273         ret = chip->write_page(mtd, chip, buf, page, 0, 1);
274         if (ret) {
275                 printf("Failed to write FCB to block %u: %d\n", block, ret);
276         }
277         chip->select_chip(mtd, -1);
278         return ret;
279 }
280
281 #define chk_overlap(a,b)                                \
282         ((a##_start_block <= b##_end_block &&           \
283                 a##_end_block >= b##_start_block) ||    \
284         (b##_start_block <= a##_end_block &&            \
285                 b##_end_block >= a##_start_block))
286
287 #define fail_if_overlap(a,b,m1,m2) do {                         \
288         if (chk_overlap(a, b)) {                                \
289                 printf("%s blocks %lu..%lu overlap %s in blocks %lu..%lu!\n", \
290                         m1, a##_start_block, a##_end_block,     \
291                         m2, b##_start_block, b##_end_block);    \
292                 return -EINVAL;                                 \
293         }                                                       \
294 } while (0)
295
296 #ifndef CONFIG_ENV_OFFSET_REDUND
297 #define TOTAL_ENV_SIZE CONFIG_ENV_SIZE
298 #else
299 #define TOTAL_ENV_SIZE (CONFIG_ENV_SIZE * 2)
300 #endif
301
302 int do_update(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
303 {
304         int ret;
305         int block;
306         int erase_size = mtd->erasesize;
307         int page_size = mtd->writesize;
308         void *buf;
309         char *load_addr;
310         char *file_size;
311         size_t size = 0;
312         void *addr = NULL;
313         struct mx28_fcb *fcb;
314         unsigned long fcb_start_block = FCB_START_BLOCK;
315         unsigned long num_fcb_blocks = NUM_FCB_BLOCKS;
316         unsigned long fcb_end_block;
317         unsigned long mtd_num_blocks = mtd->size / mtd->erasesize;
318         unsigned long env_start_block = CONFIG_ENV_OFFSET / mtd->erasesize;
319         unsigned long env_end_block = env_start_block +
320                 DIV_ROUND_UP(TOTAL_ENV_SIZE, mtd->erasesize) - 1;
321         int optind;
322         int fw1_set = 0;
323         int fw2_set = 0;
324         unsigned long fw1_start_block = 0, fw1_end_block;
325         unsigned long fw2_start_block = 0, fw2_end_block;
326         unsigned long fw_num_blocks;
327         unsigned long extra_blocks = 2;
328         nand_erase_options_t erase_opts = { 0, };
329         int fcb_written = 0;
330
331         load_addr = getenv("fileaddr");
332         file_size = getenv("filesize");
333
334         if (argc < 2 && load_addr == NULL) {
335                 printf("Load address not specified\n");
336                 return -EINVAL;
337         }
338         if (argc < 3 && file_size == NULL) {
339                 printf("Image size not specified\n");
340                 return -EINVAL;
341         }
342
343         for (optind = 1; optind < argc; optind++) {
344                 if (strcmp(argv[optind], "-b") == 0) {
345                         if (optind >= argc - 1) {
346                                 printf("Option %s requires an argument\n", argv[optind]);
347                                 return -EINVAL;
348                         }
349                         optind++;
350                         fcb_start_block = simple_strtoul(argv[optind], NULL, 0);
351                         if (fcb_start_block >= mtd_num_blocks) {
352                                 printf("Block number %lu is out of range: 0..%lu\n",
353                                         fcb_start_block, mtd_num_blocks - 1);
354                                 return -EINVAL;
355                         }
356                 } else if (strcmp(argv[optind], "-n") == 0) {
357                         if (optind >= argc - 1) {
358                                 printf("Option %s requires an argument\n", argv[optind]);
359                                 return -EINVAL;
360                         }
361                         optind++;
362                         num_fcb_blocks = simple_strtoul(argv[optind], NULL, 0);
363                         if (num_fcb_blocks > MAX_FCB_BLOCKS) {
364                                 printf("Extraneous number of FCB blocks; max. allowed: %u\n",
365                                         MAX_FCB_BLOCKS);
366                                 return -EINVAL;
367                         }
368                 } else if (strcmp(argv[optind], "-f") == 0) {
369                         if (optind >= argc - 1) {
370                                 printf("Option %s requires an argument\n", argv[optind]);
371                                 return -EINVAL;
372                         }
373                         optind++;
374                         fw1_start_block = simple_strtoul(argv[optind], NULL, 0);
375                         if (fw1_start_block >= mtd_num_blocks) {
376                                 printf("Block number %lu is out of range: 0..%lu\n",
377                                         fw1_start_block,
378                                         mtd_num_blocks - 1);
379                                 return -EINVAL;
380                         }
381                         fw1_set = 1;
382                 } else if (strcmp(argv[optind], "-r") == 0) {
383                         if (optind < argc - 1 && argv[optind + 1][0] != '-') {
384                                 optind++;
385                                 fw2_start_block = simple_strtoul(argv[optind], NULL, 0);
386                                 if (fw2_start_block >= mtd_num_blocks) {
387                                         printf("Block number %lu is out of range: 0..%lu\n",
388                                                 fw2_start_block,
389                                                 mtd_num_blocks - 1);
390                                         return -EINVAL;
391                                 }
392                         }
393                         fw2_set = 1;
394                 } else if (strcmp(argv[optind], "-e") == 0) {
395                         if (optind >= argc - 1) {
396                                 printf("Option %s requires an argument\n", argv[optind]);
397                                 return -EINVAL;
398                         }
399                         optind++;
400                         extra_blocks = simple_strtoul(argv[optind], NULL, 0);
401                         if (extra_blocks >= mtd_num_blocks) {
402                                 printf("Extra block count %lu is out of range: 0..%lu\n",
403                                         extra_blocks,
404                                         mtd_num_blocks - 1);
405                                 return -EINVAL;
406                         }
407                 } else if (argv[optind][0] == '-') {
408                         printf("Unrecognized option %s\n", argv[optind]);
409                         return -EINVAL;
410                 }
411         }
412         if (argc > optind) {
413                 load_addr = NULL;
414                 addr = (void *)simple_strtoul(argv[optind], NULL, 0);
415                 optind++;
416         }
417         if (argc > optind) {
418                 file_size = NULL;
419                 size = simple_strtoul(argv[optind], NULL, 0);
420                 optind++;
421         }
422         if (load_addr != NULL) {
423                 addr = (void *)simple_strtoul(load_addr, NULL, 16);
424                 printf("Using default load address %p\n", addr);
425         }
426         if (file_size != NULL) {
427                 size = simple_strtoul(file_size, NULL, 16);
428                 printf("Using default file size %08x\n", size);
429         }
430         fcb_end_block = fcb_start_block + num_fcb_blocks - 1;
431         fw_num_blocks = DIV_ROUND_UP(size, mtd->erasesize);
432
433         if (!fw1_set) {
434                 fw1_start_block = fcb_end_block + 1;
435                 fw1_end_block = fw1_start_block + fw_num_blocks + extra_blocks - 1;
436                 if (chk_overlap(fw1, env)) {
437                         fw1_start_block = env_end_block + 1;
438                         fw1_end_block = fw1_start_block + fw_num_blocks + extra_blocks - 1;
439                 }
440         } else {
441                 fw1_end_block = fw1_start_block + fw_num_blocks + extra_blocks - 1;
442         }
443
444         if (fw2_set && fw2_start_block == 0) {
445                 fw2_start_block = fw1_end_block + 1;
446                 fw2_end_block = fw2_start_block + fw_num_blocks + extra_blocks - 1;
447                 if (chk_overlap(fw2, env)) {
448                         fw2_start_block = env_end_block + 1;
449                         fw2_end_block = fw2_start_block + fw_num_blocks + extra_blocks - 1;
450                 }
451         } else {
452                 fw2_end_block = fw2_start_block + fw_num_blocks + extra_blocks - 1;
453         }
454
455         fail_if_overlap(fcb, env, "FCB", "Environment");
456         fail_if_overlap(fcb, fw1, "FCB", "FW1");
457         fail_if_overlap(fw1, env, "FW1", "Environment");
458         if (fw2_set) {
459                 fail_if_overlap(fcb, fw2, "FCB", "FW2");
460                 fail_if_overlap(fw2, env, "FW2", "Environment");
461                 fail_if_overlap(fw1, fw2, "FW1", "FW2");
462         }
463
464         buf = malloc(erase_size);
465         if (buf == NULL) {
466                 printf("Failed to allocate buffer\n");
467                 return -ENOMEM;
468         }
469         /* search for first non-bad block in FW1 block range */
470         while (fw1_start_block <= fw1_end_block) {
471                 if (!nand_block_isbad(mtd, fw1_start_block * mtd->erasesize))
472                         break;
473                 fw1_start_block++;
474         }
475         if (fw1_end_block - fw1_start_block + 1 < fw_num_blocks) {
476                 printf("Too many bad blocks in FW1 block range: %lu..%lu\n",
477                         fw1_end_block + 1 - fw_num_blocks - extra_blocks,
478                         fw1_end_block);
479                 return -EINVAL;
480         }
481
482         /* search for first non-bad block in FW2 block range */
483         while (fw2_set && fw2_start_block <= fw2_end_block) {
484                 if (!nand_block_isbad(mtd, fw2_start_block * mtd->erasesize))
485                         break;
486                 fw2_start_block++;
487         }
488         if (fw2_end_block - fw2_start_block + 1 < fw_num_blocks) {
489                 printf("Too many bad blocks in FW2 area %08lx..%08lx\n",
490                         fw2_end_block + 1 - fw_num_blocks - extra_blocks,
491                         fw2_end_block);
492                 return -EINVAL;
493         }
494
495         fcb = create_fcb(buf, fw1_start_block, fw2_start_block,
496                         (fw_num_blocks + extra_blocks) * mtd->erasesize);
497         if (IS_ERR(fcb)) {
498                 printf("Failed to initialize FCB: %ld\n", PTR_ERR(fcb));
499                 return PTR_ERR(fcb);
500         }
501         encode_hamming_13_8(fcb, (void *)fcb + 512, 512);
502
503         for (block = fcb_start_block; block < fcb_start_block + num_fcb_blocks;
504              block++) {
505                 if (nand_block_isbad(mtd, block * mtd->erasesize)) {
506                         if (block == fcb_start_block)
507                                 fcb_start_block++;
508                         continue;
509                 }
510                 ret = write_fcb(buf, block);
511                 if (ret) {
512                         printf("Failed to write FCB to block %u\n", block);
513                         return ret;
514                 }
515                 fcb_written = 1;
516         }
517
518         if (!fcb_written) {
519                 printf("Could not write FCB to flash\n");
520                 return -EIO;
521         }
522
523         printf("Programming U-Boot image from %p to block %lu\n",
524                 addr, fw1_start_block);
525         if (size & (page_size - 1)) {
526                 memset(addr + size, 0xff, size & (page_size - 1));
527                 size = ALIGN(size, page_size);
528         }
529
530         erase_opts.offset = fcb->fw1_start_page * page_size;
531         erase_opts.length = ALIGN(size, erase_size) +
532                 extra_blocks * mtd->erasesize;
533         erase_opts.quiet = 1;
534
535         printf("Erasing flash @ %08llx..%08llx\n", erase_opts.offset,
536                 erase_opts.offset + erase_opts.length - 1);
537
538         ret = nand_erase_opts(mtd, &erase_opts);
539         if (ret) {
540                 printf("Failed to erase flash: %d\n", ret);
541                 return ret;
542         }
543         printf("Programming flash @ %08x..%08x from %p\n",
544                 fcb->fw1_start_page * page_size,
545                 fcb->fw1_start_page * page_size + size, addr);
546         ret = nand_write_skip_bad(mtd, fcb->fw1_start_page * page_size,
547                                 &size, addr, WITH_DROP_FFS);
548         if (ret) {
549                 printf("Failed to program flash: %d\n", ret);
550                 return ret;
551         }
552         if (fw2_start_block == 0) {
553                 return ret;
554         }
555
556         printf("Programming redundant U-Boot image to block %lu\n",
557                 fw2_start_block);
558         erase_opts.offset = fcb->fw2_start_page * page_size;
559         printf("Erasing flash @ %08llx..%08llx\n", erase_opts.offset,
560                 erase_opts.offset + erase_opts.length - 1);
561
562         ret = nand_erase_opts(mtd, &erase_opts);
563         if (ret) {
564                 printf("Failed to erase flash: %d\n", ret);
565                 return ret;
566         }
567         printf("Programming flash @ %08x..%08x from %p\n",
568                 fcb->fw2_start_page * page_size,
569                 fcb->fw2_start_page * page_size + size, addr);
570         ret = nand_write_skip_bad(mtd, fcb->fw2_start_page * page_size,
571                                 &size, addr, WITH_DROP_FFS);
572         if (ret) {
573                 printf("Failed to program flash: %d\n", ret);
574                 return ret;
575         }
576         return ret;
577 }
578
579 U_BOOT_CMD(romupdate, 11, 0, do_update,
580         "Creates an FCB data structure and writes an U-Boot image to flash\n",
581         "[-b #] [-n #] [-f #] [-r [#]] [<address>] [<length>]\n"
582         "\t-b #\tfirst FCB block number (default 0)\n"
583         "\t-n #\ttotal number of FCB blocks (default 1)\n"
584         "\t-f #\twrite bootloader image at block #\n"
585         "\t-r\twrite redundant bootloader image at next free block after first image\n"
586         "\t-r #\twrite redundant bootloader image at block #\n"
587         "\t-e #\tspecify number of redundant blocks per boot loader image\n"
588         "\t<address>\tRAM address of bootloader image (default: ${fileaddr}\n"
589         "\t<length>\tlength of bootloader image in RAM (default: ${filesize}"
590         );