FreeCalypso > hg > freecalypso-tools
view target-utils/loadagent/cmd_blankchk.c @ 718:098fea21ba13
doc/Host-tools-overview: tiffs-mkfs description updated
The first version of tiffs-mkfs did not include a journal file in the created
FFS, expecting the firmware to create it on first boot. All historical
firmwares prior to a recent FC fix (2020-05) contain a bug in that code path,
thus images made with the first version of tiffs-mkfs were only acceptable to
very recent FC firmwares. tiffs-mkfs has now been extended to include an empty
journal in the created FFS, thus the restriction of working with recent fw only
has been lifted.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 23 Aug 2020 04:55:02 +0000 |
parents | 0da2cf5a999c |
children |
line wrap: on
line source
/* * Flash blank check command */ #include <sys/types.h> #include "types.h" void cmd_blankchk(argbulk) char *argbulk; { char *argv[3]; u_long start, length; u_long addr; int c; if (parse_args(argbulk, 2, 2, argv, 0) < 0) return; if (parse_hexarg(argv[0], 8, &start) < 0) { printf("ERROR: arg1 must be a valid 32-bit hex address\n"); return; } if (parse_hexarg(argv[1], 8, &length) < 0) { printf("ERROR: arg2 must be a valid 32-bit hex value (length)\n"); return; } for (addr = start; addr < start + length; addr++) { c = *(volatile u8 *)addr; if (c != 0xFF) { printf("Not blank: %02X at %08X\n", c, addr); return; } } printf("OK\n"); }