-
Notifications
You must be signed in to change notification settings - Fork 61
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
feature: prevent installation of rM2 incompatible apps on rM2 #129
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
So, how do we want to handle this? Separate repository for rm2? |
I propose having two kinda meta packages called Any package that does not support both devices can then just depend on those. In a case of wrong installation, the dependency would either fail in the preinst script (which should also be a fairly descriptive error to the user) or just conflict with the existing other To check the model, we could use either
to check the device is the correct one. |
I like that solution. |
I created a branch/pr to work on that solution: #136 |
Thanks for your suggestion @LinusCDE! I see two drawbacks with your proposed approach:
IMO, those limitations would be solved with a separate-repositories approach. |
@matteodelabre , those are some good ideas.
That is certainly a drawback. But as it seems now, we are trying to try to make the new libs support both devices anyway. I think that binaries that won't work without recompilation will be rare enough that they can solve that on their own to e.g. have a shell-script as binary that runs the correct binary or similar. @Eeems how would this be done on QT? Can one easily swap the QT plugin for the rM1 to a potential one for the rM2? Even if this weren't possible, I'm sure others will peruse an approach them to have a single plugin work on both devices.
Most users will probably use either https://toltec-dev.org/stable/ or nao to look up packages. The website already having some pretty nice sorting and categorizing going on, we could surely add some badges to signify incompatibilities or just let users filter out incompatible ones. Something similar could be done for nao. All in all, I think having multiple repositories is not worth the maintenance hassle for supporting the recompile approach of maybe one in 20 packages. Most will either use a library. For the 1/20 package I already proposed a solution above. |
I see your point. I propose we wait on this until we have at least a few apps supporting both devices, so that we can make an informed choice about the best suited strategy. |
Agreed, @matteodelabre 👍 |
the rm2fb shim works with qt apps: oxide, calculator, draft have been tested. i would like some ideas and help for how to package / move forward with this shim so everyone can use it easily. I can make an issue with open questions to discuss |
This PR improves Toltec’s support for reMarkable 2 in a few ways: * Prevents users from installing packages that are known to be incompatible with their device (fixes #129). * Automatically installs and sets up the rm2fb server when an app that uses the framebuffer is installed. * Stops relying on LD_PRELOAD to load the rm2fb shim into apps that need it. Instead, change their dynamic dependencies to include the shim directly. Thanks to this change, we no longer need to set LD_PRELOAD globally (fixes #248) and users can launch apps that need the shim without prefixing them with `rm2fb-client`. Tooling changes (more details in the updated docs/package.md): * Added the `archs` field for declaring which device(s) a recipe is compatible with. Supported values are `rmall` (for device-independent packages), `rm1` (for reMarkable 1) and `rm2` (for reMarkable 2). When multiple arch values are set for a recipe, the recipe is generated once per entry, which allows specializing builds for specific devices. * Replaced the `depends` field with an `installdepends` field used for declaring install-time dependencies. Previously, dependencies declared in the `depends` field were fulfilled both at build time and at install time, with no way of declaring install-time-only dependencies. * Added a `replaces` field that sets the `Replaces` value in the generated package. Used for migrating users from the `rm2fb` package to the `display` and `rm2fb-shim` packages (see below). * Changed [the web package listing](https://toltec-dev.org/dev/split-architectures) to include download links for each available architecture of each package. * Packages are now stored in subdirectories named after their architecture. This is because opkg does not like seeing packages for architectures other than the ones it is configured to accept in opkg.conf. With this layout change, we can make opkg happy by only adding subdirectories for enabled architectures. Install changes: * The bootstrap script now adds the `rmall` architecture (and folder) on all installs, and the `rm1` or `rm2` architecture (and folder) depending on the type of the device it’s executed on. It will fail if the device is not of a recognized type (based on the value of `/sys/devices/soc0/machine`). * Running the new bootstrap script on an existing install will upgrade the configuration to use the new architecture subdirectories layout. rm2fb changes: * The package is split into two packages, `display` (which provides the rm2fb server on rM2 and is an empty package on rM1) and `rm2fb-shim` (which provides the client shim on rM2 and a mock shim on rM1). * The `rm2fb-server` command is removed (the most common use-case being that the display server is started from the systemd unit). * The `rm2fb-client` command is renamed to `rm2fb-shim`, with the expectation that users will not need it anymore, unless for development purposes. Apps marked as reMarkable-1-only: * appmarkable (LinusCDE/appmarkable#2) * rmservewacominput (because it depends on appmarkable) * vnsee (matteodelabre/vnsee#15) * whiteboard-hypercard (fenollp/reMarkable-tools#12) Apps marked as reMarkable-2-only: * rm2-suspend-fix Apps updated to include the rM2 shim: * calculator * chessmarkable * draft * fingerterm * keywriter * koreader (through setting LD_PRELOAD in the existing wrapper script) * oxide * plato * recrossable * remarkable-splash * retris * rmkit * xochitl (through a new wrapper script at /opt/bin/xochitl) * zshelf Test plan (on rM1 and rM2): * Starting from a clean stable or testing install of Toltec, download the updated bootstrap script and run: ```console $ toltec_branch=dev/split-architectures bash bootstrap ``` * This should update the `/opt/etc/opkg.conf` configuration file to enable the `rmall` architecture and, depending on the device you’re running this on, the `rm1` or the `rm2` architecture. * It should also replace the `src/gz toltec` line with two source lines, `src/gz toltec-rmall` and `src/gz toltec-rm1` or `src/gz toltec-rm2`, pointing to subfolders of `https://toltec-dev.org/dev/split-architectures`. * Run `opkg upgrade`. Most installed packages should get upgraded, and if you had installed any packages that use the screen, the `display` and `rm2fb-shim` packages should get installed. If you previously installed the `rm2fb` package, it should get removed automatically. * Try installing `rm2-suspend-fix` on a reMarkable 1, or `vnsee` on a reMarkable 2: both operations should fail. * Test all updated packages to make sure they can properly draw to the screen (both on rM1 and rM2) and that you can interact with them through the touchscreen and the pen, when applicable. * In particular, make sure that apps work properly when launched from draft, oxide or remux.
This PR improves Toltec’s support for reMarkable 2 in a few ways: * Prevents users from installing packages that are known to be incompatible with their device (fixes #129). * Automatically installs and sets up the rm2fb server when an app that uses the framebuffer is installed. * Stops relying on LD_PRELOAD to load the rm2fb shim into apps that need it. Instead, change their dynamic dependencies to include the shim directly. Thanks to this change, we no longer need to set LD_PRELOAD globally (fixes #248) and users can launch apps that need the shim without prefixing them with `rm2fb-client`. Tooling changes (more details in the updated docs/package.md): * Added the `archs` field for declaring which device(s) a recipe is compatible with. Supported values are `rmall` (for device-independent packages), `rm1` (for reMarkable 1) and `rm2` (for reMarkable 2). When multiple arch values are set for a recipe, the recipe is generated once per entry, which allows specializing builds for specific devices. * Replaced the `depends` field with an `installdepends` field used for declaring install-time dependencies. Previously, dependencies declared in the `depends` field were fulfilled both at build time and at install time, with no way of declaring install-time-only dependencies. * Added a `replaces` field that sets the `Replaces` value in the generated package. Used for migrating users from the `rm2fb` package to the `display` and `rm2fb-shim` packages (see below). * Changed [the web package listing](https://toltec-dev.org/dev/split-architectures) to include download links for each available architecture of each package. * Packages are now stored in subdirectories named after their architecture. This is because opkg does not like seeing packages for architectures other than the ones it is configured to accept in opkg.conf. With this layout change, we can make opkg happy by only adding subdirectories for enabled architectures. Install changes: * The bootstrap script now adds the `rmall` architecture (and folder) on all installs, and the `rm1` or `rm2` architecture (and folder) depending on the type of the device it’s executed on. It will fail if the device is not of a recognized type (based on the value of `/sys/devices/soc0/machine`). * Running the new bootstrap script on an existing install will upgrade the configuration to use the new architecture subdirectories layout. rm2fb changes: * The package is split into two packages, `display` (which provides the rm2fb server on rM2 and is an empty package on rM1) and `rm2fb-shim` (which provides the client shim on rM2 and a mock shim on rM1). * The `rm2fb-server` command is removed (the most common use-case being that the display server is started from the systemd unit). * The `rm2fb-client` command is renamed to `rm2fb-shim`, with the expectation that users will not need it anymore, unless for development purposes. Apps marked as reMarkable-1-only: * appmarkable (LinusCDE/appmarkable#2) * rmservewacominput (because it depends on appmarkable) * vnsee (matteodelabre/vnsee#15) * whiteboard-hypercard (fenollp/reMarkable-tools#12) Apps marked as reMarkable-2-only: * rm2-suspend-fix Apps updated to include the rM2 shim: * calculator * chessmarkable * draft * fingerterm * keywriter * koreader (through setting LD_PRELOAD in the existing wrapper script) * oxide * plato * recrossable * remarkable-splash * retris * rmkit * xochitl (through a new wrapper script at /opt/bin/xochitl) * zshelf Test plan (on rM1 and rM2): * Starting from a clean stable or testing install of Toltec, download the updated bootstrap script and run: ```console $ toltec_branch=dev/split-architectures bash bootstrap ``` * This should update the `/opt/etc/opkg.conf` configuration file to enable the `rmall` architecture and, depending on the device you’re running this on, the `rm1` or the `rm2` architecture. * It should also replace the `src/gz toltec` line with two source lines, `src/gz toltec-rmall` and `src/gz toltec-rm1` or `src/gz toltec-rm2`, pointing to subfolders of `https://toltec-dev.org/dev/split-architectures`. * Run `opkg upgrade`. Most installed packages should get upgraded, and if you had installed any packages that use the screen, the `display` and `rm2fb-shim` packages should get installed. If you previously installed the `rm2fb` package, it should get removed automatically. * Try installing `rm2-suspend-fix` on a reMarkable 1, or `vnsee` on a reMarkable 2: both operations should fail. * Test all updated packages to make sure they can properly draw to the screen (both on rM1 and rM2) and that you can interact with them through the touchscreen and the pen, when applicable. * In particular, make sure that apps work properly when launched from draft, oxide or remux.
This PR improves Toltec’s support for reMarkable 2 in a few ways: * Prevents users from installing packages that are known to be incompatible with their device (fixes #129). * Automatically installs and sets up the rm2fb server when an app that uses the framebuffer is installed. * Stops relying on LD_PRELOAD to load the rm2fb shim into apps that need it. Instead, change their dynamic dependencies to include the shim directly. Thanks to this change, we no longer need to set LD_PRELOAD globally (fixes #248) and users can launch apps that need the shim without prefixing them with `rm2fb-client`. Tooling changes (more details in the updated docs/package.md): * Added the `archs` field for declaring which device(s) a recipe is compatible with. Supported values are `rmall` (for device-independent packages), `rm1` (for reMarkable 1) and `rm2` (for reMarkable 2). When multiple arch values are set for a recipe, the recipe is generated once per entry, which allows specializing builds for specific devices. * Replaced the `depends` field with an `installdepends` field used for declaring install-time dependencies. Previously, dependencies declared in the `depends` field were fulfilled both at build time and at install time, with no way of declaring install-time-only dependencies. * Added a `replaces` field that sets the `Replaces` value in the generated package. Used for migrating users from the `rm2fb` package to the `display` and `rm2fb-shim` packages (see below). * Changed [the web package listing](https://toltec-dev.org/dev/split-architectures) to include download links for each available architecture of each package. * Packages are now stored in subdirectories named after their architecture. This is because opkg does not like seeing packages for architectures other than the ones it is configured to accept in opkg.conf. With this layout change, we can make opkg happy by only adding subdirectories for enabled architectures. Install changes: * The bootstrap script now adds the `rmall` architecture (and folder) on all installs, and the `rm1` or `rm2` architecture (and folder) depending on the type of the device it’s executed on. It will fail if the device is not of a recognized type (based on the value of `/sys/devices/soc0/machine`). * Running the new bootstrap script on an existing install will upgrade the configuration to use the new architecture subdirectories layout. rm2fb changes: * The package is split into two packages, `display` (which provides the rm2fb server on rM2 and is an empty package on rM1) and `rm2fb-shim` (which provides the client shim on rM2 and a mock shim on rM1). * The `rm2fb-server` command is removed (the most common use-case being that the display server is started from the systemd unit). * The `rm2fb-client` command is renamed to `rm2fb-shim`, with the expectation that users will not need it anymore, unless for development purposes. Apps marked as reMarkable-1-only: * appmarkable (LinusCDE/appmarkable#2) * rmservewacominput (because it depends on appmarkable) * vnsee (matteodelabre/vnsee#15) * whiteboard-hypercard (fenollp/reMarkable-tools#12) Apps marked as reMarkable-2-only: * rm2-suspend-fix Apps updated to include the rM2 shim: * calculator * chessmarkable * draft * fingerterm * keywriter * koreader (through setting LD_PRELOAD in the existing wrapper script) * oxide * plato * recrossable * remarkable-splash * retris * rmkit * xochitl (through a new wrapper script at /opt/bin/xochitl) * zshelf Test plan (on rM1 and rM2): * Starting from a clean stable or testing install of Toltec, download the updated bootstrap script and run: ```console $ toltec_branch=dev/split-architectures bash bootstrap ``` * This should update the `/opt/etc/opkg.conf` configuration file to enable the `rmall` architecture and, depending on the device you’re running this on, the `rm1` or the `rm2` architecture. * It should also replace the `src/gz toltec` line with two source lines, `src/gz toltec-rmall` and `src/gz toltec-rm1` or `src/gz toltec-rm2`, pointing to subfolders of `https://toltec-dev.org/dev/split-architectures`. * Run `opkg upgrade`. Most installed packages should get upgraded, and if you had installed any packages that use the screen, the `display` and `rm2fb-shim` packages should get installed. If you previously installed the `rm2fb` package, it should get removed automatically. * Try installing `rm2-suspend-fix` on a reMarkable 1, or `vnsee` on a reMarkable 2: both operations should fail. * Test all updated packages to make sure they can properly draw to the screen (both on rM1 and rM2) and that you can interact with them through the touchscreen and the pen, when applicable. * In particular, make sure that apps work properly when launched from draft, oxide or remux.
This PR improves Toltec’s support for reMarkable 2 in a few ways: * Prevents users from installing packages that are known to be incompatible with their device (fixes #129). * Automatically installs and sets up the rm2fb server when an app that uses the framebuffer is installed. * Stops relying on LD_PRELOAD to load the rm2fb shim into apps that need it. Instead, change their dynamic dependencies to include the shim directly. Thanks to this change, we no longer need to set LD_PRELOAD globally (fixes #248) and users can launch apps that need the shim without prefixing them with `rm2fb-client`. Tooling changes (more details in the updated docs/package.md): * Added the `archs` field for declaring which device(s) a recipe is compatible with. Supported values are `rmall` (for device-independent packages), `rm1` (for reMarkable 1) and `rm2` (for reMarkable 2). When multiple arch values are set for a recipe, the recipe is generated once per entry, which allows specializing builds for specific devices. * Replaced the `depends` field with an `installdepends` field used for declaring install-time dependencies. Previously, dependencies declared in the `depends` field were fulfilled both at build time and at install time, with no way of declaring install-time-only dependencies. * Added a `replaces` field that sets the `Replaces` value in the generated package. Used for migrating users from the `rm2fb` package to the `display` and `rm2fb-shim` packages (see below). * Changed [the web package listing](https://toltec-dev.org/dev/split-architectures) to include download links for each available architecture of each package. * Packages are now stored in subdirectories named after their architecture. This is because opkg does not like seeing packages for architectures other than the ones it is configured to accept in opkg.conf. With this layout change, we can make opkg happy by only adding subdirectories for enabled architectures. Install changes: * The bootstrap script now adds the `rmall` architecture (and folder) on all installs, and the `rm1` or `rm2` architecture (and folder) depending on the type of the device it’s executed on. It will fail if the device is not of a recognized type (based on the value of `/sys/devices/soc0/machine`). * Running the new bootstrap script on an existing install will upgrade the configuration to use the new architecture subdirectories layout. rm2fb changes: * The package is split into two packages, `display` (which provides the rm2fb server on rM2 and is an empty package on rM1) and `rm2fb-shim` (which provides the client shim on rM2 and a mock shim on rM1). * The `rm2fb-server` command is removed (the most common use-case being that the display server is started from the systemd unit). * The `rm2fb-client` command is renamed to `rm2fb-shim`, with the expectation that users will not need it anymore, unless for development purposes. Apps marked as reMarkable-1-only: * appmarkable (LinusCDE/appmarkable#2) * rmservewacominput (because it depends on appmarkable) * vnsee (matteodelabre/vnsee#15) * whiteboard-hypercard (fenollp/reMarkable-tools#12) Apps marked as reMarkable-2-only: * rm2-suspend-fix Apps updated to include the rM2 shim: * calculator * chessmarkable * draft * fingerterm * keywriter * koreader (through setting LD_PRELOAD in the existing wrapper script) * oxide * plato * recrossable * remarkable-splash * retris * rmkit * xochitl (through a new wrapper script at /opt/bin/xochitl) * zshelf Test plan (on rM1 and rM2): * Starting from a clean stable or testing install of Toltec, download the updated bootstrap script and run: ```console $ toltec_branch=dev/split-architectures bash bootstrap ``` * This should update the `/opt/etc/opkg.conf` configuration file to enable the `rmall` architecture and, depending on the device you’re running this on, the `rm1` or the `rm2` architecture. * It should also replace the `src/gz toltec` line with two source lines, `src/gz toltec-rmall` and `src/gz toltec-rm1` or `src/gz toltec-rm2`, pointing to subfolders of `https://toltec-dev.org/dev/split-architectures`. * Run `opkg upgrade`. Most installed packages should get upgraded, and if you had installed any packages that use the screen, the `display` and `rm2fb-shim` packages should get installed. If you previously installed the `rm2fb` package, it should get removed automatically. * Try installing `rm2-suspend-fix` on a reMarkable 1, or `vnsee` on a reMarkable 2: both operations should fail. * Test all updated packages to make sure they can properly draw to the screen (both on rM1 and rM2) and that you can interact with them through the touchscreen and the pen, when applicable. * In particular, make sure that apps work properly when launched from draft, oxide or remux (some issues remain with oxide and remux).
This PR improves Toltec’s support for reMarkable 2 in a few ways: * Prevents users from installing packages that are known to be incompatible with their device (fixes #129). * Automatically installs and sets up the rm2fb server when an app that uses the framebuffer is installed. * Stops relying on LD_PRELOAD to load the rm2fb shim into apps that need it. Instead, change their dynamic dependencies to include the shim directly. Thanks to this change, we no longer need to set LD_PRELOAD globally (fixes #248) and users can launch apps that need the shim without prefixing them with `rm2fb-client`. It replaces the previous PR #136. #### Tooling changes More details in the updated [docs/package.md](https://github.com/toltec-dev/toltec/blob/tooling/split-architectures/docs/package.md). * Added the `archs` field for declaring which device(s) a recipe is compatible with. Supported values are `rmall` (for device-independent packages), `rm1` (for reMarkable 1) and `rm2` (for reMarkable 2). When multiple arch values are set for a recipe, the recipe is generated once per entry, which allows specializing builds for specific devices. * Replaced the `depends` field with an `installdepends` field used for declaring install-time dependencies. Previously, dependencies declared in the `depends` field were fulfilled both at build time and at install time, with no way of declaring install-time-only dependencies. * Added a `replaces` field that sets the `Replaces` value in the generated package. Used for migrating users from the `rm2fb` package to the `display` and `rm2fb-client` packages (see below). * Added a `patch_rm2fb` flag for recipes to instruct the build system to patch all the generated binaries that use the rM1 framebuffer with the rm2fb client shim. * Changed [the web package listing](https://toltec-dev.org/dev/split-architectures) to include download links for each available architecture of each package. * Packages are now stored in subdirectories named after their architecture. This is because opkg does not like seeing packages for architectures other than the ones it is configured to accept in opkg.conf. With this layout change, we can make opkg happy by only adding subdirectories for enabled architectures. #### Install changes * The bootstrap script now adds the `rmall` architecture (and folder) on all installs, and the `rm1` or `rm2` architecture (and folder) depending on the type of the device it’s executed on. It will fail if the device is not of a recognized type (based on the value of `/sys/devices/soc0/machine`). * Running the new bootstrap script on an existing install will upgrade the configuration to use the new architecture subdirectories layout. #### rm2fb changes * The package is split into two packages, `display` (which provides the rm2fb server on rM2 and is an empty package on rM1) and `rm2fb-client` (which provides the client shim on rM2 and a mock shim on rM1). * The `rm2fb-server` command is removed (the most common use-case being that the display server is started from the systemd unit). #### Apps changes Apps marked as reMarkable-1-only: * vnsee (matteodelabre/vnsee#15) * whiteboard-hypercard (fenollp/reMarkable-tools#12) Apps marked as reMarkable-2-only: * rm2-suspend-fix Apps updated to include the rM2 shim: * appmarkable * calculator * chessmarkable * draft * fingerterm * keywriter * koreader (through setting LD_PRELOAD in the existing wrapper script) * oxide * plato * recrossable * remarkable-splash * retris * rmkit * wikipedia * xochitl (through a new wrapper script at /opt/bin/xochitl) * zshelf #### Test plan On rM1 and rM2 (system version: 2.5). * Starting from a clean install of Toltec stable or testing, download the updated bootstrap script and run: ```console $ toltec_branch=dev/split-architectures bash bootstrap ``` * This should update the `/opt/etc/opkg.conf` configuration file to enable the `rmall` architecture and, depending on the device you’re running this on, the `rm1` or the `rm2` architecture. * It should also replace the `src/gz toltec` line with two source lines, `src/gz toltec-rmall` and `src/gz toltec-rm1` or `src/gz toltec-rm2`, pointing to subfolders of `https://toltec-dev.org/dev/split-architectures`. * Run `opkg upgrade`. Most installed packages should get upgraded, and if you had installed any packages that use the screen, the `display` and `rm2fb-client` packages should get installed. If you previously installed the `rm2fb` package, it should get removed automatically. * Try installing `rm2-suspend-fix` on a reMarkable 1, or `vnsee` on a reMarkable 2: both operations should fail. * Test all updated packages to make sure they can properly draw to the screen (both on rM1 and rM2) and that you can interact with them through the touchscreen and the pen, when applicable. It is no longer needed to prefix each app invocation with `rm2fb-client` on the command line on reMarkable 2. * In particular, make sure that apps work properly when launched from draft, oxide or remux (things to check: launching, pausing, killing apps, switching back and forth from xochitl). #### Rollout plan When this PR hits testing and stable, existing users will no longer receive updates until they run the new bootstrap script on their existing installs. They will also probably see an error when they do `opkg update`. Figuring out how to automatic transition users is left to a future PR. Co-authored-by: okay <okay@arkose>
Users who try to install a rM2-only app on rM1 or vice versa will now see an error message (see #310). |
This PR improves Toltec’s support for reMarkable 2 in a few ways: * Prevents users from installing packages that are known to be incompatible with their device (fixes toltec-dev#129). * Automatically installs and sets up the rm2fb server when an app that uses the framebuffer is installed. * Stops relying on LD_PRELOAD to load the rm2fb shim into apps that need it. Instead, change their dynamic dependencies to include the shim directly. Thanks to this change, we no longer need to set LD_PRELOAD globally (fixes toltec-dev#248) and users can launch apps that need the shim without prefixing them with `rm2fb-client`. It replaces the previous PR toltec-dev#136. #### Tooling changes More details in the updated [docs/package.md](https://github.com/toltec-dev/toltec/blob/tooling/split-architectures/docs/package.md). * Added the `archs` field for declaring which device(s) a recipe is compatible with. Supported values are `rmall` (for device-independent packages), `rm1` (for reMarkable 1) and `rm2` (for reMarkable 2). When multiple arch values are set for a recipe, the recipe is generated once per entry, which allows specializing builds for specific devices. * Replaced the `depends` field with an `installdepends` field used for declaring install-time dependencies. Previously, dependencies declared in the `depends` field were fulfilled both at build time and at install time, with no way of declaring install-time-only dependencies. * Added a `replaces` field that sets the `Replaces` value in the generated package. Used for migrating users from the `rm2fb` package to the `display` and `rm2fb-client` packages (see below). * Added a `patch_rm2fb` flag for recipes to instruct the build system to patch all the generated binaries that use the rM1 framebuffer with the rm2fb client shim. * Changed [the web package listing](https://toltec-dev.org/dev/split-architectures) to include download links for each available architecture of each package. * Packages are now stored in subdirectories named after their architecture. This is because opkg does not like seeing packages for architectures other than the ones it is configured to accept in opkg.conf. With this layout change, we can make opkg happy by only adding subdirectories for enabled architectures. #### Install changes * The bootstrap script now adds the `rmall` architecture (and folder) on all installs, and the `rm1` or `rm2` architecture (and folder) depending on the type of the device it’s executed on. It will fail if the device is not of a recognized type (based on the value of `/sys/devices/soc0/machine`). * Running the new bootstrap script on an existing install will upgrade the configuration to use the new architecture subdirectories layout. #### rm2fb changes * The package is split into two packages, `display` (which provides the rm2fb server on rM2 and is an empty package on rM1) and `rm2fb-client` (which provides the client shim on rM2 and a mock shim on rM1). * The `rm2fb-server` command is removed (the most common use-case being that the display server is started from the systemd unit). #### Apps changes Apps marked as reMarkable-1-only: * vnsee (matteodelabre/vnsee#15) * whiteboard-hypercard (fenollp/reMarkable-tools#12) Apps marked as reMarkable-2-only: * rm2-suspend-fix Apps updated to include the rM2 shim: * appmarkable * calculator * chessmarkable * draft * fingerterm * keywriter * koreader (through setting LD_PRELOAD in the existing wrapper script) * oxide * plato * recrossable * remarkable-splash * retris * rmkit * wikipedia * xochitl (through a new wrapper script at /opt/bin/xochitl) * zshelf #### Test plan On rM1 and rM2 (system version: 2.5). * Starting from a clean install of Toltec stable or testing, download the updated bootstrap script and run: ```console $ toltec_branch=dev/split-architectures bash bootstrap ``` * This should update the `/opt/etc/opkg.conf` configuration file to enable the `rmall` architecture and, depending on the device you’re running this on, the `rm1` or the `rm2` architecture. * It should also replace the `src/gz toltec` line with two source lines, `src/gz toltec-rmall` and `src/gz toltec-rm1` or `src/gz toltec-rm2`, pointing to subfolders of `https://toltec-dev.org/dev/split-architectures`. * Run `opkg upgrade`. Most installed packages should get upgraded, and if you had installed any packages that use the screen, the `display` and `rm2fb-client` packages should get installed. If you previously installed the `rm2fb` package, it should get removed automatically. * Try installing `rm2-suspend-fix` on a reMarkable 1, or `vnsee` on a reMarkable 2: both operations should fail. * Test all updated packages to make sure they can properly draw to the screen (both on rM1 and rM2) and that you can interact with them through the touchscreen and the pen, when applicable. It is no longer needed to prefix each app invocation with `rm2fb-client` on the command line on reMarkable 2. * In particular, make sure that apps work properly when launched from draft, oxide or remux (things to check: launching, pausing, killing apps, switching back and forth from xochitl). #### Rollout plan When this PR hits testing and stable, existing users will no longer receive updates until they run the new bootstrap script on their existing installs. They will also probably see an error when they do `opkg update`. Figuring out how to automatic transition users is left to a future PR. Co-authored-by: okay <okay@arkose>
This PR improves Toltec’s support for reMarkable 2 in a few ways: * Prevents users from installing packages that are known to be incompatible with their device (fixes #129). * Automatically installs and sets up the rm2fb server when an app that uses the framebuffer is installed. * Stops relying on LD_PRELOAD to load the rm2fb shim into apps that need it. Instead, change their dynamic dependencies to include the shim directly. Thanks to this change, we no longer need to set LD_PRELOAD globally (fixes #248) and users can launch apps that need the shim without prefixing them with `rm2fb-client`. It replaces the previous PR #136. #### Tooling changes More details in the updated [docs/package.md](https://github.com/toltec-dev/toltec/blob/tooling/split-architectures/docs/package.md). * Added the `archs` field for declaring which device(s) a recipe is compatible with. Supported values are `rmall` (for device-independent packages), `rm1` (for reMarkable 1) and `rm2` (for reMarkable 2). When multiple arch values are set for a recipe, the recipe is generated once per entry, which allows specializing builds for specific devices. * Replaced the `depends` field with an `installdepends` field used for declaring install-time dependencies. Previously, dependencies declared in the `depends` field were fulfilled both at build time and at install time, with no way of declaring install-time-only dependencies. * Added a `replaces` field that sets the `Replaces` value in the generated package. Used for migrating users from the `rm2fb` package to the `display` and `rm2fb-client` packages (see below). * Added a `patch_rm2fb` flag for recipes to instruct the build system to patch all the generated binaries that use the rM1 framebuffer with the rm2fb client shim. * Changed [the web package listing](https://toltec-dev.org/dev/split-architectures) to include download links for each available architecture of each package. * Packages are now stored in subdirectories named after their architecture. This is because opkg does not like seeing packages for architectures other than the ones it is configured to accept in opkg.conf. With this layout change, we can make opkg happy by only adding subdirectories for enabled architectures. #### Install changes * The bootstrap script now adds the `rmall` architecture (and folder) on all installs, and the `rm1` or `rm2` architecture (and folder) depending on the type of the device it’s executed on. It will fail if the device is not of a recognized type (based on the value of `/sys/devices/soc0/machine`). * Running the new bootstrap script on an existing install will upgrade the configuration to use the new architecture subdirectories layout. #### rm2fb changes * The package is split into two packages, `display` (which provides the rm2fb server on rM2 and is an empty package on rM1) and `rm2fb-client` (which provides the client shim on rM2 and a mock shim on rM1). * The `rm2fb-server` command is removed (the most common use-case being that the display server is started from the systemd unit). #### Apps changes Apps marked as reMarkable-1-only: * vnsee (matteodelabre/vnsee#15) * whiteboard-hypercard (fenollp/reMarkable-tools#12) Apps marked as reMarkable-2-only: * rm2-suspend-fix Apps updated to include the rM2 shim: * appmarkable * calculator * chessmarkable * draft * fingerterm * keywriter * koreader (through setting LD_PRELOAD in the existing wrapper script) * oxide * plato * recrossable * remarkable-splash * retris * rmkit * wikipedia * xochitl (through a new wrapper script at /opt/bin/xochitl) * zshelf #### Test plan On rM1 and rM2 (system version: 2.5). * Starting from a clean install of Toltec stable or testing, download the updated bootstrap script and run: ```console $ toltec_branch=dev/split-architectures bash bootstrap ``` * This should update the `/opt/etc/opkg.conf` configuration file to enable the `rmall` architecture and, depending on the device you’re running this on, the `rm1` or the `rm2` architecture. * It should also replace the `src/gz toltec` line with two source lines, `src/gz toltec-rmall` and `src/gz toltec-rm1` or `src/gz toltec-rm2`, pointing to subfolders of `https://toltec-dev.org/dev/split-architectures`. * Run `opkg upgrade`. Most installed packages should get upgraded, and if you had installed any packages that use the screen, the `display` and `rm2fb-client` packages should get installed. If you previously installed the `rm2fb` package, it should get removed automatically. * Try installing `rm2-suspend-fix` on a reMarkable 1, or `vnsee` on a reMarkable 2: both operations should fail. * Test all updated packages to make sure they can properly draw to the screen (both on rM1 and rM2) and that you can interact with them through the touchscreen and the pen, when applicable. It is no longer needed to prefix each app invocation with `rm2fb-client` on the command line on reMarkable 2. * In particular, make sure that apps work properly when launched from draft, oxide or remux (things to check: launching, pausing, killing apps, switching back and forth from xochitl). #### Rollout plan When this PR hits testing and stable, existing users will no longer receive updates until they run the new bootstrap script on their existing installs. They will also probably see an error when they do `opkg update`. Figuring out how to automatic transition users is left to a future PR. Co-authored-by: okay <okay@arkose>
remux package should not recommend people disable xochitl, this caused someone on discord to break their rM2it should be possible to prevent packages from being installed on rM2 if they are incompatible
The text was updated successfully, but these errors were encountered: