static char *name_filter = NULL;
static bool show_all = false;
static bool print_all_key_names = false;
+static bool read_oob_sector_health = false;
static bool swap_bytes = false;
static uint8_t readbuf[TFFS_SECTOR_SIZE];
static uint8_t oobbuf[TFFS_SECTOR_OOB_SIZE];
uint32_t read_id = read_uint32(readbuf, 0x00);
uint32_t read_len = read_uint32(readbuf, 0x04);
uint32_t read_rev = read_uint32(readbuf, 0x0c);
- if (oob_id != read_id || oob_len != read_len || oob_rev != read_rev) {
+ if (read_oob_sector_health && (oob_id != read_id || oob_len != read_len || oob_rev != read_rev)) {
fprintf(stderr, "Warning: sector has inconsistent metadata\n");
continue;
}
static int check_sector(off_t pos)
{
+ if (!read_oob_sector_health) {
+ return 1;
+ }
if (read_sectoroob(pos)) {
return 0;
}
" -h show this screen\n"
" -l list all supported keys\n"
" -n <key name> display the value of the given key\n"
+ " -o read OOB information about sector health\n"
);
exit(status);
while (1) {
int c;
- c = getopt(argc, argv, "abd:hln:");
+ c = getopt(argc, argv, "abd:hln:o");
if (c == -1)
break;
show_all = false;
print_all_key_names = false;
break;
+ case 'o':
+ read_oob_sector_health = true;
+ break;
default:
usage(EXIT_FAILURE);
break;
$(call Device/FitImageLzma)
DEVICE_DTS := qcom-ipq4019-fritzbox-7530
DEVICE_TITLE := AVM Fritz!Box 7530
- DEVICE_PACKAGES := fritz-caldata ipq-wifi-avm_fritzbox-7530
+ DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand ipq-wifi-avm_fritzbox-7530
IMAGES := sysupgrade.bin
endef
TARGET_DEVICES += avm_fritzbox-7530
avm,fritz7412)
tffsdev=$(find_mtd_chardev "nand-tffs")
annex="b"
- lan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n maca)
- wan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n macdsl)
+ lan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n maca -o)
+ wan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n macdsl -o)
ucidef_set_interface_lan 'eth0'
;;