File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 11TOCK_USERLAND_BASE_DIR ?= ..
22LR1110_DIR = $(TOCK_USERLAND_BASE_DIR)/lr1110/lr1110
33
4- VERSION_HASH := 7c33c9ef136c841a7b44f530d2415789c86f48af
4+ VERSION_HASH := e34742993932c97731f513ffa3028d284b163d31
55
66SEEED_DIR := $(LR1110_DIR)/seeed
77ZIP_FILE := $(SEEED_DIR).zip
@@ -27,12 +27,15 @@ $(LR1110_DIR)/radio_planner.c: $(SEEED_DIR)/smtc_hal/smtc_modem_hal.c
2727 cp $(LR1110_DIR)/seeed/lora_basics_modem/smtc_modem_core/radio_planner/src/radio_planner.c $(LR1110_DIR)/radio_planner.c
2828 cd $(LR1110_DIR); patch -p0 < ../radio_planner.patch
2929
30- $(SEEED_DIR)/smtc_hal/smtc_modem_hal.c:
30+
31+ $(SEEED_DIR):
32+ mkdir -p $(SEEED_DIR)
33+
34+ $(SEEED_DIR)/smtc_hal/smtc_modem_hal.c: | $(SEEED_DIR)
3135 curl -L --output $(ZIP_FILE) "https://codeload.github.com/Seeed-Studio/Seeed_Wio_WM1110_Dev_Board/zip/$(VERSION_HASH)"
32- unzip -q $(ZIP_FILE) -d $(SEEED_DIR)
33- rm -f $(ZIP_FILE) # Remove zip file after unzip
34- mv $(EXTRACTED_DIR)/* $(SEEED_DIR)/
35- rmdir $(EXTRACTED_DIR) # move unzipped code to SEEED_DIR, remove original directory
36+ # Strip-components removes leading directory path (i.e., Seeed_Wio_WM1110_Dev_Board-$(HASH)/) during extraction
37+ tar --strip-components=1 -xf $(ZIP_FILE) -C $(SEEED_DIR)
38+ rm -f $(ZIP_FILE) # Remove zip file after extracting
3639 touch $(SEEED_DIR)
3740 # Need to remove certain system headers because we provide our own.
3841 rm $(SEEED_DIR)/smtc_hal/inc/smtc_hal_flash.h
You can’t perform that action at this time.
0 commit comments