nippynetworks / qfirehose

Quectel qfirehose utility to upgrade modems using the firehose protocol
15 stars 1 forks source link

Linux version of qfirehose #2

Open PsySc0rpi0n opened 1 month ago

PsySc0rpi0n commented 1 month ago

Hello. Is it possible to get a Linux version (Debian Bookworm) of the tool so that I can flash a firmware (.mbn, .img and .xml files) onto a SIM7600G-H modem which is incorporated in a LilyGo T-SIM7600X device?

Or how do I compile this repository for Linux? I'm not chinese and I cannot find instructions on how to compile this repository for Linux!

Thanks Psy

ewildgoose commented 1 month ago

What happens if you just type "make" and hit return?

PsySc0rpi0n commented 1 month ago

What happens if you just type "make" and hit return?

Sorry, I just managed to make it compile and forgot to close the issue! I was reading a PDF and tried:

make CROSS_COMPILE=<your platform’s cross compiler>

but seems it was simpler than that! Thanks Psy

PsySc0rpi0n commented 1 month ago

Sorry to reopen but can I ask help with this: I have a LilyGo T-SIM7600X which has a SIM7600G-H modem.

I was given these files to update the modem firmware:

$ ls -lah ~/Documents/LE20B05SIM7600G22_240325/LE20B05SIM7600G22_240325/
total 109M
drwxrwxrwx 1 carlos carlos  308 Oct 11 12:38 .
drwxrwxrwx 1 carlos carlos   48 Oct 11 12:36 ..
-rwxrwxrwx 1 carlos carlos 448K Jan 12  2024 appsboot.mbn
-rwxrwxrwx 1 carlos carlos 5.5M Jan 12  2024 boot.img
-rwxrwxrwx 1 carlos carlos  23K Nov  7  2018 contents.xml
-rwxrwxrwx 1 carlos carlos  95K Oct 14  2022 ENPRG9x07.mbn
-rwxrwxrwx 1 carlos carlos  36M Mar 25  2024 modem.img
-rwxrwxrwx 1 carlos carlos  99K Oct 14  2022 NPRG9x07.mbn
-rwxrwxrwx 1 carlos carlos  464 Apr 15  2016 partition.mbn
-rwxrwxrwx 1 carlos carlos 4.6K Apr 15  2016 partition_nand.xml
-rwxrwxrwx 1 carlos carlos  10M Jan 12  2024 recoveryfs.img
-rwxrwxrwx 1 carlos carlos 5.9M Jan 12  2024 recovery.img
-rwxrwxrwx 1 carlos carlos 157K Oct 14  2022 rpm.mbn
-rwxrwxrwx 1 carlos carlos 211K Oct 14  2022 sbl1.mbn
-rwxrwxrwx 1 carlos carlos  50M Jan 12  2024 system.img
-rwxrwxrwx 1 carlos carlos 515K Oct 14  2022 tz.mbn

When I try to run QFirehose I get this:

$ ./QFirehose -f ../LE20B05SIM7600G22_240325/LE20B05SIM7600G22_240325/ -p /dev/ttyUSB0
[000.000]: Version: QFirehose_Linux_Android_V1.4.17
[000.000]: Builded: Oct 11 2024 12:04:00
[000.000]: Cann't find md5.txt in ../LE20B05SIM7600G22_240325/LE20B05SIM7600G22_240325, Please check it!
[000.000]: find_firehose_mbn fail to find firehose mbn file in ../LE20B05SIM7600G22_240325/LE20B05SIM7600G22_240325
[000.000]: qfirehose.c main 632 fail
$ ./QFirehose -f ../LE20B05SIM7600G22_240325/LE20B05SIM7600G22_240325/ -p /dev/ttyUSB0 -n
[000.000]: Version: QFirehose_Linux_Android_V1.4.17
[000.000]: Builded: Oct 11 2024 12:04:00
[000.000]: find_firehose_mbn fail to find firehose mbn file in ../LE20B05SIM7600G22_240325/LE20B05SIM7600G22_240325
[000.000]: qfirehose.c main 632 fail

