usbarmory / armory-ums

USB armory - Mass Storage firmware
Other
23 stars 6 forks source link

Error: Header not Found #1

Closed huntergregal closed 4 years ago

huntergregal commented 4 years ago

I'm sure I'm doing something wrong. Usb-Armory MKII in SD bootmode with no SDCARD present.

Trying to load armory-ums so that i can flash debian eMMC image. Running on an ubuntu 20 VirtualBox vm (host is windows 10). FreeScale SemiConductor USB device connected to VM.

Error seems to be:

header not found 8400:e59fb0b4, 4000
do_download failed, err=-22

Regular output

user:~/ws/usb_armory$ sudo ./imx_usb armory-ums.imx 
config file <.//imx_usb.conf>
vid=0x066f pid=0x3780 file_name=mx23_usb_work.conf
vid=0x15a2 pid=0x004f file_name=mx28_usb_work.conf
vid=0x15a2 pid=0x0052 file_name=mx50_usb_work.conf
vid=0x15a2 pid=0x0054 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0061 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0063 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0071 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x007d file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0080 file_name=mx6ull_usb_work.conf
vid=0x1fc9 pid=0x0128 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0076 file_name=mx7_usb_work.conf
vid=0x1fc9 pid=0x0126 file_name=mx7ulp_usb_work.conf
vid=0x15a2 pid=0x0041 file_name=mx51_usb_work.conf
vid=0x15a2 pid=0x004e file_name=mx53_usb_work.conf
vid=0x15a2 pid=0x006a file_name=vybrid_usb_work.conf
vid=0x066f pid=0x37ff file_name=linux_gadget.conf
vid=0x1b67 pid=0x4fff file_name=mx6_usb_sdp_spl.conf
vid=0x0525 pid=0xb4a4 file_name=mx6_usb_sdp_spl.conf
vid=0x1fc9 pid=0x012b file_name=mx8mq_usb_work.conf
vid=0x1fc9 pid=0x0134 file_name=mx8mm_usb_work.conf
vid=0x1fc9 pid=0x013e file_name=mx8mn_usb_work.conf
vid=0x3016 pid=0x1001 file_name=mx8m_usb_sdp_spl.conf
config file <.//mx6ull_usb_work.conf>
parse .//mx6ull_usb_work.conf
Trying to open device vid=0x15a2 pid=0x0080
Interface 0 claimed
HAB security state: development mode (0x56787856)
== work item
filename armory-ums.imx
load_size 0 bytes
load_addr 0x00000000
dcd 1
clear_dcd 0
plug 1
jump_mode 3
jump_addr 0x00000000
== end work item
header not found 8400:e59fb0b4, 4000
do_download failed, err=-22
HAB security state: development mode (0x56787856)

debug output

checking with conf_path /usr/etc/imx-loader.d/
checking with base_path ./
config file <.//mx6ull_usb_work.conf>
parse .//mx6ull_usb_work.conf
Trying to open device vid=0x15a2 pid=0x0080
bConfigurationValue = 0x1
Interface 0 claimed
sending command cmd=05 05 00 00
report=1, cnt=10
do_command err=0, last_trans=16
report=3, cnt=40
libusb_interrupt_transfer, err=0, trans=5
report 3 in err=0, last_trans=4  56 78 78 56
HAB security state: development mode (0x56787856)
report=4, cnt=40
libusb_interrupt_transfer, err=0, trans=65
report 4 in err=0, last_trans=64  f0 f0 f0 f0
== work item
filename armory-ums.imx
load_size 0 bytes
load_addr 0x00000000
dcd 1
clear_dcd 0
plug 1
jump_mode 3
jump_addr 0x00000000
== end work item
header not found 8400:e59fb0b4, 4000
do_download failed, err=-22
sending command cmd=05 05 00 00
report=1, cnt=10
do_command err=0, last_trans=16
report=3, cnt=40
libusb_interrupt_transfer, err=0, trans=5
report 3 in err=0, last_trans=4  56 78 78 56
HAB security state: development mode (0x56787856)
report=4, cnt=40
libusb_interrupt_transfer, err=0, trans=65
report 4 in err=0, last_trans=64  f0 f0 f0 f0
do_work finished with err=-22, curr=0x55fe4861b2a0
huntergregal commented 4 years ago

for more info:

I am trying to install debian onto the eMMC without an SDCard.

I am following: https://groups.google.com/g/usbarmory/c/Wt_YXTQkI_Q/m/HGTsFPLZAwAJ?pli=1

it is my understanding that if i can load armory-ums onto the SoC then the internal eMMC will be exposed to my computer where i can then flash debian onto it.

huntergregal commented 4 years ago

Do i need to adjust the offset search list for the header searching perhaps in imx_sdp.c:1260 ?

huntergregal commented 4 years ago

problem fixed:

The issue? me.

when i made the armory-ums i was actually using the armory-ums.bin instead of the imx target.

i see now this error was due to the file being parsed not being the proper .imx format.