Run the LBA48 check only if the target has support for reading of SysCfg

This fixes a regression introduced in ad6cc2f0 for the ipodnano4g bootloader.

Change-Id: Iacf079adbfa85399b248a4c4ac35b93155a1d87b
This commit is contained in:
Vencislav Atanasov 2026-01-06 22:11:27 +02:00 committed by Solomon Peachy
parent e3372f495e
commit e2196c4566

View file

@ -888,6 +888,7 @@ void main(void)
/* We wait until HDD spins up to check for hold button */
if (button_hold()) {
#ifdef SYSCFG_MAX_ENTRIES
bool lba48 = false;
struct SysCfg syscfg;
const ssize_t result = syscfg_read(&syscfg);
@ -917,6 +918,13 @@ void main(void)
fatal_error(ERR_LBA28);
}
}
#else
printf("Executing OF...");
#if (CONFIG_STORAGE & STORAGE_ATA)
ata_sleepnow();
#endif
rc = kernel_launch_onb();
#endif /* SYSCFG_MAX_ENTRIES */
}
}