--- /dev/null
+* text=auto
*.c~
*.h.un~
*.h~
+build/
+src/scsi2sd-util6/build
\ No newline at end of file
--- /dev/null
+# Docker image used for building the firmware.
+# docker build . -t scsi2sd-build
+# docker run --rm -v ${PWD}:/src scsi2sd-build make -C src -f Makefile.2021
+FROM debian:bullseye-slim
+
+RUN apt update && apt install -y gcc-arm-none-eabi make python3 python-is-python3
\ No newline at end of file
typedef enum
{
S2S_CFG_ENABLE_TERMINATOR = 1
- //S2S_CFG_ENABLE_BLIND_WRITES = 2, // Obosolete
+ //S2S_CFG_ENABLE_BLIND_WRITES = 2, // Obsolete
} S2S_CFG_FLAGS6;
typedef enum
" ********************************************************* -->\n" <<
" <scsiSpeed>" << static_cast<int>(config.scsiSpeed) << "</scsiSpeed>\n" <<
- " <!-- ********************************************************\n" <<
- " Enable SD card blind writes, which starts writing to the SD\n"
- " card before all the SCSI data has been received. Can cause problems\n" <<
- " with some SCSI hosts\n" <<
- " ********************************************************* -->\n" <<
- " <blindWrites>" <<
- (config.flags6 & S2S_CFG_ENABLE_BLIND_WRITES ? "true" : "false") <<
- "</blindWrites>\n" <<
-
"</S2S_BoardCfg>\n";
return s.str();
result.flags6 = result.flags & ~S2S_CFG_ENABLE_TERMINATOR;
}
}
- else if (child->GetName() == "blindWrites")
- {
- std::string s(child->GetNodeContent().mb_str());
- if (s == "true")
- {
- result.flags6 |= S2S_CFG_ENABLE_BLIND_WRITES;
- }
- else
- {
- result.flags6 = result.flags & ~S2S_CFG_ENABLE_BLIND_WRITES;
- }
- }
else if (child->GetName() == "selLatch")
{
std::string s(child->GetNodeContent().mb_str());
--- /dev/null
+# Docker image used for building scsi2sd-util6 for Windows and Linux.
+
+# Ensure git is using lf line endings on windows. Anything else breaks the autoconf scripts:
+# git config --global core.eol lf
+# git config --global core.autocrlf input
+
+# docker build -f Dockerfile-linux -t scsi2sd-util-build .
+#
+# One-off prep: (this could be added to the makefile !)
+# docker run --rm -v ${PWD}:/src/scsi2sd-util6 -w /src/scsi2sd-util6/libusb-1.0.23 scsi2sd-util-build autoreconf -i
+# docker run --rm -v ${PWD}:/src/scsi2sd-util6 -w /src/scsi2sd-util6/dfu-util scsi2sd-util-build sh -c ./autogen.sh
+#
+# Run make via "sh" to ensure $PWD is set correctly:
+# docker run --rm -v ${PWD}/../../:/app -w /app/src/scsi2sd-util6/ scsi2sd-util-build sh -c "make -j"
+# docker run --rm -v ${PWD}/../../:/app -w /app/src/scsi2sd-util6/ scsi2sd-util-build sh -c "make -j TARGET=Win32"
+# docker run --rm -v ${PWD}/../../:/app -w /app/src/scsi2sd-util6/ scsi2sd-util-build sh -c "make -j TARGET=Win64"
+FROM debian:bullseye-slim
+
+RUN apt update && apt install -y g++ g++-mingw-w64 make automake libtool pkg-config
+RUN apt update && apt install -y libudev-dev libgtk2.0-dev libusb-1.0-0-dev
\ No newline at end of file
BUILD := $(PWD)/build/linux
LIBUSB_CONFIG+=--disable-shared
LDFLAGS_LIBUSB+= -ludev -lpthread
+ USE_SYSTEM_DFU_UTIL = Yes
endif
ifeq ($(TARGET),Darwin)
# Should match OSX