Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jp fix extruder label #122

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 8 additions & 64 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,73 +15,25 @@ jobs:
matrix:
include:
- arch: mipsel-buildroot-linux-musl-
theme: zbolt
small: false
rotate: true
calibrate: false
asset: guppyscreen-zbolt

- arch: mipsel-buildroot-linux-musl-
theme: material
small: false
rotate: true
calibrate: false
asset: guppyscreen

- arch: mipsel-buildroot-linux-musl-
theme: material
small: true
rotate: false
calibrate: true
asset: guppyscreen-smallscreen

- arch: aarch64-none-linux-gnu-
theme: material
small: false
rotate: false
calibrate: true
asset: guppyscreen-arm

runs-on: ubuntu-22.04
container:
image: ballaswag/guppydev:latest
image: pellcorp/guppydev:latest
options: --user 1001

env:
CROSS_COMPILE: ${{ matrix.arch }}
CC: ${{ matrix.arch }}
CXX: ${{ matrix.arch }}
GUPPY_THEME: ${{ matrix.theme }}


steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
name: set guppyscreen nightly version
run: |
echo "GUPPYSCREEN_VERSION=nightly-${{ github.sha }}" >> $GITHUB_ENV

- if: startsWith(github.ref, 'refs/tags/')
name: set guppyscreen nightly version
run: |
echo "GUPPYSCREEN_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV

- if: matrix.small
name: export screen size
run: |
echo "GUPPY_SMALL_SCREEN=${{ matrix.small }}" >> $GITHUB_ENV

- if: matrix.rotate
name: export screen rotate
run: |
echo "GUPPY_ROTATE=${{ matrix.rotate }}" >> $GITHUB_ENV

- if: matrix.calibrate
name: export touch calibrate
- name: set guppyscreen nightly version
run: |
echo "EVDEV_CALIBRATE=${{ matrix.calibrate }}" >> $GITHUB_ENV
echo "GUPPYSCREEN_VERSION=${{ github.sha }}" >> $GITHUB_ENV

- name: patch lv_drivers
run: |
Expand Down Expand Up @@ -116,26 +68,18 @@ jobs:
- name: package release
run: |
chmod +x ./release.sh
./release.sh ${{ matrix.asset }}
./release.sh

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset }}
path: ./${{ matrix.asset }}.tar.gz
name: guppyscreen
path: ./guppyscreen.tar.gz

- name: nightly release
uses: softprops/action-gh-release@v2
with:
prerelease: true
name: nightly
tag_name: nightly
files: ${{ matrix.asset }}.tar.gz
fail_on_unmatched_files: true

- name: stable release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.asset }}.tar.gz
generate_release_notes: true
files: guppyscreen.tar.gz
fail_on_unmatched_files: true
67 changes: 0 additions & 67 deletions .github/workflows/guppydroid.yml

This file was deleted.

61 changes: 14 additions & 47 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,17 @@ jobs:
matrix:
include:
- arch: mipsel-buildroot-linux-musl-
theme: zbolt
small: false
rotate: true
calibrate: false
asset: guppyscreen-zbolt

- arch: mipsel-buildroot-linux-musl-
theme: material
small: false
rotate: true
calibrate: false
asset: guppyscreen

- arch: mipsel-buildroot-linux-musl-
theme: material
small: true
rotate: false
calibrate: true
asset: guppyscreen-smallscreen

- arch: aarch64-none-linux-gnu-
theme: material
small: false
rotate: false
calibrate: true
asset: guppyscreen-arm

runs-on: ubuntu-22.04
container:
image: ballaswag/guppydev:latest
image: pellcorp/guppydev:latest
options: --user 1001

env:
CROSS_COMPILE: ${{ matrix.arch }}
CC: ${{ matrix.arch }}
CXX: ${{ matrix.arch }}
GUPPY_THEME: ${{ matrix.theme }}


steps:
- uses: actions/checkout@v3
with:
Expand All @@ -57,21 +30,6 @@ jobs:
run: |
echo "GUPPYSCREEN_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV

- if: matrix.small
name: export screen size
run: |
echo "GUPPY_SMALL_SCREEN=${{ matrix.small }}" >> $GITHUB_ENV

- if: matrix.rotate
name: export screen rotate
run: |
echo "GUPPY_ROTATE=${{ matrix.rotate }}" >> $GITHUB_ENV

- if: matrix.calibrate
name: export touch calibrate
run: |
echo "EVDEV_CALIBRATE=${{ matrix.calibrate }}" >> $GITHUB_ENV

- name: patch lv_drivers
run: |
git apply ../patches/0001-lv_driver_fb_ioctls.patch
Expand Down Expand Up @@ -105,9 +63,18 @@ jobs:
- name: package release
run: |
chmod +x ./release.sh
./release.sh ${{ matrix.asset }}
./release.sh

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset }}
path: ./${{ matrix.asset }}.tar.gz
name: guppyscreen
path: ./guppyscreen.tar.gz

