mirror of https://github.com/probonopd/MiniDexed
pull/660/head
parent
afa72d21aa
commit
f5b0b33f7f
@ -1,95 +1,49 @@ |
|||||||
name: Build |
name: build |
||||||
|
|
||||||
env: |
env: |
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||||
|
PROJECT_NAME: "MiniDexed" |
||||||
|
|
||||||
on: |
on: |
||||||
push: |
push: |
||||||
branches: [ main ] |
branches: [main] |
||||||
pull_request: |
pull_request: |
||||||
branches: [ main ] |
branches: [main] |
||||||
|
|
||||||
jobs: |
jobs: |
||||||
Build: |
build: |
||||||
|
|
||||||
runs-on: ubuntu-20.04 |
runs-on: ubuntu-20.04 |
||||||
|
strategy: |
||||||
|
matrix: |
||||||
|
builds: [{ rpi: 5 }, { rpi: 4 }, { rpi: 3 }, { rpi: 2 }, { rpi: 1 }] |
||||||
steps: |
steps: |
||||||
- uses: actions/checkout@v2 |
- uses: actions/checkout@v4 |
||||||
- name: Get specific commits of git submodules |
with: |
||||||
run: | |
submodules: recursive |
||||||
sh -ex ./submod.sh |
|
||||||
- name: Install toolchains |
- name: Install toolchain |
||||||
run: | |
|
||||||
set -ex |
|
||||||
wget -q https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz |
|
||||||
tar xf *-aarch64-none-elf.tar.xz |
|
||||||
wget -q https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz |
|
||||||
tar xf *-arm-none-eabi.tar.xz |
|
||||||
mkdir -p kernels |
|
||||||
- name: Build for Raspberry Pi 5 |
|
||||||
run: | |
|
||||||
set -ex |
|
||||||
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH |
|
||||||
RPI=5 bash -ex build.sh |
|
||||||
cp ./src/kernel*.img ./kernels/ |
|
||||||
- name: Build for Raspberry Pi 4 |
|
||||||
run: | |
|
||||||
set -ex |
|
||||||
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH |
|
||||||
RPI=4 bash -ex build.sh |
|
||||||
cp ./src/kernel*.img ./kernels/ |
|
||||||
- name: Build for Raspberry Pi 3 |
|
||||||
run: | |
|
||||||
set -ex |
|
||||||
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH |
|
||||||
RPI=3 bash -ex build.sh |
|
||||||
cp ./src/kernel*.img ./kernels/ |
|
||||||
- name: Build for Raspberry Pi 2 |
|
||||||
run: | |
|
||||||
set -ex |
|
||||||
export PATH=$(readlink -f ./gcc-*arm-none*/bin/):$PATH |
|
||||||
RPI=2 bash -ex build.sh |
|
||||||
cp ./src/kernel*.img ./kernels/ |
|
||||||
- name: Build for Raspberry Pi 1 |
|
||||||
run: | |
run: | |
||||||
set -ex |
RPI=${{ matrix.builds.rpi }} make install-toolchain |
||||||
export PATH=$(readlink -f ./gcc-*arm-none*/bin/):$PATH |
echo "$(pwd)/external/gcc/bin" >> $GITHUB_PATH |
||||||
RPI=1 bash -ex build.sh |
|
||||||
cp ./src/kernel*.img ./kernels/ |
- name: Build for Raspberry Pi ${{ matrix.builds.rpi }} |
||||||
- name: Get Raspberry Pi boot files |
|
||||||
run: | |
run: | |
||||||
set -ex |
RPI=${{ matrix.builds.rpi }} make build |
||||||
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH |
|
||||||
cd ./circle-stdlib/libs/circle/boot |
- name: Build & zip Raspberry Pi boot files |
||||||
make |
|
||||||
make armstub64 |
|
||||||
cd - |
|
||||||
mkdir -p sdcard |
|
||||||
cp -r ./circle-stdlib/libs/circle/boot/* sdcard |
|
||||||
rm -rf sdcard/config*.txt sdcard/README sdcard/Makefile sdcard/armstub sdcard/COPYING.linux |
|
||||||
cp ./src/config.txt ./src/minidexed.ini ./src/*img ./src/performance.ini sdcard/ |
|
||||||
cp ./getsysex.sh sdcard/ |
|
||||||
echo "usbspeed=full" > sdcard/cmdline.txt |
|
||||||
cd sdcard |
|
||||||
cp ../kernels/* . || true |
|
||||||
cd - |
|
||||||
- name: Get performance files |
|
||||||
run: | |
run: | |
||||||
git clone https://github.com/Banana71/Soundplantage --depth 1 # depth 1 means only the latest commit |
make get-performances |
||||||
cp -r ./Soundplantage/performance ./Soundplantage/*.pdf ./sdcard/ |
make get-sysex |
||||||
cd sdcard |
RPI=${{ matrix.builds.rpi }} make build-stub |
||||||
zip -r ../MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD).zip * |
RPI=${{ matrix.builds.rpi }} make zip |
||||||
echo "artifactName=MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV |
|
||||||
cd - |
- uses: actions/upload-artifact@v4 |
||||||
- uses: actions/upload-artifact@v3 |
|
||||||
with: |
with: |
||||||
name: ${{ env.artifactName }} # Exported above |
name: ${{env.PROJECT_NAME}}_$(git rev-parse --short HEAD) |
||||||
path: ./sdcard/* |
path: ./build/sdcard/* |
||||||
- name: Upload to GitHub Releases (only when building from main branch) |
|
||||||
|
- name: Release |
||||||
if: ${{ github.ref == 'refs/heads/main' }} |
if: ${{ github.ref == 'refs/heads/main' }} |
||||||
run: | |
run: | |
||||||
set -ex |
|
||||||
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh |
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh |
||||||
bash ./upload.sh ./MiniDexed*.zip |
bash ./upload.sh ./${{env.PROJECT_NAME}}*.zip |
||||||
|
|
||||||
|
@ -1,51 +1,11 @@ |
|||||||
# Prerequisites |
*.elf |
||||||
*.d |
*.d |
||||||
|
|
||||||
# Compiled Object files |
|
||||||
*.slo |
|
||||||
*.lo |
|
||||||
*.o |
|
||||||
*.obj |
|
||||||
*.O |
|
||||||
|
|
||||||
# Precompiled Headers |
|
||||||
*.gch |
|
||||||
*.pch |
|
||||||
|
|
||||||
# Compiled Dynamic libraries |
|
||||||
*.so |
|
||||||
*.dylib |
|
||||||
*.dll |
|
||||||
|
|
||||||
# Fortran module files |
|
||||||
*.mod |
|
||||||
*.smod |
|
||||||
|
|
||||||
# Compiled Static libraries |
|
||||||
*.lai |
|
||||||
*.la |
|
||||||
*.a |
|
||||||
*.lib |
|
||||||
|
|
||||||
# Executables |
|
||||||
*.exe |
|
||||||
*.out |
|
||||||
*.app |
|
||||||
|
|
||||||
# Toolchain |
|
||||||
gcc-* |
|
||||||
|
|
||||||
# Build artefacts |
|
||||||
kernel* |
|
||||||
MiniDexed* |
|
||||||
sdcard |
|
||||||
*.zip |
|
||||||
*.img |
*.img |
||||||
|
*.lst |
||||||
|
*.map |
||||||
|
*.o |
||||||
|
|
||||||
# Editor related files |
build/ |
||||||
*.swp |
external/gcc/ |
||||||
*.swo |
external/soundplantage/ |
||||||
|
tmp/ |
||||||
CMSIS_5/ |
|
||||||
Synth_Dexed/ |
|
||||||
circle-stdlib/ |
|
||||||
|
@ -1,9 +1,9 @@ |
|||||||
[submodule "circle-stdlib"] |
[submodule "external/circle-stdlib"] |
||||||
path = circle-stdlib |
path = external/circle-stdlib |
||||||
url = https://github.com/smuehlst/circle-stdlib |
url = https://github.com/smuehlst/circle-stdlib |
||||||
[submodule "Synth_Dexed"] |
[submodule "external/Synth_Dexed"] |
||||||
path = Synth_Dexed |
path = external/Synth_Dexed |
||||||
url = https://codeberg.org/dcoredump/Synth_Dexed.git |
url = https://codeberg.org/dcoredump/Synth_Dexed.git |
||||||
[submodule "CMSIS_5"] |
[submodule "external/CMSIS_5"] |
||||||
path = CMSIS_5 |
path = external/CMSIS_5 |
||||||
url = https://github.com/ARM-software/CMSIS_5 |
url = https://github.com/ARM-software/CMSIS_5 |
||||||
|
@ -0,0 +1,42 @@ |
|||||||
|
RPI ?= 4
|
||||||
|
|
||||||
|
.PHONY: all |
||||||
|
all: clean build build-stub zip |
||||||
|
|
||||||
|
.PHONY: build |
||||||
|
build: |
||||||
|
@mkdir -p build/kernels build/sdcard
|
||||||
|
@./scripts/build.sh
|
||||||
|
@cp ./src/kernel*.img ./build/kernels/
|
||||||
|
|
||||||
|
.PHONY: build-stub |
||||||
|
build-stub: |
||||||
|
@mkdir -p build/kernels build/sdcard
|
||||||
|
@./scripts/build-stub.sh
|
||||||
|
|
||||||
|
.PHONY: clean |
||||||
|
clean: |
||||||
|
@rm -rf build
|
||||||
|
|
||||||
|
.PHONY: get-sysex |
||||||
|
get-sysex: |
||||||
|
@mkdir -p build/sdcard && \
|
||||||
|
cd ./build/sdcard && \
|
||||||
|
../../scripts/get-sysex.sh && \
|
||||||
|
cd -
|
||||||
|
|
||||||
|
.PHONY: get-performances |
||||||
|
get-performances: |
||||||
|
@./scripts/get-performances.sh
|
||||||
|
|
||||||
|
.PHONY: install |
||||||
|
install: |
||||||
|
@echo "TODO(antoniae)"
|
||||||
|
|
||||||
|
.PHONY: install-toolchain |
||||||
|
install-toolchain: |
||||||
|
@./scripts/install-toolchain.sh
|
||||||
|
|
||||||
|
.PHONY: zip |
||||||
|
zip: |
||||||
|
@./scripts/zip.sh
|
@ -1 +0,0 @@ |
|||||||
Subproject commit 8c677ceb4b3fb73f8643e30ff6cf4158dc8b9e53 |
|
@ -1 +0,0 @@ |
|||||||
Subproject commit 61cf3a47bf93628039078b7c840e44432e52343e |
|
@ -0,0 +1 @@ |
|||||||
|
Subproject commit c9f52741a802ad9bb01263823650f7cc3b0b5108 |
@ -0,0 +1 @@ |
|||||||
|
Subproject commit 3bd135d35ac23c7c726924cb85b5890cbf80bbfe |
@ -1,43 +0,0 @@ |
|||||||
#!/bin/sh |
|
||||||
|
|
||||||
# Get voices from |
|
||||||
# https://yamahablackboxes.com/collection/yamaha-dx7-synthesizer/patches/ |
|
||||||
|
|
||||||
mkdir -p sysex/voice/ |
|
||||||
|
|
||||||
DIR="https://yamahablackboxes.com/patches/dx7/factory" |
|
||||||
|
|
||||||
# wget -c "${DIR}"/rom1a.syx -O sysex/voice/000000_rom1a.syx |
|
||||||
# wget -c "${DIR}"/rom1b.syx -O sysex/voice/000001_rom1b.syx |
|
||||||
# wget -c "${DIR}"/rom2a.syx -O sysex/voice/000002_rom2a.syx |
|
||||||
# wget -c "${DIR}"/rom2b.syx -O sysex/voice/000003_rom2b.syx |
|
||||||
wget -c "${DIR}"/rom3a.syx -O sysex/voice/000001_rom3a.syx |
|
||||||
wget -c "${DIR}"/rom3b.syx -O sysex/voice/000002_rom3b.syx |
|
||||||
wget -c "${DIR}"/rom4a.syx -O sysex/voice/000003_rom4a.syx |
|
||||||
wget -c "${DIR}"/rom4b.syx -O sysex/voice/000004_rom4b.syx |
|
||||||
|
|
||||||
DIR="https://yamahablackboxes.com/patches/dx7/vrc" |
|
||||||
|
|
||||||
wget -c "${DIR}"/vrc101b.syx -O sysex/voice/000005_vrc101b.syx |
|
||||||
wget -c "${DIR}"/vrc102a.syx -O sysex/voice/000006_vrc102a.syx |
|
||||||
wget -c "${DIR}"/vrc102b.syx -O sysex/voice/000007_vrc102b.syx |
|
||||||
wget -c "${DIR}"/vrc103a.syx -O sysex/voice/000008_vrc103a.syx |
|
||||||
wget -c "${DIR}"/vrc103b.syx -O sysex/voice/000009_vrc103b.syx |
|
||||||
wget -c "${DIR}"/vrc104a.syx -O sysex/voice/000010_vrc104a.syx |
|
||||||
wget -c "${DIR}"/vrc104b.syx -O sysex/voice/000011_vrc104b.syx |
|
||||||
wget -c "${DIR}"/vrc105a.syx -O sysex/voice/000012_vrc105a.syx |
|
||||||
wget -c "${DIR}"/vrc105b.syx -O sysex/voice/000013_vrc105b.syx |
|
||||||
wget -c "${DIR}"/vrc106a.syx -O sysex/voice/000014_vrc106a.syx |
|
||||||
wget -c "${DIR}"/vrc106b.syx -O sysex/voice/000015_vrc106b.syx |
|
||||||
wget -c "${DIR}"/vrc107a.syx -O sysex/voice/000016_vrc107a.syx |
|
||||||
wget -c "${DIR}"/vrc107b.syx -O sysex/voice/000017_vrc107b.syx |
|
||||||
wget -c "${DIR}"/vrc108a.syx -O sysex/voice/000018_vrc108a.syx |
|
||||||
wget -c "${DIR}"/vrc108b.syx -O sysex/voice/000019_vrc108b.syx |
|
||||||
wget -c "${DIR}"/vrc109a.syx -O sysex/voice/000020_vrc109a.syx |
|
||||||
wget -c "${DIR}"/vrc109b.syx -O sysex/voice/000021_vrc109b.syx |
|
||||||
wget -c "${DIR}"/vrc110a.syx -O sysex/voice/000022_vrc110a.syx |
|
||||||
wget -c "${DIR}"/vrc110b.syx -O sysex/voice/000023_vrc110b.syx |
|
||||||
wget -c "${DIR}"/vrc111a.syx -O sysex/voice/000024_vrc111a.syx |
|
||||||
wget -c "${DIR}"/vrc111b.syx -O sysex/voice/000025_vrc111b.syx |
|
||||||
wget -c "${DIR}"/vrc112a.syx -O sysex/voice/000026_vrc112a.syx |
|
||||||
wget -c "${DIR}"/vrc112b.syx -O sysex/voice/000027_vrc112b.syx |
|
@ -0,0 +1,22 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
echo "Building stub..." |
||||||
|
|
||||||
|
if [ -z "${RPI}" ] ; then |
||||||
|
echo "\$RPI missing, exiting" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
echo "Building stub for RPI=${RPI}..." |
||||||
|
|
||||||
|
cd external/circle-stdlib/libs/circle/boot |
||||||
|
|
||||||
|
make |
||||||
|
if [ "${RPI}" -gt 2 ] |
||||||
|
then |
||||||
|
make armstub64 |
||||||
|
fi |
||||||
|
|
||||||
|
cd - |
||||||
|
|
||||||
|
echo " Done." |
@ -0,0 +1,18 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
echo "Fetching performances..." |
||||||
|
|
||||||
|
DEST="build/sdcard" |
||||||
|
|
||||||
|
mkdir -p ${DEST} |
||||||
|
|
||||||
|
rm -rf external/soundplantage |
||||||
|
|
||||||
|
git clone https://github.com/Banana71/Soundplantage --depth 1 external/soundplantage > /dev/null 2>&1 |
||||||
|
|
||||||
|
cp -r \ |
||||||
|
external/soundplantage/performance \ |
||||||
|
external/soundplantage/*.pdf \ |
||||||
|
$DEST |
||||||
|
|
||||||
|
echo " Done." |
@ -0,0 +1,59 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
echo "Fetching sysex files..." |
||||||
|
|
||||||
|
# Get voices from |
||||||
|
# https://yamahablackboxes.com/collection/yamaha-dx7-synthesizer/patches/ |
||||||
|
|
||||||
|
mkdir -p sysex/voice/ |
||||||
|
|
||||||
|
DIR="https://yamahablackboxes.com/patches/dx7/factory" |
||||||
|
FILES=( |
||||||
|
# "rom1a" |
||||||
|
# "rom1b" |
||||||
|
# "rom2a" |
||||||
|
# "rom2b" |
||||||
|
"rom3a" |
||||||
|
"rom3b" |
||||||
|
"rom4a" |
||||||
|
"rom4b" |
||||||
|
) |
||||||
|
for i in "${!FILES[@]}"; do |
||||||
|
index=$((i + 1)) |
||||||
|
echo " Downloading ${FILES[$i]}..." |
||||||
|
wget -cq "${DIR}/${FILES[$i]}.syx" -O "sysex/voice/$(printf '%06d' $index)_${FILES[$i]}.syx" |
||||||
|
done |
||||||
|
|
||||||
|
DIR="https://yamahablackboxes.com/patches/dx7/vrc" |
||||||
|
FILES=( |
||||||
|
"vrc101b" |
||||||
|
"vrc102a" |
||||||
|
"vrc102b" |
||||||
|
"vrc103a" |
||||||
|
"vrc103b" |
||||||
|
"vrc104a" |
||||||
|
"vrc104b" |
||||||
|
"vrc105a" |
||||||
|
"vrc105b" |
||||||
|
"vrc106a" |
||||||
|
"vrc106b" |
||||||
|
"vrc107a" |
||||||
|
"vrc107b" |
||||||
|
"vrc108a" |
||||||
|
"vrc108b" |
||||||
|
"vrc109a" |
||||||
|
"vrc109b" |
||||||
|
"vrc110a" |
||||||
|
"vrc110b" |
||||||
|
"vrc111a" |
||||||
|
"vrc111b" |
||||||
|
"vrc112a" |
||||||
|
"vrc112b" |
||||||
|
) |
||||||
|
for i in "${!FILES[@]}"; do |
||||||
|
index=$((i + 5)) # Adjust the starting index as needed |
||||||
|
echo " Downloading ${FILES[$i]}..." |
||||||
|
wget -cq "${DIR}/${FILES[$i]}.syx" -O "sysex/voice/$(printf '%06d' $index)_${FILES[$i]}.syx" |
||||||
|
done |
||||||
|
|
||||||
|
echo " Done." |
@ -0,0 +1,32 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
RPI=${RPI:-4} |
||||||
|
DEST="external/gcc" |
||||||
|
TARGET_GCC="gcc-arm-10.3-2021.07" |
||||||
|
|
||||||
|
echo "Installing toolchain for RPI=${RPI}..." |
||||||
|
|
||||||
|
# Check if gcc is already installed |
||||||
|
if [ -d ${DEST} ]; then |
||||||
|
echo " Toolchain already installed." |
||||||
|
exit 0 |
||||||
|
fi |
||||||
|
|
||||||
|
mkdir -p ${DEST} |
||||||
|
mkdir -p tmp |
||||||
|
|
||||||
|
TARGET="${TARGET_GCC}-x86_64-aarch64-none-elf" |
||||||
|
URL="https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/${TARGET}.tar.xz" |
||||||
|
|
||||||
|
if [ "${RPI}" -le 2 ]; then |
||||||
|
TARGET="${TARGET_GCC}-x86_64-arm-none-eabi" |
||||||
|
URL="https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/${TARGET}.tar.xz" |
||||||
|
fi |
||||||
|
|
||||||
|
if [ ! -f tmp/gcc-arm-*-*.tar.xz ]; then |
||||||
|
echo " Downloading toolchain..." |
||||||
|
wget -q -P tmp ${URL} |
||||||
|
tar -xf tmp/gcc-arm-*-*.tar.xz -C ${DEST} --strip-components 1 |
||||||
|
fi |
||||||
|
|
||||||
|
echo " Done." |
@ -0,0 +1,31 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
echo "Zipping boot files..." |
||||||
|
|
||||||
|
DEST="build/sdcard" |
||||||
|
|
||||||
|
mkdir -p ${DEST} |
||||||
|
|
||||||
|
cp -r ./external/circle-stdlib/libs/circle/boot/* ${DEST} |
||||||
|
rm -rf \ |
||||||
|
${DEST}/README \ |
||||||
|
${DEST}/config*.txt \ |
||||||
|
${DEST}/Makefile \ |
||||||
|
${DEST}/armstub \ |
||||||
|
${DEST}/COPYING.linux |
||||||
|
|
||||||
|
cp \ |
||||||
|
build/kernels/* \ |
||||||
|
src/config.txt \ |
||||||
|
src/*img \ |
||||||
|
src/minidexed.ini \ |
||||||
|
src/performance.ini \ |
||||||
|
${DEST} |
||||||
|
|
||||||
|
echo "usbspeed=full" > ${DEST}/cmdline.txt |
||||||
|
|
||||||
|
cp build/kernels/* ${DEST} |
||||||
|
|
||||||
|
zip -r build/MiniDexed_$(date +%Y-%m-%d).zip ${DEST}/* |
||||||
|
|
||||||
|
echo " Done." |
Loading…
Reference in new issue