What am I doing wrong?

ewildgoose commented 1 month ago

It seems like the error here explains the problem?

find_firehose_mbn fail to find firehose mbn file in ../LE20B05SIM7600G22_240325/LE20B05SIM7600G22_240325

PsySc0rpi0n commented 1 month ago

It seems like the error here explains the problem?

find_firehose_mbn fail to find firehose mbn file in ../LE20B05SIM7600G22_240325/LE20B05SIM7600G22_240325

But is it supposed to be in the files I was sent? Or is this some generic file from Quectel software?

ewildgoose commented 1 month ago

My update file looks totally different. Sorry, I think you will need to ask your upstream for a qfirehose compatible update

Mine looks like this for example:

ls -alR

total 232 drwxr-xr-x 5 edward staff 160 11 Sep 11:05 . drwxr-xr-x 8 edward staff 256 10 Dec 2023 .. drwx------ 5 edward staff 160 5 Nov 2021 EM12GPAR01A21M4G_01.005.01.005

./EM12GPAR01A21M4G_01.005.01.005: total 24 drwx------ 5 edward staff 160 5 Nov 2021 . drwxr-xr-x 5 edward staff 160 11 Sep 11:05 .. -rw-rw-r-- 1 edward staff 4829 31 Aug 2021 contents.xml -rw-rw-r-- 1 edward staff 1340 31 Aug 2021 md5.txt drwxrwxr-x 17 edward staff 544 31 Aug 2021 update

./EM12GPAR01A21M4G_01.005.01.005/update: total 279600 drwxrwxr-x 17 edward staff 544 31 Aug 2021 . drwx------ 5 edward staff 160 5 Nov 2021 .. -rw-rw-r-- 1 edward staff 106836 31 Aug 2021 ENPRG9x65.mbn -rw-rw-r-- 1 edward staff 57147392 31 Aug 2021 NON-HLOS.ubi -rw-rw-r-- 1 edward staff 106300 31 Aug 2021 NPRG9x65.mbn -rw-rw-r-- 1 edward staff 526408 31 Aug 2021 appsboot.mbn drwxrwxr-x 6 edward staff 192 31 Aug 2021 firehose -rw-rw-r-- 1 edward staff 576 31 Aug 2021 partition.mbn -rw-rw-r-- 1 edward staff 6300 31 Aug 2021 partition_nand.xml -rw-rw-r-- 1 edward staff 166188 31 Aug 2021 rpm.mbn -rw-rw-r-- 1 edward staff 248692 31 Aug 2021 sbl1.mbn -rw-rw-r-- 1 edward staff 8538112 31 Aug 2021 sdx20-boot.img -rw-rw-r-- 1 edward staff 524288 31 Aug 2021 sdx20-cache.ubi -rw-rw-r-- 1 edward staff 12320768 31 Aug 2021 sdx20-recovery.ubi -rw-rw-r-- 1 edward staff 58720256 31 Aug 2021 sdx20-rootfs.ubi -rw-rw-r-- 1 edward staff 4718592 31 Aug 2021 sdx20-usrfs.ubi -rw-rw-r-- 1 edward staff 455932 31 Aug 2021 tz.mbn

./EM12GPAR01A21M4G_01.005.01.005/update/firehose: total 304 drwxrwxr-x 6 edward staff 192 31 Aug 2021 . drwxrwxr-x 17 edward staff 544 31 Aug 2021 .. -rw-rw-r-- 1 edward staff 16384 31 Aug 2021 partition_complete_p4K_b256K.mbn -rw-rw-r-- 1 edward staff 740 31 Aug 2021 patch_p4K_b256K.xml -rw-rw-r-- 1 edward staff 123560 31 Aug 2021 prog_firehose_9x65.mbn -rw-rw-r-- 1 edward staff 4706 31 Aug 2021 rawprogram_nand_p4K_b256K_update.xml