- name: branch release
uses: softprops/action-gh-release@v2
with:
prerelease: true
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
files: guppyscreen.tar.gz
fail_on_unmatched_files: true
39 changes: 11 additions & 28 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,54 +18,37 @@ The Guppy Screen uses features (filesystem) from C++17, so a gcc/g++ version (7.
### Environment Variables
`CROSS_COMPILE` - The prefix to the toolchain architecture, e.g. `mips-linux-gnu-`
`SIMULATION` - Define it to build with SDL for running on your local machine.
`ZBOLT` - Define it to use the Z-Bolt icon set. By default the build uses the Material Design Icons.
`GUPPYSCREEN_VERSION` - Version string displayed in the System Panel in the UI.

### Build Environment

#### Ubuntu and Debian
For Ubuntu/Debian install build essentials and libsdl2-dev packages.

`sudo apt-get install -y build-essential cmake libsdl2-dev`

#### Arch and Derivatives

For Arch and derivatives install 'base-devel' and 'sdl2' packages.

`sudo pacman -S base-devel cmake sdl2`

#### Mipsel Tool chain

To build guppyscreen for Mipsel (Ingenic X2000E) - specific to the K1 SoC, you will need the mips-gcc720 tool chain.

1. Download the toolchain [here](https://github.com/ballaswag/k1-discovery/releases/download/1.0.0/mips-gcc720-glibc229.tar.gz)
2. `tar xf mips-gcc720-glibc229.tar.gz && export PATH=<path-to-mips-toolchain/bin>:$PATH`

### The Code

Clone the guppyscreen repo (and submodules) and apply a couple of patches locally.

1. `git clone --recursive https://github.com/ballaswag/guppyscreen && cd guppyscreen`
2. `(cd lv_drivers/ && git apply ../patches/0001-lv_driver_fb_ioctls.patch)`
3. `(cd spdlog/ && git apply ../patches/0002-spdlog_fmt_initializer_list.patch)`
4. `(cd lvgl/ && git apply ../patches/0003-lvgl-dpi-text-scale.patch)`

### Mipsel (Ingenic X2000E) - specific to the K1 SoC
Building for the K1/Max

1. `export CROSS_COMPILE=mips-linux-gnu-`
2. `make clean && make -j$(nproc) build`

After an initial `make build`, you can make changes to src guppy files and then use `make` to compile the files that need compiling.
1. `./build.sh clean`
2. `./build.sh wpaclean`
3. `./build.sh wpaclient`
4. `./build.sh libhvclean`
5 `./build.sh wpaclient`
6. `./build.sh libhv.a`
7. `./build.sh libspdlog.a`
8. `./build.sh`

The executable is ./build/bin/guppyscreen

### x86_64 (Intel/AMD)
Building and running Guppy Screen on your local machine speeds up development. Changes can be tested on the local machine before rebuilding for the other architectures.

1. `unset CROSS_COMPILE`
2. `make clean && make -j$(nproc) build`

After an initial `make build`, you can make changes to src guppy files and then use `make` to compile the files that need compiling.
1. `SIMULATION=true ./build.sh clean`
2. `SIMULATION=true ./build.sh`

The executable is ./build/bin/guppyscreen

Expand Down
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu:22.04

RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y --no-install-recommends wget build-essential cmake git zip ca-certificates && update-ca-certificates && \
apt-get clean all && \
apt-get -y autoremove

RUN mkdir /toolchains && \
wget https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs/mips32el--musl--stable-2024.02-1.tar.bz2 -O /tmp/mips32el--musl--stable-2024.02-1.tar.bz2 && \
tar -jxf /tmp/mips32el--musl--stable-2024.02-1.tar.bz2 -C /toolchains && \
rm /tmp/mips32el--musl--stable-2024.02-1.tar.bz2
ENV PATH=/toolchains/mips32el--musl--stable-2024.02-1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
WORKDIR /toolchains
CMD ["/bin/bash"]
18 changes: 2 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,12 @@ CSRCS += $(wildcard $(LVGL_DIR)/assets/*.c)
CSRCS += $(wildcard $(LVGL_DIR)/lv_touch_calibration/*.c)

ASSET_DIR = material
ifdef GUPPY_SMALL_SCREEN
ASSET_DIR = material_46
DEFINES += -D GUPPY_SMALL_SCREEN
endif


ifdef GUPPY_ROTATE
DEFINES += -D GUPPY_ROTATE
endif


ifeq ($(GUPPY_THEME),zbolt)
CSRCS += $(wildcard $(LVGL_DIR)/assets/zbolt/*.c)
DEFINES += -D ZBOLT
else
CSRCS += $(wildcard $(LVGL_DIR)/assets/$(ASSET_DIR)/*.c)
endif

ifdef GUPPYSCREEN_VERSION
DEFINES += -D GUPPYSCREEN_VERSION="\"${GUPPYSCREEN_VERSION}\""
else
DEFINES += -D GUPPYSCREEN_VERSION="\"dev-snapshot\""
endif

OBJEXT ?= .o
Expand Down
Loading
Loading