From 3125d4a47243d2252a1a7800da1f494436ed23ea Mon Sep 17 00:00:00 2001 From: Miguel <81558772+Miguel-hrvs@users.noreply.github.com> Date: Thu, 17 Oct 2024 01:52:40 +0200 Subject: [PATCH] update to latest circle-stdlib (#2697) --- .github/workflows/build.yml | 21 ++++++++++++--------- build/baremetalpi/Dockerfile | 12 ++++++------ build/baremetalpi/Makefile | 1 + src/system/baremetalpi/syscore.h | 2 +- src/system/baremetalpi/utils.cpp | 6 ------ 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a17f62441..d281e2937 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -193,10 +193,10 @@ jobs: # === Raspberry PI 1-4 Bare Metal === rpi-baremetal: runs-on: ubuntu-latest - container: nesbox/baremetalpi-tic80:latest + container: miguelhrvs/baremetalapi-tic80:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 @@ -211,7 +211,7 @@ jobs: cd vendor git clone --recursive https://github.com/smuehlst/circle-stdlib cd circle-stdlib - git checkout fdb3c4a948421d47fddab8042a92f980cba43915 + git checkout db053a32c165c1b22423a47ed6cb5bddc72b51f2 git submodule update --recursive ./configure -r 3 make -j$(nproc) @@ -239,10 +239,11 @@ jobs: cp build/baremetalpi/boot/config.txt vendor/circle-stdlib/libs/circle/boot/config.txt - name: Deploy - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "tic80-rpi-baremetal" path: | + vendor/circle-stdlib/libs/circle/boot/bcm2710-rpi-zero-2-w.dtb vendor/circle-stdlib/libs/circle/boot/config.txt vendor/circle-stdlib/libs/circle/boot/kernel.img vendor/circle-stdlib/libs/circle/boot/bootcode.bin @@ -250,13 +251,13 @@ jobs: vendor/circle-stdlib/libs/circle/boot/fixup.dat vendor/circle-stdlib/libs/circle/boot/LICENCE.broadcom - # === Raspberry PI 4 Bare Metal === + # === Raspberry PI 4-5 Bare Metal === rpi4-baremetal: runs-on: ubuntu-latest - container: nesbox/baremetalpi-tic80:latest + container: miguelhrvs/baremetalapi-tic80:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 @@ -271,7 +272,7 @@ jobs: cd vendor git clone --recursive https://github.com/smuehlst/circle-stdlib cd circle-stdlib - git checkout fdb3c4a948421d47fddab8042a92f980cba43915 + git checkout db053a32c165c1b22423a47ed6cb5bddc72b51f2 git submodule update --recursive ./configure -r 4 make -j$(nproc) @@ -299,12 +300,14 @@ jobs: cp build/baremetalpi/boot/config.txt vendor/circle-stdlib/libs/circle/boot/config.txt - name: Deploy - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "tic80-rpi4-baremetal" path: | vendor/circle-stdlib/libs/circle/boot/bcm2711-rpi-4-b.dtb vendor/circle-stdlib/libs/circle/boot/bcm2711-rpi-cm4.dtb + vendor/circle-stdlib/libs/circle/boot/bcm2711-rpi-400.dtb + vendor/circle-stdlib/libs/circle/boot/bcm2711-rpi-5-b.dtb vendor/circle-stdlib/libs/circle/boot/bootcode.bin vendor/circle-stdlib/libs/circle/boot/config.txt vendor/circle-stdlib/libs/circle/boot/COPYING.linux diff --git a/build/baremetalpi/Dockerfile b/build/baremetalpi/Dockerfile index f4186da55..f5adb6e5b 100644 --- a/build/baremetalpi/Dockerfile +++ b/build/baremetalpi/Dockerfile @@ -1,12 +1,12 @@ -FROM ubuntu:18.04 +FROM ubuntu:24.04 RUN apt-get update RUN apt-get install software-properties-common -y RUN add-apt-repository ppa:git-core/ppa -y RUN apt-get install wget git build-essential -y -RUN wget -q https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.sh -RUN sh cmake-3.13.0-Linux-x86_64.sh --skip-license --prefix=/usr -RUN cd /opt && wget -q https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -RUN cd /opt && tar xjf gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -ENV PATH=/opt/gcc-arm-none-eabi-9-2020-q2-update/bin/:$PATH +RUN wget -q https://cmake.org/files/v3.30/cmake-3.30.3-linux-x86_64.sh +RUN sh cmake-3.30.3-linux-x86_64.sh --skip-license --prefix=/usr +RUN cd /opt && wget -q https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz +RUN cd /opt && tar -xf arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz +ENV PATH=/opt/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi/bin/:$PATH RUN mkdir /src WORKDIR /src diff --git a/build/baremetalpi/Makefile b/build/baremetalpi/Makefile index 6fbb37874..b99a4202e 100644 --- a/build/baremetalpi/Makefile +++ b/build/baremetalpi/Makefile @@ -55,6 +55,7 @@ LIBS := \ $(CIRCLEHOME)/addon/linux/liblinuxemu.a \ $(CIRCLEHOME)/addon/SDCard/libsdcard.a \ $(CIRCLEHOME)/addon/fatfs/libfatfs.a \ + $(CIRCLEHOME)/lib/sound/libsound.a \ $(CIRCLEHOME)/lib/usb/libusb.a \ $(CIRCLEHOME)/lib/input/libinput.a \ $(CIRCLEHOME)/lib/fs/fat/libfatfs.a \ diff --git a/src/system/baremetalpi/syscore.h b/src/system/baremetalpi/syscore.h index b75e1e89f..be48db2ce 100644 --- a/src/system/baremetalpi/syscore.h +++ b/src/system/baremetalpi/syscore.h @@ -22,7 +22,7 @@ #include #include #else - #include + #include #endif #include diff --git a/src/system/baremetalpi/utils.cpp b/src/system/baremetalpi/utils.cpp index 3740ae0b6..77a73bfdd 100644 --- a/src/system/baremetalpi/utils.cpp +++ b/src/system/baremetalpi/utils.cpp @@ -18,12 +18,6 @@ dbg("called chmod\n"); return -1; } -int ftruncate(int fd, off_t length) -{ -dbg("called ftruncate\n"); - return -1; -} - int symlink(const char *target, const char *linkpath) { dbg("called symlink\n");