diff options
author | Nick Foster <nick@nerdnetworks.org> | 2011-04-21 19:45:05 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2011-04-21 19:45:05 -0700 |
commit | 3dd74062fc6cfad68a62faac6669bada96f3aecf (patch) | |
tree | 9179979b9245e4ea5979100701ac017f52c74d62 /firmware/zpu/usrp2p/bootloader | |
parent | f9080d0a3f7d6b0478150581a0c2e8af3f4e3c95 (diff) | |
download | uhd-3dd74062fc6cfad68a62faac6669bada96f3aecf.tar.gz uhd-3dd74062fc6cfad68a62faac6669bada96f3aecf.tar.bz2 uhd-3dd74062fc6cfad68a62faac6669bada96f3aecf.zip |
N210: Moved u2p_init into main app and changed bootloader behavior to not load safe fw if safe mode button pressed
Diffstat (limited to 'firmware/zpu/usrp2p/bootloader')
-rw-r--r-- | firmware/zpu/usrp2p/bootloader/udp_bootloader.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/firmware/zpu/usrp2p/bootloader/udp_bootloader.c b/firmware/zpu/usrp2p/bootloader/udp_bootloader.c index 00b54f364..118de2ae9 100644 --- a/firmware/zpu/usrp2p/bootloader/udp_bootloader.c +++ b/firmware/zpu/usrp2p/bootloader/udp_bootloader.c @@ -51,6 +51,8 @@ #include <xilinx_s3_icap.h> #include <mdelay.h> +#define BUTTON_PUSHED ((router_status->irqs & PIC_BUTTON) ? 0 : 1) + static void handle_inp_packet(uint32_t *buff, size_t num_lines){ //test if its an ip recovery packet @@ -97,8 +99,11 @@ static void do_the_bootload_thing(void) { set_safe_booted_flag(0); //haven't booted yet if(BUTTON_PUSHED) { //see memory_map.h - puts("Starting USRP2+ in safe mode."); - if(is_valid_fw_image(SAFE_FW_IMAGE_LOCATION_ADDR)) { + puts("Starting USRP2+ in safe mode. I am a brick. Feel free to reprogram me via the UDP burner."); + return; + //no longer necessary since we can just burn from UDP via the bootloader now +/* + if(is_valid_fw_image(SAFE_FW_IMAGE_LOCATION_ADDR)) { set_safe_booted_flag(1); //let the firmware know it's the safe image spi_flash_read(SAFE_FW_IMAGE_LOCATION_ADDR, FW_IMAGE_SIZE_BYTES, (void *)RAM_BASE); start_program(); @@ -108,6 +113,7 @@ static void do_the_bootload_thing(void) { puts("ERROR: no safe firmware image available. I am a brick. Feel free to reprogram me via the UDP burner."); return; } +*/ } if(!production_image) { @@ -150,6 +156,7 @@ int main(void) { u2_init(); + spif_init(); set_default_mac_addr(); set_default_ip_addr(); |