nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | function htonl(a) { |
2 | return rshift(and(a, 0xff000000), 24) + rshift(and(a, 0xff0000), 8) + lshift(and(a, 0xff00), 8) + lshift(and(a, 0xff), 24); |
||
3 | } |
||
4 | BEGIN { |
||
5 | fp_data_base = strtonum(fp_data_base); |
||
6 | fp_config_base = strtonum(fp_config_base); |
||
7 | fp_data_end_ptr = strtonum(fp_data_end_ptr); |
||
8 | fp_config_base_ptr_1 = strtonum(fp_config_base_ptr_1); |
||
9 | fp_config_end_ptr_1 = strtonum(fp_config_end_ptr_1); |
||
10 | fp_config_base_ptr_2 = strtonum(fp_config_base_ptr_2); |
||
11 | fp_config_end_ptr_2 = strtonum(fp_config_end_ptr_2); |
||
12 | ramstart = strtonum(ramstart); |
||
13 | |||
14 | fp_data_end = fp_data_base; |
||
15 | fp_config_end = fp_config_base; |
||
16 | |||
17 | printf "%s: %s FORCE\n", out_file, src_file; |
||
18 | } |
||
19 | { |
||
20 | if ($2 == "FLASHPATCH") { |
||
21 | printf "\t$(Q)$(CC)objcopy -O binary -j .text." $4 " $< gen/section.bin && dd if=gen/section.bin of=$@ bs=1 conv=notrunc seek=$$((0x%08x - 0x%08x))\n", fp_data_end, ramstart; |
||
22 | printf "\t$(Q)printf %08x%08x | xxd -r -p | dd of=$@ bs=1 conv=notrunc seek=$$((0x%08x - 0x%08x))\n", htonl(strtonum($1)), htonl(fp_data_end), fp_config_end, ramstart; |
||
23 | printf "\t$(Q)printf \" FLASHPATCH %s @ %s\\n\"\n", $4, $1; |
||
24 | fp_data_end = fp_data_end + 8; |
||
25 | fp_config_end = fp_config_end + 8; |
||
26 | } |
||
27 | } |
||
28 | END { |
||
29 | printf "\t$(Q)printf %08x | xxd -r -p | dd of=$@ bs=1 conv=notrunc seek=$$((0x%08x - 0x%08x))\n", htonl(fp_data_end), fp_data_end_ptr, ramstart; |
||
30 | printf "\t$(Q)printf \" PATCH fp_data_end @ 0x%08x\\n\"\n", fp_data_end_ptr; |
||
31 | printf "\t$(Q)printf %08x | xxd -r -p | dd of=$@ bs=1 conv=notrunc seek=$$((0x%08x - 0x%08x))\n", htonl(fp_config_base), fp_config_base_ptr_1, ramstart; |
||
32 | printf "\t$(Q)printf \" PATCH fp_config_base @ 0x%08x\\n\"\n", fp_config_base_ptr_1; |
||
33 | printf "\t$(Q)printf %08x | xxd -r -p | dd of=$@ bs=1 conv=notrunc seek=$$((0x%08x - 0x%08x))\n", htonl(fp_config_end), fp_config_end_ptr_1, ramstart; |
||
34 | printf "\t$(Q)printf \" PATCH fp_config_end @ 0x%08x\\n\"\n", fp_config_end_ptr_1; |
||
35 | printf "\t$(Q)printf %08x | xxd -r -p | dd of=$@ bs=1 conv=notrunc seek=$$((0x%08x - 0x%08x))\n", htonl(fp_config_base), fp_config_base_ptr_2, ramstart; |
||
36 | printf "\t$(Q)printf \" PATCH fp_config_base @ 0x%08x\\n\"\n", fp_config_base_ptr_2; |
||
37 | printf "\t$(Q)printf %08x | xxd -r -p | dd of=$@ bs=1 conv=notrunc seek=$$((0x%08x - 0x%08x))\n", htonl(fp_config_end), fp_config_end_ptr_2, ramstart; |
||
38 | printf "\t$(Q)printf \" PATCH fp_config_end @ 0x%08x\\n\"\n", fp_config_end_ptr_2; |
||
39 | printf "\n\nFORCE:\n" |
||
40 | } |