1
0
Fork 0
forked from len0rd/rockbox

Use HAVE_FLASHED_ROCKBOX when target is flashable. Currenly only used by the H100 series.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11470 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2006-11-08 18:33:06 +00:00
parent a32b33bf83
commit d7e55278f3
4 changed files with 14 additions and 15 deletions

View file

@ -126,34 +126,31 @@ void system_init(void) {
}
#endif
#if defined(IRIVER_H100_SERIES) && !defined(SIMULATOR)
bool detect_flashed_rockbox(void)
{
#ifdef HAVE_FLASHED_ROCKBOX
struct flash_header hdr;
uint8_t *src = (uint8_t *)FLASH_ENTRYPOINT;
# ifndef BOOTLOADER
int oldmode;
oldmode = system_memory_guard(MEMGUARD_NONE);
# endif
#ifndef BOOTLOADER
int oldmode = system_memory_guard(MEMGUARD_NONE);
#endif
memcpy(&hdr, src, sizeof(struct flash_header));
# ifndef BOOTLOADER
#ifndef BOOTLOADER
system_memory_guard(oldmode);
# endif
#endif
if (hdr.magic != FLASH_MAGIC)
return false;
return true;
}
#else
bool detect_flashed_rockbox(void)
{
return false;
#endif /* HAVE_FLASHED_ROCKBOX */
}
#endif
#if CONFIG_CPU == TCC730