Vendor cgminer source, patch for SHA256, update installer

This commit is contained in:
Gemini Bot
2026-01-21 12:49:35 +00:00
parent 47bb68c2ec
commit 7df9460026
245 changed files with 228809 additions and 99 deletions

View File

@@ -32,16 +32,15 @@ touch /etc/authbind/byport/80
chmod 500 /etc/authbind/byport/80
chown $USER /etc/authbind/byport/80
# 2. Cgminer Installation (dtbartle fork for Gridseed GC3355)
if [ ! -f "/usr/local/bin/cgminer" ]; then
echo "Compiling and installing cgminer for Gridseed..."
cd /tmp
rm -rf cgminer-gc3355
# 2. Cgminer Installation (Patched local version)
if [ ! -f "/usr/local/bin/cgminer" ] || [ "$1" == "--reinstall-cgminer" ]; then
echo "Compiling and installing cgminer for Gridseed (Local Source)..."
git clone https://github.com/dtbartle/cgminer-gc3355.git
cd cgminer-gc3355
# Copy source to temp for building to keep repo clean
cp -r "$SCRIPT_DIR/src/cgminer-gc3355" /tmp/cgminer-build
cd /tmp/cgminer-build
# Fix for modern GCC (10+) defaulting to -fno-common which breaks old codebases
# Fix for modern GCC (10+) defaulting to -fno-common
export CFLAGS="-fcommon -O2"
if [ -f "./autogen.sh" ]; then
@@ -51,14 +50,16 @@ if [ ! -f "/usr/local/bin/cgminer" ]; then
fi
# Explicitly link pthread if needed, though usually handled by configure
# Enable scrypt AND gridseed. The patch in driver-gridseed.c ensures
# that scrypt commands are only sent if --scrypt is active.
./configure --enable-gridseed --enable-scrypt --without-curses
make
make install
cd ..
rm -rf cgminer-gc3355
rm -rf /tmp/cgminer-build
else
echo "cgminer found, skipping compilation."
echo "cgminer found, skipping compilation. Use --reinstall-cgminer to force."
fi
# 2.1 Setup USB Permissions (udev rules)