Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
changed flashpatches awk for bcm4375 as one patch is not required on …
…this platform.
- Loading branch information
1 parent
b92ed5f
commit e66289c2eaf4802a88c9b60be271d45aaf6770f0
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
function htonl(a) { | ||
return rshift(and(a, 0xff000000), 24) + rshift(and(a, 0xff0000), 8) + lshift(and(a, 0xff00), 8) + lshift(and(a, 0xff), 24); | ||
} | ||
BEGIN { | ||
fp_data_base = strtonum(fp_data_base); | ||
fp_config_base = strtonum(fp_config_base); | ||
fp_config_base_ptr_1 = strtonum(fp_config_base_ptr_1); | ||
fp_config_end_ptr_1 = strtonum(fp_config_end_ptr_1); | ||
fp_config_base_ptr_2 = strtonum(fp_config_base_ptr_2); | ||
fp_config_end_ptr_2 = strtonum(fp_config_end_ptr_2); | ||
ramstart = strtonum(ramstart); | ||
|
||
fp_data_end = fp_data_base; | ||
fp_config_end = fp_config_base; | ||
|
||
printf "%s: %s FORCE\n", out_file, src_file; | ||
} | ||
{ | ||
if ($2 == "FLASHPATCH") { | ||
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; | ||
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; | ||
printf "\t$(Q)printf \" FLASHPATCH %s @ %s\\n\"\n", $4, $1; | ||
fp_data_end = fp_data_end + 8; | ||
fp_config_end = fp_config_end + 8; | ||
} | ||
} | ||
END { | ||
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; | ||
printf "\t$(Q)printf \" PATCH fp_config_base @ 0x%08x\\n\"\n", fp_config_base_ptr_1; | ||
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; | ||
printf "\t$(Q)printf \" PATCH fp_config_end @ 0x%08x\\n\"\n", fp_config_end_ptr_1; | ||
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; | ||
printf "\t$(Q)printf \" PATCH fp_config_base @ 0x%08x\\n\"\n", fp_config_base_ptr_2; | ||
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; | ||
printf "\t$(Q)printf \" PATCH fp_config_end @ 0x%08x\\n\"\n", fp_config_end_ptr_2; | ||
printf "\n\nFORCE:\n" | ||
} |