Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use it properly to download? #7

Open
baobei920722 opened this issue Nov 12, 2019 · 4 comments
Open

How to use it properly to download? #7

baobei920722 opened this issue Nov 12, 2019 · 4 comments

Comments

@baobei920722
Copy link

I compiled the project and used it. But I don't know how to use it to download the MDM9607 device image. I tried to read the code, and since I didn't understand the qualcomm download protocol, I couldn't read the code.
I use the following command:
./qdl prog_nand_firehose_9x07.mbn rawprogram_nand_p2K_b128K.xml patch_p2K_b128K.xml --include=./ --debug
Terminal output:[PROGRAM] errors while parsing program
I didn't find it in the XML file:"file_sector_offset","label"......

Can you give me detailed instructions on how to use it?

@C457
Copy link

C457 commented Nov 12, 2019

I compiled the project and used it. But I don't know how to use it to download the MDM9607 device image. I tried to read the code, and since I didn't understand the qualcomm download protocol, I couldn't read the code.
I use the following command:
./qdl prog_nand_firehose_9x07.mbn rawprogram_nand_p2K_b128K.xml patch_p2K_b128K.xml --include=./ --debug
Terminal output:[PROGRAM] errors while parsing program
I didn't find it in the XML file:"file_sector_offset","label"......

Can you give me detailed instructions on how to use it?

Your xml must have the contain these lines or it will fail to parse. https://github.com/andersson/qdl/blob/master/patch.c#L70
I also recommend trying patch0 and rawprogram by themselves

@baobei920722
Copy link
Author

@C457 :
20191114-01-ubun18.04.txt
I modified the code:
patch.c patch_load function:
patch->sector_size = attr_as_unsigned(node, "SECTOR_SIZE_IN_BYTES", &errors); patch->byte_offset = 0;//attr_as_unsigned(node, "byte_offset", &errors);///modify patch->filename = attr_as_string(node, "filename", &errors); patch->partition = attr_as_unsigned(node, "physical_partition_number", &errors); patch->size_in_bytes = 0;//attr_as_unsigned(node, "size_in_bytes", &errors);//modify patch->start_sector = attr_as_string(node, "start_sector", &errors); patch->value = attr_as_string(node, "value", &errors); patch->what = attr_as_string(node, "what", &errors);
program.c program_load function:
program->sector_size = attr_as_unsigned(node, "SECTOR_SIZE_IN_BYTES", &errors); program->file_offset = 0;//attr_as_unsigned(node, "file_sector_offset", &errors);////modify program->filename = attr_as_string(node, "filename", &errors); program->label = 0;//attr_as_string(node, "label", &errors);/////modify program->num_sectors = attr_as_unsigned(node, "num_partition_sectors", &errors); program->partition = attr_as_unsigned(node, "physical_partition_number", &errors); program->start_sector = attr_as_string(node, "start_sector", &errors);
I use the following command:
./qdl prog_nand_firehose_9x07.mbn rawprogram_nand_p2K_b128K.xml patch_p2K_b128K.xml --include=./ --debug
Got the above log,Error info:
qdl: failed to read: Connection timed out
I don't know how to handle this error.
My test environment runs the VM on Windows 10 and installs Ubuntu 18.04 in the VM, which I tested on Ubuntu. I don't know if this error is related to my environment.

@baobei920722
Copy link
Author

I tested after installing Ubuntu 18.04 on a new computer;
Its error log is the same as running Ubuntu 18.04 on the VM.
I don't know how to handle this error now.

@jwinarske
Copy link

@baobei920722 I suspect you need to disable ModemManager.

systemctl stop ModemManager

Then power cycle the target to put EDL into a known state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants