From 15c50e116c92056653b61750d3c57a9754fd4f2c Mon Sep 17 00:00:00 2001 From: boochow Date: Sat, 24 Nov 2018 14:28:47 +0900 Subject: [PATCH 1/2] fix: USB enabled 'release' target --- raspberrypi/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/raspberrypi/Makefile b/raspberrypi/Makefile index 2c98806..9654b55 100644 --- a/raspberrypi/Makefile +++ b/raspberrypi/Makefile @@ -121,7 +121,7 @@ SRC_S = \ # USB ifneq ($(MICROPY_HW_USBHOST),0) -RELEASE=$(RELEASE)-usb +RELEASE :=$(RELEASE)-usb USBHOST_DIR=csud CSUDLIB=libcsud.a INC += -I$(USBHOST_DIR)/include @@ -190,9 +190,9 @@ $(BUILD)/config.txt: config-template.txt $(Q)$(ECHO) "kernel=firmware.img" >> $@ release: $(BUILD)/firmware.img $(BUILD)/config.txt - $(ECHO) "GEN $@" - $(Q)$(ZIP) $(BUILD)/$(RELEASE) -j $^ - $(Q)cd $(RELFILES); $(ZIP) ../$(BUILD)/$(RELEASE) -r . + $(ECHO) "GEN $(BUILD)/$(RELEASE).zip" + $(Q)$(ZIP) $(BUILD)/$(RELEASE) -jq $^ + $(Q)cd $(RELFILES); $(ZIP) ../$(BUILD)/$(RELEASE) -rq . $(BUILD)/firmware-qemu.img: $(OBJ) $(USBLIB) $(ECHO) "LINK $@" From 84a999b8e301f9ea8bae6d48b3b4c16c71b49618 Mon Sep 17 00:00:00 2001 From: boochow Date: Sat, 24 Nov 2018 14:31:50 +0900 Subject: [PATCH 2/2] fix: increase stability of CMD_SEND_OP_COND in init (VOLTAGE,etc.) --- raspberrypi/sd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/raspberrypi/sd.c b/raspberrypi/sd.c index 7646d4c..85e9dfe 100644 --- a/raspberrypi/sd.c +++ b/raspberrypi/sd.c @@ -206,6 +206,7 @@ int sd_cmd(unsigned int code, unsigned int arg) r=sd_cmd(CMD_APP_CMD|(sd_rca?CMD_RSPNS_48:0),sd_rca); if(sd_rca && !r) { uart_puts("ERROR: failed to send SD APP command\n"); sd_err=SD_ERROR;return 0;} code &= ~CMD_NEED_APP; + wait_cycles(100); } if(sd_status(SR_CMD_INHIBIT)) { uart_puts("ERROR: EMMC busy\n"); sd_err= SD_TIMEOUT;return 0;} uart_puts("EMMC: Sending command ");uart_hex(code);uart_puts(" arg ");uart_hex(arg);uart_send('\n');