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

Add 3.5.2 and 3.8.2 support #860

Draft
wants to merge 27 commits into
base: testing
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1130a45
Add 3.8.2 support
Eeems May 24, 2024
7f466bb
Fix lint
Eeems May 24, 2024
baa4a76
Use same package name on os3v5
Eeems May 24, 2024
8ad54e9
Fix build
Eeems May 24, 2024
8318aac
Fix invalid lines in toltecctl
Eeems May 24, 2024
d36f155
Use latest wget
Eeems May 24, 2024
43823c3
Fix installdepends for display
Eeems May 24, 2024
f9090af
Don't delete rm2fb with toltec-deletions
Eeems May 24, 2024
8e6cca3
Merge branch 'testing' into 3.5.2
Eeems May 24, 2024
c3d18c0
Fix rm2fb-client dependency
Eeems May 24, 2024
385e92d
Add non-versioned librm2fb so symlinks
Eeems May 24, 2024
68e3155
Fix up xochitl starting with timower's rm2fb
Eeems May 24, 2024
cb9da24
Merge branch 'testing' into 3.5.2
Eeems May 24, 2024
6f984f6
Add socket
Eeems May 24, 2024
ddbe2a4
Fix build and remove socket
Eeems May 24, 2024
94d6cdf
Fix up starting rm2fb-server and making swtfb.01
Eeems May 25, 2024
abfe205
Set RM2FB_ACTIVE as it's not being set by timower's rm2fb
Eeems May 25, 2024
e430f9e
Merge branch 'testing' into 3.5.2
Eeems May 29, 2024
8ff4784
Update rm2fb-timower to 0.1.2
Eeems May 29, 2024
c257b2d
No longer shim RM2FB_ACTIVE
Eeems May 29, 2024
cec901b
Switch back to swtfb.01
Eeems May 29, 2024
43da695
No longer symlink swtfb.01
Eeems May 29, 2024
10e22e2
Work around invalid symlinks in post processing
Eeems May 30, 2024
9f6e527
Merge branch 'testing' into 3.5.2
Eeems May 30, 2024
e7e30e8
Merge branch 'testing' into 3.5.2
Eeems Jun 3, 2024
e947e98
Merge branch 'testing' into 3.5.2
Eeems Sep 12, 2024
50de93d
Fix rm2fb-original build
Eeems Sep 12, 2024
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
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ RECIPES_CLEAN=$(foreach app, $(RECIPES), $(app)-clean)

ifeq ($(RUNNER_DEBUG), 1)
FLAGS+= --verbose
else
ifeq ($(VERBOSE), 1)
FLAGS+= --verbose
endif
endif

define USAGE
Expand Down
9 changes: 6 additions & 3 deletions docs/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ Name | Meaning
`rmallos2` | Packages which work on all reMarkable devices without modification, but only on the 2.x series of operating system.
`rm1os2` | Packages requiring reMarkable 1-specific resources or compilation flags, but only on the 2.x series of operating system.
`rm2os2` | Packages requiring reMarkable 2-specific resources or compilation flags, but only on the 2.x series of operating system.
`rmallos3` | Packages which work on all reMarkable devices without modification, but only on the 3.x series of operating system.
`rm1os3` | Packages requiring reMarkable 1-specific resources or compilation flags, but only on the 3.x series of operating system.
`rm2os3` | Packages requiring reMarkable 2-specific resources or compilation flags, but only on the 3.x series of operating system.
`rmallos3` | Packages which work on all reMarkable devices without modification, but only on 3.0 to 3.3.2 versions of the operating system.
`rm1os3` | Packages requiring reMarkable 1-specific resources or compilation flags, but only on 3.0 to 3.3.2 versions of the operating system.
`rm2os3` | Packages requiring reMarkable 2-specific resources or compilation flags, but only on 3.0 to 3.3.2 versions of the operating system.
`rmallos3v5` | Packages which work on all reMarkable devices without modification, but only on 3.5.2 or newer operating system versions.
`rm1os3v5` | Packages requiring reMarkable 1-specific resources or compilation flags, but only on 3.5.2 or newer operating system versions.
`rm2os3v5` | Packages requiring reMarkable 2-specific resources or compilation flags, but only on 3.5.2 or newer operating system versions.

For example, use `archs=(rm1)` for a package that only works on reMarkable 1, or `archs=(rm1 rm2)` for a package that works both on reMarkable 1 and reMarkable 2 but needs different dependencies or compilation flags for each of those.

Expand Down
4 changes: 4 additions & 0 deletions package/Compatibility
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ rm1=3.0.4.1305
rm1=3.2.2.1581
rm1=3.2.3.1595
rm1=3.3.2.1666
rm1=3.5.2.1807
rm1=3.8.2.1965

rm2=2.6.1.71
rm2=2.6.2.75
Expand Down Expand Up @@ -68,3 +70,5 @@ rm2=3.0.4.1305
rm2=3.2.2.1581
rm2=3.2.3.1595
rm2=3.3.2.1666
rm2=3.5.2.1807
rm2=3.8.2.1965
129 changes: 10 additions & 119 deletions package/display/package
Original file line number Diff line number Diff line change
@@ -1,126 +1,17 @@
#!/usr/bin/env bash
# Copyright (c) 2021 The Toltec Contributors
# Copyright (c) 2024 The Toltec Contributors
# SPDX-License-Identifier: MIT

