Skip to content

Commit

Permalink
fix issue 573: force shell to be bash for ram file and clm file targe…
Browse files Browse the repository at this point in the history
…ts of bcm43439a0 7.95.49
  • Loading branch information
jlinktu committed Sep 4, 2023
1 parent 2f14bdf commit 76b1edc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions firmwares/bcm43439a0/7_95_49_2271bb6/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ include definitions.mk

all: $(RAM_FILE) clm.bin ucode.bin templateram.bin flashpatches.c

$(RAM_FILE): SHELL:=$(shell which bash)
$(RAM_FILE): w43439A0_7_95_49_00_combined.h
@printf "\033[0;31m EXTRACTING FIRMWARE BLOB\033[0m\n"
@$(Q)HEX_COMBINED=$$(head -n-4 $< | tail -n+2 | sed -r 's/((0x)|[, ])//g' | tr -d '\n');FW_LEN=$$(grep CYW43_WIFI_FW_LEN $< | sed -r 's/.*\(([0-9]+)\).*/\1/g');FW_LEN_HEX=$$(($$FW_LEN << 1));printf "%s" "$${HEX_COMBINED::$$FW_LEN_HEX}" | xxd -r -p > "$@"

clm.bin: SHELL:=$(shell which bash)
clm.bin: w43439A0_7_95_49_00_combined.h
@printf "\033[0;31m EXTRACTING CLM BLOB\033[0m\n"
@$(Q)HEX_COMBINED=$$(head -n-4 $< | tail -n+2 | sed -r 's/((0x)|[, ])//g' | tr -d '\n');FW_LEN=$$(grep CYW43_WIFI_FW_LEN $< | sed -r 's/.*\(([0-9]+)\).*/\1/g');CLM_OFF_HEX=$$(((($$FW_LEN + 511) & ~511) << 1));CLM_LEN=$$(grep CYW43_CLM_LEN $< | sed -r 's/.*\(([0-9]+)\).*/\1/g');CLM_LEN_HEX=$$(($$CLM_LEN << 1));printf "%s" "$${HEX_COMBINED:$$CLM_OFF_HEX:$$CLM_LEN_HEX}" | xxd -r -p > "$@"
Expand Down

0 comments on commit 76b1edc

Please sign in to comment.