1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-12-23 04:41:10 +02:00

Merge branch 'master' of git@github.com:xiangfu/xburst-tools

This commit is contained in:
Xiangfu Liu 2009-08-21 17:05:15 +08:00
commit 77c50470f6
2 changed files with 12 additions and 6 deletions

View File

@ -203,7 +203,10 @@ int main(int argc, char** argv)
fprintf(stderr, "Error - number of %s parameters %i\n", argv[1], argc);
goto xout_xburst_interface;
}
u32_param = strtoul(argv[2], 0 /* endptr */, 16 /* base */);
if (argv[2][0] == '0' && argv[2][1] == 'x')
u32_param = strtoul(&argv[2][2], 0 /* endptr */, 16 /* base */);
else
u32_param = strtoul(argv[2], 0 /* endptr */, 10 /* base */);
usb_status = usb_control_msg(xburst_h,
/* requesttype */ USB_ENDPOINT_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
@ -244,7 +247,10 @@ int main(int argc, char** argv)
fprintf(stderr, "Error - number of %s parameters %i\n", argv[1], argc);
goto xout_xburst_interface;
}
read_len = strtol(argv[2], 0 /* endptr */, 16 /* base */);
if (argv[2][0] == '0' && argv[2][1] == 'x')
read_len = strtol(&argv[2][2], 0 /* endptr */, 16 /* base */);
else
read_len = strtol(argv[2], 0 /* endptr */, 10 /* base */);
read_buf = (char*) malloc(read_len);
if (!read_buf) {
fprintf(stderr, "Error - cannot allocate %i bytes read buffer.\n", read_len);

View File

@ -1,8 +1,8 @@
#!/bin/bash
../host-app/xbboot set_addr 80002000
../host-app/xbboot set_addr 0x80002000
../host-app/xbboot bulk_write ../target-stage1/stage1.bin
../host-app/xbboot start1 80002000
../host-app/xbboot set_addr 81c00000
../host-app/xbboot start1 0x80002000
../host-app/xbboot set_addr 0x81c00000
../host-app/xbboot bulk_write ../target-echokernel/echo-kernel.bin
../host-app/xbboot flush_cache
../host-app/xbboot start2 81c00000
../host-app/xbboot start2 0x81c00000