archs=(rm1 rm2)
pkgnames=(display rm2fb-client)
timestamp=2023-08-27T02:39:10Z
maintainer="raisjn <of.raisjn@gmail.com>"
pkgnames=(display)
pkgdesc="Metapackage for allowing applications to display to the screen"
timestamp=2024-05-24T06:12:38Z
maintainer="Eeems <eeems@eeems.email>"
license=MIT
url="https://github.com/ddvk/remarkable2-framebuffer"
pkgver=1:0.0.33-3
_release="${pkgver%-*}"
_release="v${_release#*:}"
_libver=1.0.1
url="https://toltec-dev.org"
pkgver=2:0.0.1-1
section="devel"
installdepends=(rm2fb-server rm2fb-client)

image=qt:v2.3
source=(
"https://github.com/ddvk/remarkable2-framebuffer/archive/$_release.zip"
rm2fb.service
rm2fb-client
rm2fb-preload.conf
rm2fb-preload.env
)
sha256sums=(
dd57f1ba31f08a28d801989e9a705bd93cc637cd8f4dffa160412119e69329ff
SKIP
SKIP
SKIP
SKIP
)

build() {
if [[ $arch = rm1 ]]; then
# Create an empty client library for rM1
pushd src/client
echo | "${CROSS_COMPILE}gcc" \
-fPIC -fvisibility=hidden -shared \
-o "librm2fb_client.so.$_libver" \
-xc -
popd
else
qmake
make
fi
}

display() {
pkgdesc="Interface to the reMarkable framebuffer"
installdepends=(xochitl "rm2fb-client=$pkgver")
conflicts=(rm2fb)
replaces=(rm2fb)

package() {
if [[ $arch = rm2 ]]; then
libname="librm2fb_server.so.$_libver"
install -D -m 644 -t "$pkgdir"/opt/lib "$srcdir"/src/server/"$libname"
ln -s "$libname" "$pkgdir"/opt/lib/"${libname%.*.*}"
ln -s "$libname" "$pkgdir"/opt/lib/"${libname%.*}"
install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/rm2fb.service
fi
}

configure() {
if [[ $arch = rm2 ]]; then
systemctl daemon-reload
if systemctl enable rm2fb --now; then
# Restart xochitl if it's running
if is-active xochitl; then
# Reset the crash count so we don't trigger remarkable-fail
echo "0" > /tmp/crashnum
systemctl restart xochitl
fi
else
disable-unit rm2fb.service
echo "Failed to start rm2fb. Keeping it disabled for now."
echo "Please check the logs and open an issue:"
echo " https://github.com/toltec-dev/toltec/issues/new"
exit 1
fi
fi
}

preremove() {
if [[ $arch = rm2 ]]; then
disable-unit rm2fb.service
echo -n "make sure "
if ! is-enabled xochitl.service; then
echo "to re-enable xochitl with 'systemctl enable xochitl --now'"
echo -n "and "
fi
echo "to disable / uninstall any launchers like draft, oxide or remux before"
echo "rebooting your tablet to complete the uninstallation"
fi
}
}

rm2fb-client() {
pkgdesc="Shim to make reMarkable 1 apps work on reMarkable 2"
installdepends=("display=$pkgver")
conflicts=(rm2fb)
replaces=(rm2fb)

package() {
libname="librm2fb_client.so"
libnamever="$libname.$_libver"
install -D -m 644 -t "$pkgdir"/opt/lib "$srcdir"/src/client/"$libnamever"
install -d "$pkgdir"/usr/lib
ln -s /opt/lib/"$libnamever" "$pkgdir"/usr/lib/"$libnamever"
ln -s /opt/lib/"$libnamever" "$pkgdir"/opt/lib/"$libname"

for dest in opt/lib usr/lib; do
ln -s "$libnamever" "$pkgdir/$dest/${libnamever%.*.*}"
ln -s "$libnamever" "$pkgdir/$dest/${libnamever%.*}"
done

install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/rm2fb-client

if [[ $arch = rm2 ]]; then
install -D -m 644 -t "$pkgdir"/opt/etc/xochitl.env.d "$srcdir"/rm2fb-preload.env
install -D -m 644 -t "$pkgdir"/etc/systemd/system/draft.service.d "$srcdir"/rm2fb-preload.conf
install -D -m 644 -t "$pkgdir"/etc/systemd/system/remux.service.d "$srcdir"/rm2fb-preload.conf
install -D -m 644 -t "$pkgdir"/etc/systemd/system/tarnish.service.d "$srcdir"/rm2fb-preload.conf
fi
}
package() {
true
}
139 changes: 139 additions & 0 deletions package/rm2fb-original/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
#!/usr/bin/env bash
# Copyright (c) 2024 The Toltec Contributors
# SPDX-License-Identifier: MIT

archs=(rm1os2 rm2os2 rm1os3 rm2os3)
pkgnames=(rm2fb-server rm2fb-client)
timestamp=2023-08-27T02:39:10Z
maintainer="raisjn <of.raisjn@gmail.com>"
license=MIT
url="https://github.com/ddvk/remarkable2-framebuffer"
pkgver=1:0.0.33-2
_release="${pkgver%-*}"
_release="v${_release#*:}"
_libver=1.0.1
section="devel"

image=qt:v2.3
source=(
"https://github.com/ddvk/remarkable2-framebuffer/archive/$_release.zip"
rm2fb.service
rm2fb-client
rm2fb-preload.conf
rm2fb-preload.env
)
sha256sums=(
dd57f1ba31f08a28d801989e9a705bd93cc637cd8f4dffa160412119e69329ff
SKIP
SKIP
SKIP
SKIP
)

build() {
case "$arch" in
rm1os2 | rm1os3)
# Create an empty client library for rM1
pushd src/client
echo | "${CROSS_COMPILE}gcc" \
-fPIC -fvisibility=hidden -shared \
-o "librm2fb_client.so.$_libver" \
-xc -
popd
;;
*)
qmake
make
;;
esac
}

