summaryrefslogtreecommitdiffstats
path: root/utils/rknanoutils
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-06-19 23:01:00 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2012-06-19 23:01:00 +0200
commitf62009303a8bb9d02462e4eebbbded66c56891b0 (patch)
treeda5f0ffdec7e44e17bb08bd2eb88f57eebae4ba3 /utils/rknanoutils
parent906963ae7667ae06951e12c0f02032184a4e23fd (diff)
downloadrockbox-f62009303a8bb9d02462e4eebbbded66c56891b0.tar.gz
rockbox-f62009303a8bb9d02462e4eebbbded66c56891b0.tar.bz2
rockbox-f62009303a8bb9d02462e4eebbbded66c56891b0.zip
rknanoutils: fix crash with no prefix, remove debug code
Change-Id: I73e277a8dc2fbd5790b1d7173e449d883710f27a
Diffstat (limited to 'utils/rknanoutils')
-rw-r--r--utils/rknanoutils/rkboottool/rkboottool.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/utils/rknanoutils/rkboottool/rkboottool.c b/utils/rknanoutils/rkboottool/rkboottool.c
index 06763f86e3..bfa7ebe291 100644
--- a/utils/rknanoutils/rkboottool/rkboottool.c
+++ b/utils/rknanoutils/rkboottool/rkboottool.c
@@ -321,6 +321,8 @@ static void elf_write(void *user, uint32_t addr, const void *buf, size_t count)
static void extract_elf_section(struct elf_params_t *elf, int count)
{
+ if(g_out_prefix == NULL)
+ return;
char *filename = xmalloc(strlen(g_out_prefix) + 32);
sprintf(filename, "%s%d.elf", g_out_prefix, count);
if(g_debug)
@@ -341,19 +343,6 @@ static int do_nanostage_image(uint8_t *buf, unsigned long size)
return 1;
struct rknano_stage_header_t *hdr = (void *)buf;
- uint32_t *buf32 = (void *)buf;
- cprintf(BLUE, "Dump\n");
- for(int j = 0; j < 2; j++)
- cprintf(YELLOW, "%8x ", buf32[j]);
- printf("\n");
- for(unsigned i = 0; i < hdr->count; i++)
- {
- for(int j = 0; j < 8; j++)
- cprintf(YELLOW, "%8x ", buf32[i * 8 + j + 2]);
- printf("\n");
- }
- printf("\n");
-
cprintf(BLUE, "Header\n");
cprintf(GREEN, " Base Address: ");
cprintf(YELLOW, "%#08x\n", hdr->addr);