Skip to content

Commit a36f53e

Browse files
committed
pbio/platform/ev3: Vendor in binaries.
These won't be updated frequently, and GitHub storage is not as reliable as it once was. This also makes it possible to iterate offline. Before, builds would fail after hitting clean once. See pybricks/support#2262
1 parent b6181cb commit a36f53e

4 files changed

Lines changed: 4 additions & 14 deletions

File tree

bricks/_common/common.mk

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -795,22 +795,10 @@ $(BUILD)/firmware-obj.bin: $(BUILD)/firmware.elf
795795

796796
ifeq ($(PB_MCU_FAMILY),TIAM1808)
797797

798-
# REVISIT: downloading things doesn't belong in a Makefile.
799-
$(BUILD)/u-boot.bin:
800-
$(ECHO) "Downloading u-boot.bin"
801-
$(Q)mkdir -p $(dir $@)
802-
$(Q)curl -sL -o $@ https://github.com/pybricks/u-boot/releases/download/pybricks/v2.0.1/u-boot.bin
803-
$(Q)echo "86ddad84f64d8aea85b4315fc1414bdec0bb0d46c92dbd3db45ed599e3a994cb $@" | sha256sum -c --strict
804-
$(BUILD)/pru_ledpwm.bin:
805-
$(ECHO) "Downloading pru_ledpwm.bin"
806-
$(Q)mkdir -p $(dir $@)
807-
$(Q)curl -sL -o $@ https://github.com/pybricks/pybricks-pru/releases/download/v1.0.0/pru_ledpwm.bin
808-
$(Q)echo "b4f1225e277bb22efa5394ce782cc19a3e2fdd54367e40b9d09e9ca99c6ef6d0 $@" | sha256sum -c --strict
809-
810798
MAKE_BOOTABLE_IMAGE = $(PBTOP)/bricks/ev3/make_bootable_image.py
811799

812800
# For EV3, merge firmware blob with u-boot to create a bootable image.
813-
$(BUILD)/firmware-base.bin: $(MAKE_BOOTABLE_IMAGE) $(BUILD)/u-boot.bin $(BUILD)/firmware.stripped.elf
801+
$(BUILD)/firmware-base.bin: $(MAKE_BOOTABLE_IMAGE) $(PBTOP)/lib/pbio/platform/ev3/u-boot.bin $(BUILD)/firmware.stripped.elf
814802
$(Q)$^ $@
815803

816804
else
@@ -837,7 +825,7 @@ $(BUILD)/firmware.zip: $(ZIP_FILES)
837825
$(BUILD)/pru_suart.bin.o: $(PBTOP)/lib/pbio/drv/uart/uart_ev3_pru_lib/pru_suart.bin
838826
$(Q)$(OBJCOPY) -I binary -O elf32-littlearm -B arm \
839827
--rename-section .data=.pru0,alloc,load,readonly,data,contents $^ $@
840-
$(BUILD)/pru_ledpwm.bin.o: $(BUILD)/pru_ledpwm.bin
828+
$(BUILD)/pru_ledpwm.bin.o: $(PBTOP)/lib/pbio/platform/ev3/pru_ledpwm.bin
841829
$(Q)$(OBJCOPY) -I binary -O elf32-littlearm -B arm \
842830
--rename-section .data=.pru1,alloc,load,readonly,data,contents $^ $@
843831

lib/pbio/platform/ev3/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!pru_ledpwm.bin
2+
!u-boot.bin
1.36 KB
Binary file not shown.

lib/pbio/platform/ev3/u-boot.bin

194 KB
Binary file not shown.

0 commit comments

Comments
 (0)