rm2fb-server() {
pkgdesc="Interface to the reMarkable framebuffer"
installdepends=(xochitl "rm2fb-client=$pkgver")
conflicts=(rm2fb)
replaces=(rm2fb)

package() {
case "$arch" in
rm2os2 | rm2os3)
libname="librm2fb_server.so.$_libver"
install -D -m 644 -t "$pkgdir"/opt/lib "$srcdir"/src/server/"$libname"
ln -s "$libname" "$pkgdir"/opt/lib/"${libname%.*.*.*}"
ln -s "$libname" "$pkgdir"/opt/lib/"${libname%.*.*}"
ln -s "$libname" "$pkgdir"/opt/lib/"${libname%.*}"
install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/rm2fb.service
;;
esac
}

configure() {
case "$arch" in
rm2os2 | rm2os3)
systemctl daemon-reload
if systemctl enable rm2fb --now; then
# Restart xochitl if it's running
if is-active xochitl; then
# Reset the crash count so we don't trigger remarkable-fail
echo "0" > /tmp/crashnum
systemctl restart xochitl
fi
else
disable-unit rm2fb.service
echo "Failed to start rm2fb. Keeping it disabled for now."
echo "Please check the logs and open an issue:"
echo " https://github.com/toltec-dev/toltec/issues/new"
exit 1
fi
;;
esac
}

preremove() {
case "$arch" in
rm2os2 | rm2os3)
disable-unit rm2fb.service
echo -n "make sure "
if ! is-enabled xochitl.service; then
echo "to re-enable xochitl with 'systemctl enable xochitl --now'"
echo -n "and "
fi
echo "to disable / uninstall any launchers like draft, oxide or remux before"
echo "rebooting your tablet to complete the uninstallation"
;;
esac
}
}

rm2fb-client() {
pkgdesc="Shim to make reMarkable 1 apps work on reMarkable 2"
installdepends=("rm2fb-server=$pkgver")
conflicts=(rm2fb)
replaces=(rm2fb)

package() {
set -x
libname="librm2fb_client.so"
libnamever="$libname.$_libver"
install -D -m 644 -t "$pkgdir"/opt/lib "$srcdir"/src/client/"$libnamever"
install -d "$pkgdir"/usr/lib
ln -s /opt/lib/"$libnamever" "$pkgdir"/usr/lib/"$libnamever"

for dest in opt/lib usr/lib; do
ln -s "$libnamever" "$pkgdir/$dest/${libnamever%.*.*.*}"
ln -s "$libnamever" "$pkgdir/$dest/${libnamever%.*.*}"
ln -s "$libnamever" "$pkgdir/$dest/${libnamever%.*}"
done

install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/rm2fb-client

case "$arch" in
rm2os2 | rm2os3)
install -D -m 644 -t "$pkgdir"/opt/etc/xochitl.env.d "$srcdir"/rm2fb-preload.env
install -D -m 644 -t "$pkgdir"/etc/systemd/system/draft.service.d "$srcdir"/rm2fb-preload.conf
install -D -m 644 -t "$pkgdir"/etc/systemd/system/remux.service.d "$srcdir"/rm2fb-preload.conf
install -D -m 644 -t "$pkgdir"/etc/systemd/system/tarnish.service.d "$srcdir"/rm2fb-preload.conf
;;
esac
}
}
File renamed without changes.
9 changes: 9 additions & 0 deletions package/rm2fb-original/rm2fb-preload.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2021 The Toltec Contributors
# SPDX-License-Identifier: MIT
# Please do not modify files shipped by Toltec, or they risk being
# overwritten with updates. Instead create your own files in this directory.
if [[ -f /dev/shm/swtfb.01 ]]; then
export LD_PRELOAD=/opt/lib/librm2fb_client.so.1
else
echo "rm2fb server is not running: starting without rm2fb client"
fi
File renamed without changes.
Loading
Loading