Raxone / amlogic-usbdl_s905x2

s905x2 Dump Bootrom BL1
GNU General Public License v3.0
12 stars 4 forks source link

Unify the two repos amlogic-usbdl tool #3

Closed phodina closed 1 year ago

phodina commented 1 year ago

Hi @Raxone , I've checked both repos ( this and for s905x3) and the diff shows just this single difference.

Could I send a MR with cmd args to select the correct SoC so that the tool could be unified?

pethod@CZPRGL-B18SYD3 /tmp$ diff -u amlogic-usbdl.cx2 amlogic-usbdl.c3
--- amlogic-usbdl.cx2   2023-06-07 13:43:35.246366155 +0200
+++ amlogic-usbdl.c3    2023-06-07 13:43:51.810449915 +0200
@@ -23,7 +23,7 @@

 #define LOAD_ADDR 0xfffa0000
 #define RUN_ADDR  LOAD_ADDR
-#define TARGET_RA_PTR 0xfffe3678
+#define TARGET_RA_PTR 0xfffe3688
 #define BULK_TRANSFER_SIZE 0x100                     //alternative : 0x200, 0x1000
 #define MAX_PAYLOAD_SIZE 0x10000 - BULK_TRANSFER_SIZE // we need the last transfer to overwrite return address
 #define BULK_TRANSFER_COUNT ((TARGET_RA_PTR - LOAD_ADDR) / BULK_TRANSFER_SIZE)
Raxone commented 1 year ago

If i understand the question you try use one amlogic-usbdl for s905x2 and s905x3. Problem solved here https://github.com/frederic/amlogic-usbdl. Command is ./amlogic-usbdl s905d3 input_file out_file. s905x3 is same like s905d3 or s905x2 is s905d2.

static char *target_names[] = { "s905d3", "s905d2" };

static uint32_t target_ra_ptrs[] = { 0xfffe3688,//s905d3 0xfffe3678 //s905d2 };

phodina commented 1 year ago

Okay, in that case this issue is resolved. Thanks