aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/zpu
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-12-30 15:22:43 -0800
committerNick Foster <nick@nerdnetworks.org>2010-12-30 15:22:43 -0800
commit4de4c05f27978ba3f1dfdd14feddd82e26edf1fd (patch)
tree904219eddac6d9f22029bcbb5746f30f2042e017 /firmware/zpu
parent35305471506e344a214cbabda4b9d0adbfcb51a1 (diff)
downloaduhd-4de4c05f27978ba3f1dfdd14feddd82e26edf1fd.tar.gz
uhd-4de4c05f27978ba3f1dfdd14feddd82e26edf1fd.tar.bz2
uhd-4de4c05f27978ba3f1dfdd14feddd82e26edf1fd.zip
ZPU: bootloader only checks first 4 bytes of program flash image for validity
Diffstat (limited to 'firmware/zpu')
-rw-r--r--firmware/zpu/usrp2p/bootloader_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/zpu/usrp2p/bootloader_utils.c b/firmware/zpu/usrp2p/bootloader_utils.c
index 379c5f957..371c518a7 100644
--- a/firmware/zpu/usrp2p/bootloader_utils.c
+++ b/firmware/zpu/usrp2p/bootloader_utils.c
@@ -30,14 +30,14 @@ int is_valid_fpga_image(uint32_t addr) {
}
int is_valid_fw_image(uint32_t addr) {
- static const uint8_t fwheader[] = {0x0b, 0x0b, 0x0b, 0x0b, 0x80, 0x70}; //just lookin for a jump to anywhere located at the reset vector
+ static const uint8_t fwheader[] = {0x0b, 0x0b, 0x0b, 0x0b}; //just lookin for a jump to anywhere located at the reset vector
//printf("is_valid_fw_image(): starting with addr=%x...\n", addr);
uint8_t buf[12];
- spi_flash_read(addr, 6, buf);
+ spi_flash_read(addr, 4, buf);
//printf("is_valid_fw_image(): read ");
//for(int i = 0; i < 5; i++) printf("%x ", buf[i]);
//printf("\n");
- return memcmp(buf, fwheader, 6) == 0;
+ return memcmp(buf, fwheader, 4) == 0;
}
void start_program(void)