From 65186cbb26702d2202b8a294ba4f654e0a93deb5 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Thu, 8 Dec 2022 16:54:13 +0100 Subject: [PATCH 01/48] Also copy DPF on Windows --- build.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/build.bat b/build.bat index e559781..97daba9 100644 --- a/build.bat +++ b/build.bat @@ -38,6 +38,7 @@ echo ../Heavy/bin/make.exe GCC_PATH=../Heavy/bin> build.sh cd .. xcopy /E /H /C /I libDaisy Heavy\lib\libDaisy +xcopy /E /H /C /I DPF Heavy\lib\DPF :: Package heavy using pyinstaller python -m ensurepip From f6ce1f1352f36982308c580bda4e066dfe9400b3 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Fri, 9 Dec 2022 01:33:50 +0100 Subject: [PATCH 02/48] Added minGW environment in git lfs --- .gitattributes | 1 + resources/minGW.zip | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 .gitattributes create mode 100644 resources/minGW.zip diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..486a232 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.zip filter=lfs diff=lfs merge=lfs -text diff --git a/resources/minGW.zip b/resources/minGW.zip new file mode 100644 index 0000000..20d0e02 --- /dev/null +++ b/resources/minGW.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5db439786376449b4ae4769c6e3454dffe97f533bc48a4386e53ce8c757a2b85 +size 153074448 From 055c50dab26175be272e4a7e74dde8ff69fa8270 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Fri, 9 Dec 2022 01:44:08 +0100 Subject: [PATCH 03/48] Updated minGW, updated build script --- build.bat | 13 +++++-------- resources/minGW.zip | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/build.bat b/build.bat index 97daba9..6883f08 100644 --- a/build.bat +++ b/build.bat @@ -3,15 +3,12 @@ git clone --recursive https://github.com/electro-smith/DaisyToolchain move DaisyToolchain\windows Heavy -set URL="https://github.com/skeeto/w64devkit/releases/download/v1.17.0/w64devkit-1.17.0.zip" +:: Expand minGW environment, for command line utilities and compilation utilities +powershell -Command "Expand-Archive resources\minGW.zip -Force -DestinationPath .\tmp" -:: Get minimal minGW environment, for command line utilities and native compilation utilities -powershell -Command "Invoke-WebRequest %URL% -OutFile w64devkit.zip" -powershell -Command "Expand-Archive w64devkit.zip -Force -DestinationPath .\tmp" - -move tmp\w64devkit\bin\* Heavy\bin\ -move tmp\w64devkit\lib\* Heavy\lib\ -move tmp\w64devkit\libexec Heavy\libexec +move tmp\bin\* Heavy\bin\ +move tmp\lib\* Heavy\lib\ +move tmp\libexec Heavy\libexec copy resources\heavy-static.a Heavy\lib\heavy-static.a copy resources\daisy_makefile Heavy\etc\daisy_makefile diff --git a/resources/minGW.zip b/resources/minGW.zip index 20d0e02..c9b1263 100644 --- a/resources/minGW.zip +++ b/resources/minGW.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5db439786376449b4ae4769c6e3454dffe97f533bc48a4386e53ce8c757a2b85 -size 153074448 +oid sha256:2fd3170a8a3f2d1ab661ec3a57f2ae717741e7088089e7936a2f68b650b915cc +size 340295139 From d61bb8370eb7ff6a3923597c1b7d5017a2bf821a Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Fri, 9 Dec 2022 01:45:40 +0100 Subject: [PATCH 04/48] Build script improvement --- build.bat | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/build.bat b/build.bat index 6883f08..c011827 100644 --- a/build.bat +++ b/build.bat @@ -1,14 +1,10 @@ :: Get daisy toolchain, containing the arm compiler and more utils git clone --recursive https://github.com/electro-smith/DaisyToolchain -move DaisyToolchain\windows Heavy +mkdir "Heavy" :: Expand minGW environment, for command line utilities and compilation utilities -powershell -Command "Expand-Archive resources\minGW.zip -Force -DestinationPath .\tmp" - -move tmp\bin\* Heavy\bin\ -move tmp\lib\* Heavy\lib\ -move tmp\libexec Heavy\libexec +powershell -Command "Expand-Archive resources\minGW.zip -Force -DestinationPath .\Heavy" copy resources\heavy-static.a Heavy\lib\heavy-static.a copy resources\daisy_makefile Heavy\etc\daisy_makefile From 809a897020319132a1f1118bfb65d7f79ffc2643 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Fri, 9 Dec 2022 02:22:24 +0100 Subject: [PATCH 05/48] Added lfs flag to Windows github runner --- .github/workflows/run_script.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 8f05773..29b341b 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -44,6 +44,7 @@ jobs: - uses: actions/checkout@v3 with: + lfs: 'true' submodules: recursive - name: Run Packaging Script From 7410a62e2c82f35b6aea918b3697d6dab2274453 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Fri, 9 Dec 2022 03:01:52 +0100 Subject: [PATCH 06/48] Minified minGW --- build.bat | 3 --- resources/minGW.zip | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/build.bat b/build.bat index c011827..49873f4 100644 --- a/build.bat +++ b/build.bat @@ -1,6 +1,3 @@ -:: Get daisy toolchain, containing the arm compiler and more utils -git clone --recursive https://github.com/electro-smith/DaisyToolchain - mkdir "Heavy" :: Expand minGW environment, for command line utilities and compilation utilities diff --git a/resources/minGW.zip b/resources/minGW.zip index c9b1263..42886e6 100644 --- a/resources/minGW.zip +++ b/resources/minGW.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2fd3170a8a3f2d1ab661ec3a57f2ae717741e7088089e7936a2f68b650b915cc -size 340295139 +oid sha256:f1acc731ab9e2181f29aad4e950ca3be506c9885d75eeca8dc2f368e9bdb7fa3 +size 272986426 From 51c4f695375ad4f3f3128a95035bf72c7debb2bb Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Fri, 9 Dec 2022 04:39:08 +0100 Subject: [PATCH 07/48] Added missing files to minGW --- resources/minGW.zip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/minGW.zip b/resources/minGW.zip index 42886e6..a73a955 100644 --- a/resources/minGW.zip +++ b/resources/minGW.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f1acc731ab9e2181f29aad4e950ca3be506c9885d75eeca8dc2f368e9bdb7fa3 -size 272986426 +oid sha256:f8697d05387258783c8f5fac42e24561bfd109195eee12966af76059c59fb15d +size 269188870 From e7ea65aabc7b56f3cb0d2b6d03709883d44edd26 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Fri, 9 Dec 2022 15:50:48 +0100 Subject: [PATCH 08/48] Makes sure sh can find profile --- build.bat | 24 ++++++++++++------------ resources/minGW.zip | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build.bat b/build.bat index 49873f4..f412919 100644 --- a/build.bat +++ b/build.bat @@ -8,17 +8,17 @@ copy resources\daisy_makefile Heavy\etc\daisy_makefile xcopy /E /H /C /I resources\usb_driver Heavy\etc\usb_driver :: Remove unnecessary target platforms from compiler -mkdir "Heavy\arm-none-eabi\lib\temp" -move "Heavy\arm-none-eabi\lib\thumb\v7e-m+dp" "Heavy\arm-none-eabi\lib\temp\v7e-m+dp" -rmdir /S /Q "Heavy\arm-none-eabi\lib\thumb" -rename "Heavy\arm-none-eabi\lib\temp" "thumb" +mkdir "Heavy\usr\arm-none-eabi\lib\temp" +move "Heavy\usr\arm-none-eabi\lib\thumb\v7e-m+dp" "Heavy\arm-none-eabi\usr\lib\temp\v7e-m+dp" +rmdir /S /Q "Heavy\usr\arm-none-eabi\lib\thumb" +rename "Heavy\usr\arm-none-eabi\lib\temp" "thumb" -mkdir "Heavy\lib\gcc\arm-none-eabi\12.2.0\temp" -move "Heavy\lib\gcc\arm-none-eabi\12.2.0\thumb\v7e-m+dp" "Heavy\lib\gcc\arm-none-eabi\12.2.0\temp\v7e-m+dp" -rmdir /S /Q "Heavy\lib\gcc\arm-none-eabi\12.2.0\thumb" -rename "Heavy\lib\gcc\arm-none-eabi\12.2.0\temp" "thumb" +mkdir "Heavy\usr\lib\gcc\arm-none-eabi\12.2.0\temp" +move "Heavy\usr\lib\gcc\arm-none-eabi\12.2.0\thumb\v7e-m+dp" "Heavy\usr\lib\gcc\arm-none-eabi\12.2.0\temp\v7e-m+dp" +rmdir /S /Q "Heavy\usr\lib\gcc\arm-none-eabi\12.2.0\thumb" +rename "Heavy\usr\lib\gcc\arm-none-eabi\12.2.0\temp" "thumb" -del /S /Q ".\Heavy\arm-none-eabi\lib\arm" +del /S /Q ".\Heavy\usr\arm-none-eabi\lib\arm" :: Pre-build libdaisy cd libDaisy @@ -27,8 +27,8 @@ echo ../Heavy/bin/make.exe GCC_PATH=../Heavy/bin> build.sh ..\Heavy\bin\sh.exe --login build.sh cd .. -xcopy /E /H /C /I libDaisy Heavy\lib\libDaisy -xcopy /E /H /C /I DPF Heavy\lib\DPF +xcopy /E /H /C /I libDaisy Heavy\usr\lib\libDaisy +xcopy /E /H /C /I DPF Heavy\usr\lib\DPF :: Package heavy using pyinstaller python -m ensurepip @@ -40,7 +40,7 @@ FOR /F "tokens=*" %%g IN ('python -m site --user-site') do (SET PYTHON_SITE=%%g) python resources\run_pyinstaller.py -n Heavy --noconfirm --windowed --paths %PYTHON_SITE% .\hvcc\hvcc\__init__.py --collect-data json2daisy --add-data=".\hvcc\hvcc\generators;.\generators" --add-data=".\hvcc\hvcc\core;.\hvcc\core" --add-data=".\hvcc\hvcc\generators;.\hvcc\generators" --add-data=".\hvcc\hvcc\interpreters;.\hvcc\interpreters" copy .\dist\Heavy\json2daisy\resources\component_defs.json .\dist\Heavy\json2daisy\resources\seed.json -move .\dist\Heavy .\Heavy\bin\ +move .\dist\Heavy .\Heavy\usr\bin\ del /s /q .\dist\* del /s /q .\build\* diff --git a/resources/minGW.zip b/resources/minGW.zip index a73a955..c43f849 100644 --- a/resources/minGW.zip +++ b/resources/minGW.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8697d05387258783c8f5fac42e24561bfd109195eee12966af76059c59fb15d -size 269188870 +oid sha256:38a1a01118e55713f4dbecacf6b79a74be90764fc81ba1f330b6bf916ca43a62 +size 541686401 From 51f888056bc608557edad561fdc13ddc834d700e Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Fri, 9 Dec 2022 19:55:56 +0100 Subject: [PATCH 09/48] Fixed setup for Windows --- resources/minGW.zip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/minGW.zip b/resources/minGW.zip index c43f849..2f1f0cf 100644 --- a/resources/minGW.zip +++ b/resources/minGW.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38a1a01118e55713f4dbecacf6b79a74be90764fc81ba1f330b6bf916ca43a62 -size 541686401 +oid sha256:ed2d579d11e861d49bfa3ec757412b2193b9e8c666518e5d77fdef39d5450e6b +size 294088254 From 77093c15cc8cde87a681b8779d42383c338bb5fb Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Fri, 9 Dec 2022 20:38:14 +0100 Subject: [PATCH 10/48] Update for Windows --- resources/minGW.zip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/minGW.zip b/resources/minGW.zip index 2f1f0cf..73e61ed 100644 --- a/resources/minGW.zip +++ b/resources/minGW.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ed2d579d11e861d49bfa3ec757412b2193b9e8c666518e5d77fdef39d5450e6b -size 294088254 +oid sha256:a080bce0042ec9a5fba6a65ddc96b7f205c6846c0c4e2fa59927e23a221eef18 +size 294115815 From 31f0c07ee02c7814b8f3367ccd7d0289189886dc Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 01:12:36 +0100 Subject: [PATCH 11/48] Changed DPF to dpf --- .gitmodules | 2 +- build.bat | 2 +- build.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2fe62f2..f03fa24 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,5 +5,5 @@ path = libDaisy url = https://github.com/electro-smith/libDaisy.git [submodule "DPF"] - path = DPF + path = dpf url = https://github.com/DISTRHO/DPF.git diff --git a/build.bat b/build.bat index f412919..4d5267d 100644 --- a/build.bat +++ b/build.bat @@ -28,7 +28,7 @@ echo ../Heavy/bin/make.exe GCC_PATH=../Heavy/bin> build.sh cd .. xcopy /E /H /C /I libDaisy Heavy\usr\lib\libDaisy -xcopy /E /H /C /I DPF Heavy\usr\lib\DPF +xcopy /E /H /C /I dpf Heavy\usr\lib\dpf :: Package heavy using pyinstaller python -m ensurepip diff --git a/build.sh b/build.sh index 20ad9db..cbdee22 100755 --- a/build.sh +++ b/build.sh @@ -110,7 +110,7 @@ make GCC_PATH=../Heavy/bin/ popd cp -rf ./libDaisy ./Heavy/lib/libDaisy -cp -rf ./DPF ./Heavy/lib/DPF +cp -rf ./dpf ./Heavy/lib/dpf # Package Heavy with pyinstaller python3 -m ensurepip From e053ac0094a4c653977f80875deade4b68846c30 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 03:50:34 +0100 Subject: [PATCH 12/48] Updated Linux build script --- .gitattributes | 1 + build.sh | 29 ++++++++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.gitattributes b/.gitattributes index 486a232..a3b38ce 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ *.zip filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text diff --git a/build.sh b/build.sh index cbdee22..8c5147b 100755 --- a/build.sh +++ b/build.sh @@ -11,23 +11,34 @@ else URL="https://developer.arm.com/-/media/Files/downloads/gnu/12.2.mpacbti-bet1/binrel/arm-gnu-toolchain-12.2.mpacbti-bet1-x86_64-arm-none-eabi.tar.xz" fi -echo "Downloading arm-none-eabi-gcc" curl -fSL -A "Mozilla/4.0" -o gcc-arm-none-eabi.tar.xz $URL + echo "Extracting..." -mkdir tmp -pushd tmp +mkdir gcc-arm-none-eabi +pushd gcc-arm-none-eabi tar -xf ../gcc-arm-none-eabi.tar.xz popd rm gcc-arm-none-eabi.tar.xz mkdir Heavy -cp -rf tmp/arm-gnu-*/bin ./Heavy -cp -rf tmp/arm-gnu-*/lib ./Heavy -cp -rf tmp/arm-gnu-*/libexec ./Heavy -cp -rf tmp/arm-gnu-*/share ./Heavy -cp -rf tmp/arm-gnu-*/include ./Heavy -cp -rf tmp/arm-gnu-*/arm-none-eabi ./Heavy +cp -rf gcc-arm-none-eabi/arm-gnu-*/bin ./Heavy +cp -rf gcc-arm-none-eabi/arm-gnu-*/lib ./Heavy +cp -rf gcc-arm-none-eabi/arm-gnu-*/libexec ./Heavy +cp -rf gcc-arm-none-eabi/arm-gnu-*/share ./Heavy +cp -rf gcc-arm-none-eabi/arm-gnu-*/include ./Heavy +cp -rf gcc-arm-none-eabi/arm-gnu-*/arm-none-eabi ./Heavy + +if [[ "$OSTYPE" == "linux-gnu"* ]]; then +curl -fSL -A "Mozilla/4.0" -o x86_64-anywhere-linux-gnu-v5.tar.xz https://github.com/theopolis/build-anywhere/releases/download/v5/x86_64-anywhere-linux-gnu-v5.tar.xz + +mkdir build-anywhere +pushd build-anywhere +tar -xf ../x86_64-anywhere-linux-gnu-v5.tar.xz +popd + +rsync -a ./build-anywhere/ ./Heavy/ +fi if [[ "$OSTYPE" == "darwin"* ]]; then #curl -fSL -A "Mozilla/4.0" -o homebrew.zip https://github.com/Homebrew/brew/archive/refs/tags/3.6.13.zip From d951607498ad4e6ba750477c550630698aa89eb9 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 04:20:48 +0100 Subject: [PATCH 13/48] Temporarily removed DPF submodule --- .gitmodules | 3 --- DPF | 1 - 2 files changed, 4 deletions(-) delete mode 160000 DPF diff --git a/.gitmodules b/.gitmodules index f03fa24..9f2072b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,3 @@ [submodule "libDaisy"] path = libDaisy url = https://github.com/electro-smith/libDaisy.git -[submodule "DPF"] - path = dpf - url = https://github.com/DISTRHO/DPF.git diff --git a/DPF b/DPF deleted file mode 160000 index 2241334..0000000 --- a/DPF +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 22413340a6d8ef2ffbf38ce841fb44c448a1a84a From 8a6eb6331238cab87890707c12d2a87eedd4113a Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 04:24:59 +0100 Subject: [PATCH 14/48] Re-added DPF --- .gitmodules | 3 +++ DPF | 1 + build.bat | 2 +- build.sh | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) create mode 160000 DPF diff --git a/.gitmodules b/.gitmodules index 9f2072b..d1f367a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "libDaisy"] path = libDaisy url = https://github.com/electro-smith/libDaisy.git +[submodule "dpf"] + path = DPF + url = https://github.com/DISTRHO/DPF.git diff --git a/DPF b/DPF new file mode 160000 index 0000000..2241334 --- /dev/null +++ b/DPF @@ -0,0 +1 @@ +Subproject commit 22413340a6d8ef2ffbf38ce841fb44c448a1a84a diff --git a/build.bat b/build.bat index 4d5267d..081e28c 100644 --- a/build.bat +++ b/build.bat @@ -28,7 +28,7 @@ echo ../Heavy/bin/make.exe GCC_PATH=../Heavy/bin> build.sh cd .. xcopy /E /H /C /I libDaisy Heavy\usr\lib\libDaisy -xcopy /E /H /C /I dpf Heavy\usr\lib\dpf +xcopy /E /H /C /I DPF Heavy\usr\lib\dpf :: Package heavy using pyinstaller python -m ensurepip diff --git a/build.sh b/build.sh index 8c5147b..bc357ca 100755 --- a/build.sh +++ b/build.sh @@ -121,7 +121,7 @@ make GCC_PATH=../Heavy/bin/ popd cp -rf ./libDaisy ./Heavy/lib/libDaisy -cp -rf ./dpf ./Heavy/lib/dpf +cp -rf ./DPF ./Heavy/lib/dpf # Package Heavy with pyinstaller python3 -m ensurepip From df114f5ccd230534d12509e0c0aaee73ca294ea8 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 04:31:56 +0100 Subject: [PATCH 15/48] Come on, update the file --- build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sh b/build.sh index bc357ca..0058be8 100755 --- a/build.sh +++ b/build.sh @@ -13,7 +13,6 @@ fi curl -fSL -A "Mozilla/4.0" -o gcc-arm-none-eabi.tar.xz $URL - echo "Extracting..." mkdir gcc-arm-none-eabi pushd gcc-arm-none-eabi From 11ced6709e85fbc4eecc49786ce84eaee89fbf02 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 04:33:04 +0100 Subject: [PATCH 16/48] Cleaned up build script --- build.sh | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/build.sh b/build.sh index 0058be8..61dd2f7 100755 --- a/build.sh +++ b/build.sh @@ -39,28 +39,6 @@ popd rsync -a ./build-anywhere/ ./Heavy/ fi -if [[ "$OSTYPE" == "darwin"* ]]; then - #curl -fSL -A "Mozilla/4.0" -o homebrew.zip https://github.com/Homebrew/brew/archive/refs/tags/3.6.13.zip - #unzip homebrew.zip - #mv brew-3.6.13 homebrew - #./homebrew/bin/brew install llvm - #cp -rf ./homebrew/bin/* ./Heavy/bin - #cp -rf ./homebrew/lib/* ./Heavy/lib - #cp -rf ./homebrew/Cellar ./Heavy/Cellar - echo "do nothing for now" -else - -git clone https://github.com/minos-org/minos-static.git -./minos-static/static-get -x gcc -echo $(ls) -cp -rf ./gcc-*/usr/bin/* ./Heavy/bin/ -cp -rf ./gcc-*/usr/lib/* ./Heavy/lib/ -cp -rf ./gcc-*/usr/libexec/* ./Heavy/libexec/ -cp -rf ./gcc-*/usr/share/* ./Heavy/share/ -cp -rf ./gcc-*/usr/include/* ./Heavy/include/ -fi - - # Reduce package size by only including the daisy platform tools mkdir -p "./Heavy/arm-none-eabi/lib/temp/" mv -f "./Heavy/arm-none-eabi/lib/thumb/v7e-m+dp" "./Heavy/arm-none-eabi/lib/temp" From 1a36d7971032da96b2833e26d36534a10e557f09 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 04:39:56 +0100 Subject: [PATCH 17/48] Linux script fix --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 61dd2f7..16b777c 100755 --- a/build.sh +++ b/build.sh @@ -36,7 +36,7 @@ pushd build-anywhere tar -xf ../x86_64-anywhere-linux-gnu-v5.tar.xz popd -rsync -a ./build-anywhere/ ./Heavy/ +rsync -a ./build-anywhere/x86_64-anywhere-linux-gnu/ ./Heavy/ fi # Reduce package size by only including the daisy platform tools From 983e5bb0056fe386736375c8bf9e0e4aff010a4e Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 05:31:36 +0100 Subject: [PATCH 18/48] Add rsync dependency --- .github/workflows/run_script.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 29b341b..1b98a8f 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -108,16 +108,16 @@ jobs: - name: Install Dependencies (dnf) if: ${{ matrix.pacman == 'dnf' }} run: | - dnf install -y git binutils python3 curl gzip xz make dfu-util patchelf libusb-devel which gcc + dnf install -y git binutils python3 curl gzip xz make dfu-util patchelf libusb-devel which gcc rsync - name: Install Dependencies (apt) if: ${{ matrix.pacman == 'apt' }} - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential + run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync - name: Install Dependencies (zypper) if: ${{ matrix.pacman == 'zypper' }} run: | - zypper refresh && zypper install -y git binutils python3 curl tar gzip xz make patchelf which gcc + zypper refresh && zypper install -y git binutils python3 curl tar gzip xz make patchelf which gcc rsync curl -fSL -A "Mozilla/4.0" -o libusb.rpm https://download.opensuse.org/repositories/hardware/15.4/src/libusb-1_0-1.0.26-lp154.73.1.src.rpm rpm -i libusb.rpm curl -fSL -A "Mozilla/4.0" -o dfu_util.rpm https://download.opensuse.org/repositories/hardware/15.4/x86_64/dfu-util-0.11-lp154.4.1.x86_64.rpm @@ -125,7 +125,7 @@ jobs: - name: Install Dependencies (pacman) if: ${{ matrix.pacman == 'pacman' }} - run: pacman -Sy && pacman -S --noconfirm git binutils python3 curl tar gzip xz make dfu-util patchelf libusb base-devel && pacman --noconfirm -Syu + run: pacman -Sy && pacman -S --noconfirm git binutils python3 curl tar gzip xz make dfu-util patchelf libusb base-devel rsync && pacman --noconfirm -Syu - uses: actions/checkout@v3 with: From 8b740e6bade6e374692de52c6eda252e1a45f666 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 05:34:23 +0100 Subject: [PATCH 19/48] Build for single distro only --- .github/workflows/run_script.yml | 53 ++------------------------------ 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 1b98a8f..7c1e4dd 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -70,63 +70,14 @@ jobs: name: ${{ matrix.name }} runs-on: ubuntu-latest container: - image: ${{ matrix.os }} + image: debian options: --privileged volumes: - /sys/fs/cgroup:/sys/fs/cgroup - strategy: - fail-fast: false # show all errors for each platform (vs. cancel jobs on error) - matrix: - include: - - name: Ubuntu-22.04-x64 - os: ubuntu:22.04 - pacman: apt - - name: Ubuntu-20.04-x64 - os: ubuntu:20.04 - pacman: apt - - name: Debian-x64 - os: debian - pacman: apt - - name: Fedora-36-x64 - os: fedora:36 - pacman: dnf - - name: Fedora-35-x64 - os: fedora:35 - pacman: dnf - - name: Mageia-x64 - os: mageia - pacman: dnf - - name: OpenSUSE-Leap-x64 - os: opensuse/leap - pacman: zypper - - name: Arch-x64 - os: archlinux - pacman: pacman - - steps: - - name: Install Dependencies (dnf) - if: ${{ matrix.pacman == 'dnf' }} - run: | - dnf install -y git binutils python3 curl gzip xz make dfu-util patchelf libusb-devel which gcc rsync - - name: Install Dependencies (apt) - if: ${{ matrix.pacman == 'apt' }} run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync - - name: Install Dependencies (zypper) - if: ${{ matrix.pacman == 'zypper' }} - run: | - zypper refresh && zypper install -y git binutils python3 curl tar gzip xz make patchelf which gcc rsync - curl -fSL -A "Mozilla/4.0" -o libusb.rpm https://download.opensuse.org/repositories/hardware/15.4/src/libusb-1_0-1.0.26-lp154.73.1.src.rpm - rpm -i libusb.rpm - curl -fSL -A "Mozilla/4.0" -o dfu_util.rpm https://download.opensuse.org/repositories/hardware/15.4/x86_64/dfu-util-0.11-lp154.4.1.x86_64.rpm - rpm -i dfu_util.rpm - - - name: Install Dependencies (pacman) - if: ${{ matrix.pacman == 'pacman' }} - run: pacman -Sy && pacman -S --noconfirm git binutils python3 curl tar gzip xz make dfu-util patchelf libusb base-devel rsync && pacman --noconfirm -Syu - - uses: actions/checkout@v3 with: submodules: recursive @@ -150,6 +101,6 @@ jobs: with: prerelease: true draft: true - files: Heavy-${{ matrix.name }} + files: Heavy-Linux-x64 From 8ecd866d4e1b55e171a379803788ae717204b47f Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 18:26:47 +0100 Subject: [PATCH 20/48] Fixed build script --- .github/workflows/run_script.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 7c1e4dd..325b005 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -67,7 +67,7 @@ jobs: files: Heavy-Win64 build-linux: - name: ${{ matrix.name }} + name: Linux-x64 runs-on: ubuntu-latest container: image: debian @@ -92,7 +92,7 @@ jobs: - name: Archive Artifacts uses: actions/upload-artifact@v3 with: - name: Heavy-${{ matrix.name }} + name: Heavy-Linux-x64 path: ${{github.workspace}}/Heavy - name: Release Artifacts From d0c5a94881c00cb614c1e93a3a2a5c21abddee18 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 18:30:21 +0100 Subject: [PATCH 21/48] Version bump --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 0d91a54..9e11b32 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.0 +0.3.1 From f4a4c2ad377ab19f4b4f54fe5e432048433fa0f7 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 18:32:56 +0100 Subject: [PATCH 22/48] yml syntax fix --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 325b005..0e2b712 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -74,7 +74,7 @@ jobs: options: --privileged volumes: - /sys/fs/cgroup:/sys/fs/cgroup - + steps: - name: Install Dependencies (apt) run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync From 07bbd260664d5d2b9caea513df91884e09f31110 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 18:35:16 +0100 Subject: [PATCH 23/48] Build on older debian --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 0e2b712..eeffb70 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -70,7 +70,7 @@ jobs: name: Linux-x64 runs-on: ubuntu-latest container: - image: debian + image: debian:oldstable options: --privileged volumes: - /sys/fs/cgroup:/sys/fs/cgroup From 8f9f8a44b3b12b5725fcd6f8c040497493d4446f Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:14:20 +0100 Subject: [PATCH 24/48] Try build-anywhere from source --- build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 16b777c..bfe8ac2 100755 --- a/build.sh +++ b/build.sh @@ -31,9 +31,10 @@ cp -rf gcc-arm-none-eabi/arm-gnu-*/arm-none-eabi ./Heavy if [[ "$OSTYPE" == "linux-gnu"* ]]; then curl -fSL -A "Mozilla/4.0" -o x86_64-anywhere-linux-gnu-v5.tar.xz https://github.com/theopolis/build-anywhere/releases/download/v5/x86_64-anywhere-linux-gnu-v5.tar.xz -mkdir build-anywhere +git clone https://github.com/theopolis/build-anywhere.git pushd build-anywhere -tar -xf ../x86_64-anywhere-linux-gnu-v5.tar.xz +mkdir build +./build-anywhere.sh ./build popd rsync -a ./build-anywhere/x86_64-anywhere-linux-gnu/ ./Heavy/ From 54a7c6d6d49e8024d44d281ee7aeb6e5bf954fe3 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:14:44 +0100 Subject: [PATCH 25/48] rsync fix --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index bfe8ac2..3b589be 100755 --- a/build.sh +++ b/build.sh @@ -37,7 +37,7 @@ mkdir build ./build-anywhere.sh ./build popd -rsync -a ./build-anywhere/x86_64-anywhere-linux-gnu/ ./Heavy/ +rsync -a ./build-anywhere/build/x86_64-anywhere-linux-gnu/ ./Heavy/ fi # Reduce package size by only including the daisy platform tools From 74a0dd2995513a5da059e49ebb9e6a71c4c04701 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:21:41 +0100 Subject: [PATCH 26/48] Add missing dependencies to runner --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index eeffb70..dda82a3 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -76,7 +76,7 @@ jobs: - /sys/fs/cgroup:/sys/fs/cgroup steps: - name: Install Dependencies (apt) - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync + run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync binutils csh sed gawk autoconf automake autotools-dev - uses: actions/checkout@v3 with: From b5f7f1c5f0ae2914a762a0cb175ed1e6b9668347 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:30:29 +0100 Subject: [PATCH 27/48] Need newer debian --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index dda82a3..22bfe3a 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -70,7 +70,7 @@ jobs: name: Linux-x64 runs-on: ubuntu-latest container: - image: debian:oldstable + image: debian:bookworm options: --privileged volumes: - /sys/fs/cgroup:/sys/fs/cgroup From 76621a32f5630254c759d77900e5ed5654baca6b Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:37:50 +0100 Subject: [PATCH 28/48] Added missing deps --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 22bfe3a..9356220 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -76,7 +76,7 @@ jobs: - /sys/fs/cgroup:/sys/fs/cgroup steps: - name: Install Dependencies (apt) - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync binutils csh sed gawk autoconf automake autotools-dev + run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison - uses: actions/checkout@v3 with: From 5cc0870cbcd328ce50342cb37e6421e87ac630bc Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:51:31 +0100 Subject: [PATCH 29/48] Added missing deps --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 9356220..ad182a2 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -76,7 +76,7 @@ jobs: - /sys/fs/cgroup:/sys/fs/cgroup steps: - name: Install Dependencies (apt) - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison + run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison makeinfo - uses: actions/checkout@v3 with: From 96ab8e97199cb1a8bb3d69f2bf56e1e9cc427345 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:55:26 +0100 Subject: [PATCH 30/48] Added missing deps --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index ad182a2..4d15054 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -76,7 +76,7 @@ jobs: - /sys/fs/cgroup:/sys/fs/cgroup steps: - name: Install Dependencies (apt) - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison makeinfo + run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo - uses: actions/checkout@v3 with: From c27bec3bceca94a6ab1a0703ec2398d65da0ac85 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:06:09 +0100 Subject: [PATCH 31/48] Added missing deps --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 4d15054..dfb21c7 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -76,7 +76,7 @@ jobs: - /sys/fs/cgroup:/sys/fs/cgroup steps: - name: Install Dependencies (apt) - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo + run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip - uses: actions/checkout@v3 with: From 8d43603e29d0da937460d80d9bcf654f4bd77d2d Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:21:27 +0100 Subject: [PATCH 32/48] Added missing deps --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index dfb21c7..ca1602c 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -76,7 +76,7 @@ jobs: - /sys/fs/cgroup:/sys/fs/cgroup steps: - name: Install Dependencies (apt) - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip + run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip - uses: actions/checkout@v3 with: From a669a92731830b63d6e51347181b5fb1f153ac68 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:23:13 +0100 Subject: [PATCH 33/48] Make sure all binaries are compatible across distros --- build.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 3b589be..eb70bd6 100755 --- a/build.sh +++ b/build.sh @@ -60,8 +60,16 @@ cp -rf ./resources/heavy-static.a ./Heavy/lib/heavy-static.a cp -rf ./resources/daisy_makefile ./Heavy/etc/daisy_makefile cp -rf ./resources/*.lds ./Heavy/etc/linkers +# install an old version of dfu-util for compatibility +TEMP_DEB="$(mktemp)" +wget -O "$TEMP_DEB" 'http://ftp.de.debian.org/debian/pool/main/d/dfu-util/dfu-util_0.9-1_amd64.deb' +sudo dpkg -i "$TEMP_DEB" +rm -f "$TEMP_DEB" + # copy dfu-util cp $(which dfu-util) ./Heavy/bin/dfu-util +cp $(which dfu-prefix) ./Heavy/bin/dfu-prefix +cp $(which dfu-suffix) ./Heavy/bin/dfu-suffix if [[ "$OSTYPE" == "linux-gnu"* ]]; then cp "$(ldconfig -p | grep libusb-1.0.so | tr ' ' '\n' | grep /)" ./Heavy/lib/libusb-1.0.so @@ -79,10 +87,16 @@ fi curl -fSL -A "Mozilla/4.0" -o make-4.4.tar.gz https://ftp.gnu.org/gnu/make/make-4.4.tar.gz tar -xf make-4.4.tar.gz pushd make-4.4 + +# On Linux, build make in our build-anywhere environment +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + source ../Heavy/scripts/anywhere-setup.sh +fi + chmod +x ./build.sh chmod +x ./configure -# Hack: make sure libintl is not found on macOS, when building on Github actions server! +# Hack: make sure libintl is not found on macOS when building on Github actions server! if [[ "$CLEAR_INTL" == "1" ]]; then rm -f /usr/local/opt/gettext/lib/libintl*.dylib fi @@ -93,6 +107,11 @@ cp make ../Heavy/bin/make popd rm -rf make-4.4 make-4.4.tar.gz +# Exit our build-anywhere environment +if [[ "$OSTYPE" == "linux-gnu"* ]]; then +source ~/.bashrc +fi + # Pre-build libdaisy pushd libDaisy make GCC_PATH=../Heavy/bin/ From d18dfec234f1b475140b82838bcaa8317a005d6d Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:23:59 +0100 Subject: [PATCH 34/48] Downgrade dfu-util --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index ca1602c..2d9afdf 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -76,7 +76,7 @@ jobs: - /sys/fs/cgroup:/sys/fs/cgroup steps: - name: Install Dependencies (apt) - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make dfu-util patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip + run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip - uses: actions/checkout@v3 with: From 553f94f5d4cec3515d3acce59a07030044d21cf9 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:32:33 +0100 Subject: [PATCH 35/48] Added missing deps --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 2d9afdf..f423fa6 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -76,7 +76,7 @@ jobs: - /sys/fs/cgroup:/sys/fs/cgroup steps: - name: Install Dependencies (apt) - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip + run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip libtool-bin - uses: actions/checkout@v3 with: From 11e04a38daa665d206112b4edabe6e96a54fe6be Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:34:49 +0100 Subject: [PATCH 36/48] Added missing deps --- .github/workflows/run_script.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index f423fa6..5650ab2 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -76,7 +76,7 @@ jobs: - /sys/fs/cgroup:/sys/fs/cgroup steps: - name: Install Dependencies (apt) - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip libtool-bin + run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip libtool-bin patch ninja-build libstdc++6 libncurses5-dev - uses: actions/checkout@v3 with: From 1671936d03c5a8692b5321e8c8cf9f84461ca729 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:47:11 +0100 Subject: [PATCH 37/48] Fixed permissions issue --- build.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index eb70bd6..b4e229c 100755 --- a/build.sh +++ b/build.sh @@ -29,15 +29,17 @@ cp -rf gcc-arm-none-eabi/arm-gnu-*/include ./Heavy cp -rf gcc-arm-none-eabi/arm-gnu-*/arm-none-eabi ./Heavy if [[ "$OSTYPE" == "linux-gnu"* ]]; then -curl -fSL -A "Mozilla/4.0" -o x86_64-anywhere-linux-gnu-v5.tar.xz https://github.com/theopolis/build-anywhere/releases/download/v5/x86_64-anywhere-linux-gnu-v5.tar.xz - git clone https://github.com/theopolis/build-anywhere.git pushd build-anywhere + +adduser crosstoolng +chown crosstoolng:crosstoolng ./build +su crosstoolng mkdir build ./build-anywhere.sh ./build popd - rsync -a ./build-anywhere/build/x86_64-anywhere-linux-gnu/ ./Heavy/ +su root fi # Reduce package size by only including the daisy platform tools From 78a6813f95e8195fb610ffc25a71762151dc3a7e Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:54:51 +0100 Subject: [PATCH 38/48] Use Ubuntu instead --- .github/workflows/run_script.yml | 6 +----- build.sh | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 5650ab2..90b0557 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -69,11 +69,7 @@ jobs: build-linux: name: Linux-x64 runs-on: ubuntu-latest - container: - image: debian:bookworm - options: --privileged - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup + steps: - name: Install Dependencies (apt) run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip libtool-bin patch ninja-build libstdc++6 libncurses5-dev diff --git a/build.sh b/build.sh index b4e229c..9bb80e9 100755 --- a/build.sh +++ b/build.sh @@ -65,7 +65,7 @@ cp -rf ./resources/*.lds ./Heavy/etc/linkers # install an old version of dfu-util for compatibility TEMP_DEB="$(mktemp)" wget -O "$TEMP_DEB" 'http://ftp.de.debian.org/debian/pool/main/d/dfu-util/dfu-util_0.9-1_amd64.deb' -sudo dpkg -i "$TEMP_DEB" +dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" # copy dfu-util From f05db0969acf2e03d8ddf9fffc0644e5ed75e3d2 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:56:18 +0100 Subject: [PATCH 39/48] Fixed user problem --- .github/workflows/run_script.yml | 3 +-- build.sh | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 90b0557..33546b7 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -69,10 +69,9 @@ jobs: build-linux: name: Linux-x64 runs-on: ubuntu-latest - steps: - name: Install Dependencies (apt) - run: apt update && apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip libtool-bin patch ninja-build libstdc++6 libncurses5-dev + run: sudo apt update && sudo apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip libtool-bin patch ninja-build libstdc++6 libncurses5-dev - uses: actions/checkout@v3 with: diff --git a/build.sh b/build.sh index 9bb80e9..8dd4edf 100755 --- a/build.sh +++ b/build.sh @@ -31,15 +31,10 @@ cp -rf gcc-arm-none-eabi/arm-gnu-*/arm-none-eabi ./Heavy if [[ "$OSTYPE" == "linux-gnu"* ]]; then git clone https://github.com/theopolis/build-anywhere.git pushd build-anywhere - -adduser crosstoolng -chown crosstoolng:crosstoolng ./build -su crosstoolng mkdir build ./build-anywhere.sh ./build popd rsync -a ./build-anywhere/build/x86_64-anywhere-linux-gnu/ ./Heavy/ -su root fi # Reduce package size by only including the daisy platform tools @@ -65,7 +60,7 @@ cp -rf ./resources/*.lds ./Heavy/etc/linkers # install an old version of dfu-util for compatibility TEMP_DEB="$(mktemp)" wget -O "$TEMP_DEB" 'http://ftp.de.debian.org/debian/pool/main/d/dfu-util/dfu-util_0.9-1_amd64.deb' -dpkg -i "$TEMP_DEB" +sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" # copy dfu-util From 2442d22e6b84847bd6997b5b294b1e01d2419969 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 21:20:04 +0100 Subject: [PATCH 40/48] Better way to exclude clang --- build.sh | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 8dd4edf..9cc9029 100755 --- a/build.sh +++ b/build.sh @@ -29,12 +29,34 @@ cp -rf gcc-arm-none-eabi/arm-gnu-*/include ./Heavy cp -rf gcc-arm-none-eabi/arm-gnu-*/arm-none-eabi ./Heavy if [[ "$OSTYPE" == "linux-gnu"* ]]; then -git clone https://github.com/theopolis/build-anywhere.git + +curl -fSL -A "Mozilla/4.0" -o x86_64-anywhere-linux-gnu-v5.tar.xz https://github.com/theopolis/build-anywhere/releases/download/v5/x86_64-anywhere-linux-gnu-v5.tar.xz + +mkdir build-anywhere pushd build-anywhere -mkdir build -./build-anywhere.sh ./build +tar -xf ../x86_64-anywhere-linux-gnu-v5.tar.xz + +pushd x86_64-anywhere-linux-gnu +# Fix: use gcc instead of clang, for compactness +rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/include/llvm +rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/share/clang +rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/lib/libclang +rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/lib/cmake/llvm +rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/lib/cmake/clang +rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/lib/clang +rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/bin/llvm-cov +rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/bin/llvm-* +rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/bin/clang-* +rm ./x86_64-anywhere-linux-gnu/sysroot/usr/lib/libclang.so.8 +rm ./x86_64-anywhere-linux-gnu/sysroot/usr/lib/libLLVM-8.so +rm ./x86_64-anywhere-linux-gnu/sysroot/usr/bin/git-clang-format +sed -i 's/clang++/g++/' '/home/timothy/HeavyDistributable/build-anywhere/x86_64-anywhere-linux-gnu/scripts/anywhere-setup.sh' +sed -i 's/clang/gcc/' '/home/timothy/HeavyDistributable/build-anywhere/x86_64-anywhere-linux-gnu/scripts/anywhere-setup.sh' + popd -rsync -a ./build-anywhere/build/x86_64-anywhere-linux-gnu/ ./Heavy/ +popd + +rsync -a ./build-anywhere/x86_64-anywhere-linux-gnu/ ./Heavy/ fi # Reduce package size by only including the daisy platform tools From 2b75465e860f8cb8b4119cb53a08546e1db1bb99 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 21:45:11 +0100 Subject: [PATCH 41/48] Fixed make build for Ubuntu --- .github/workflows/run_script.yml | 2 +- build.sh | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/run_script.yml b/.github/workflows/run_script.yml index 33546b7..c26a47e 100644 --- a/.github/workflows/run_script.yml +++ b/.github/workflows/run_script.yml @@ -68,7 +68,7 @@ jobs: build-linux: name: Linux-x64 - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - name: Install Dependencies (apt) run: sudo apt update && sudo apt install -y git binutils python3 python3-pip curl tar gzip xz-utils make patchelf libusb-dev build-essential rsync csh gawk autoconf automake autotools-dev wget m4 flex bison texinfo unzip help2man meson gperf lzip libtool-bin patch ninja-build libstdc++6 libncurses5-dev diff --git a/build.sh b/build.sh index 9cc9029..06acb2b 100755 --- a/build.sh +++ b/build.sh @@ -107,11 +107,6 @@ curl -fSL -A "Mozilla/4.0" -o make-4.4.tar.gz https://ftp.gnu.org/gnu/make/make- tar -xf make-4.4.tar.gz pushd make-4.4 -# On Linux, build make in our build-anywhere environment -if [[ "$OSTYPE" == "linux-gnu"* ]]; then - source ../Heavy/scripts/anywhere-setup.sh -fi - chmod +x ./build.sh chmod +x ./configure @@ -126,11 +121,6 @@ cp make ../Heavy/bin/make popd rm -rf make-4.4 make-4.4.tar.gz -# Exit our build-anywhere environment -if [[ "$OSTYPE" == "linux-gnu"* ]]; then -source ~/.bashrc -fi - # Pre-build libdaisy pushd libDaisy make GCC_PATH=../Heavy/bin/ From edec870eaf9a4d4b0a2d38ebe90e29fcbd7543b8 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 22:05:44 +0100 Subject: [PATCH 42/48] Fixed sed location --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 06acb2b..6d97bdf 100755 --- a/build.sh +++ b/build.sh @@ -50,8 +50,8 @@ rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/bin/clang-* rm ./x86_64-anywhere-linux-gnu/sysroot/usr/lib/libclang.so.8 rm ./x86_64-anywhere-linux-gnu/sysroot/usr/lib/libLLVM-8.so rm ./x86_64-anywhere-linux-gnu/sysroot/usr/bin/git-clang-format -sed -i 's/clang++/g++/' '/home/timothy/HeavyDistributable/build-anywhere/x86_64-anywhere-linux-gnu/scripts/anywhere-setup.sh' -sed -i 's/clang/gcc/' '/home/timothy/HeavyDistributable/build-anywhere/x86_64-anywhere-linux-gnu/scripts/anywhere-setup.sh' +sed -i 's/clang++/g++/' './x86_64-anywhere-linux-gnu/scripts/anywhere-setup.sh' +sed -i 's/clang/gcc/' './x86_64-anywhere-linux-gnu/scripts/anywhere-setup.sh' popd popd From 4814d852dc90cf935a052e34274d24ed7266a75f Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 22:36:41 +0100 Subject: [PATCH 43/48] Linux: fixed gcc setup --- build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 6d97bdf..3faa1fc 100755 --- a/build.sh +++ b/build.sh @@ -50,8 +50,7 @@ rm -rf ./x86_64-anywhere-linux-gnu/sysroot/usr/bin/clang-* rm ./x86_64-anywhere-linux-gnu/sysroot/usr/lib/libclang.so.8 rm ./x86_64-anywhere-linux-gnu/sysroot/usr/lib/libLLVM-8.so rm ./x86_64-anywhere-linux-gnu/sysroot/usr/bin/git-clang-format -sed -i 's/clang++/g++/' './x86_64-anywhere-linux-gnu/scripts/anywhere-setup.sh' -sed -i 's/clang/gcc/' './x86_64-anywhere-linux-gnu/scripts/anywhere-setup.sh' +cp ../../resources/anywhere-setup.sh ./scripts/anywhere-setup.sh popd popd From 21fa2c473b348cee462f232298c6395e5b3eeb2b Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 22:46:32 +0100 Subject: [PATCH 44/48] Add asound --- build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.sh b/build.sh index 3faa1fc..5d885f3 100755 --- a/build.sh +++ b/build.sh @@ -84,6 +84,13 @@ wget -O "$TEMP_DEB" 'http://ftp.de.debian.org/debian/pool/main/d/dfu-util/dfu-ut sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" +TEMP_DEB2="$(mktemp)" +wget -O "$TEMP_DEB2" 'http://ftp.de.debian.org/debian/pool/main/a/alsa-lib/libasound2_1.1.3-5_amd64.deb' +ar x "$TEMP_DEB2" +tar data.tar.gz +cp ./usr/lib/x86_64-linux-gnu/libasound.so.2.0.0 ./Heavy/x86_64-anywhere-linux-gnu/sysroot/lib + + # copy dfu-util cp $(which dfu-util) ./Heavy/bin/dfu-util cp $(which dfu-prefix) ./Heavy/bin/dfu-prefix From 2437bd2e5991a98537da42f9ed55ca2f9ebc6b32 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:04:32 +0100 Subject: [PATCH 45/48] Fixed asound installation: --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 5d885f3..614d8ab 100755 --- a/build.sh +++ b/build.sh @@ -87,7 +87,7 @@ rm -f "$TEMP_DEB" TEMP_DEB2="$(mktemp)" wget -O "$TEMP_DEB2" 'http://ftp.de.debian.org/debian/pool/main/a/alsa-lib/libasound2_1.1.3-5_amd64.deb' ar x "$TEMP_DEB2" -tar data.tar.gz +tar xvf data.tar.xz cp ./usr/lib/x86_64-linux-gnu/libasound.so.2.0.0 ./Heavy/x86_64-anywhere-linux-gnu/sysroot/lib From 3f00e4687f29c6965d3a3a42c7d9082e0b7d7b6d Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:14:02 +0100 Subject: [PATCH 46/48] Fixed asound location --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 614d8ab..b1e4425 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,7 @@ TEMP_DEB2="$(mktemp)" wget -O "$TEMP_DEB2" 'http://ftp.de.debian.org/debian/pool/main/a/alsa-lib/libasound2_1.1.3-5_amd64.deb' ar x "$TEMP_DEB2" tar xvf data.tar.xz -cp ./usr/lib/x86_64-linux-gnu/libasound.so.2.0.0 ./Heavy/x86_64-anywhere-linux-gnu/sysroot/lib +cp ./usr/lib/x86_64-linux-gnu/libasound.so.2.0.0 ./Heavy/x86_64-anywhere-linux-gnu/sysroot/lib/libasound.so # copy dfu-util From b86008e647f5bff158a8636b9cd319bbe5353063 Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:37:01 +0100 Subject: [PATCH 47/48] second try at building make inside build-anywhere --- build.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.sh b/build.sh index b1e4425..53a40e8 100755 --- a/build.sh +++ b/build.sh @@ -116,6 +116,11 @@ pushd make-4.4 chmod +x ./build.sh chmod +x ./configure +# On Linux, enter our build-anywhere environment to build a cross-distro version of make +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + source ../Heavy/scripts/anywhere-setup.sh +fi + # Hack: make sure libintl is not found on macOS when building on Github actions server! if [[ "$CLEAR_INTL" == "1" ]]; then rm -f /usr/local/opt/gettext/lib/libintl*.dylib @@ -127,6 +132,11 @@ cp make ../Heavy/bin/make popd rm -rf make-4.4 make-4.4.tar.gz +# Exit build-anywhere environment +if [[ "$OSTYPE" == "linux-gnu"* ]]; then +source ~/.bashrc +fi + # Pre-build libdaisy pushd libDaisy make GCC_PATH=../Heavy/bin/ From d47028aa92cc790e86f9b6437aa79fe4aa2887fe Mon Sep 17 00:00:00 2001 From: Timothy Schoen <44585538+timothyschoen@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:54:34 +0100 Subject: [PATCH 48/48] undo last commit --- build.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/build.sh b/build.sh index 53a40e8..6eee721 100755 --- a/build.sh +++ b/build.sh @@ -116,10 +116,6 @@ pushd make-4.4 chmod +x ./build.sh chmod +x ./configure -# On Linux, enter our build-anywhere environment to build a cross-distro version of make -if [[ "$OSTYPE" == "linux-gnu"* ]]; then - source ../Heavy/scripts/anywhere-setup.sh -fi # Hack: make sure libintl is not found on macOS when building on Github actions server! if [[ "$CLEAR_INTL" == "1" ]]; then @@ -132,11 +128,6 @@ cp make ../Heavy/bin/make popd rm -rf make-4.4 make-4.4.tar.gz -# Exit build-anywhere environment -if [[ "$OSTYPE" == "linux-gnu"* ]]; then -source ~/.bashrc -fi - # Pre-build libdaisy pushd libDaisy make GCC_PATH=../Heavy/bin/