Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions docs/recipe-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ Name | Meaning
`rmall` | Packages which work on all reMarkable devices without modification.
`rm1` | Packages requiring reMarkable 1-specific resources or compilation flags.
`rm2` | Packages requiring reMarkable 2-specific resources or compilation flags.
`rmpp` | Packages requiring reMarkable Paper Pro-specific resources or compilation flags.

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.
DO NOT USE `rmall` for packages with any binaries, since aarch32 binaries will not work on aarch64 devices and vice versa.

In the following sections, you can add a suffix to any field to specify that its value only applies to a given architecture.
For string fields, the arch-specific value will replace the unsuffixed value; for array fields, it will be appended to the unsuffixed value.
Expand Down Expand Up @@ -230,6 +232,8 @@ Should match the upstream name as closely as possible.
The `build()` function runs in the context of a Docker container with the chosen `image`.
This function has access to all the metadata variables declared above, plus the `$arch` variable which contains the name of the architecture the recipe is currently being built for.
The working directory is `$srcdir`, which is populated with all the sources declared in `sources`.
Do note that if you are going to build aarch64 binaries, you must switch to suitable environment variables by sourcing `/opt/x-tools/switch-aarch64.sh`.
If you need to go back to aarch32, you can source `/opt/x-tools/switch-arm.sh`.

### Package Section

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[project]
name = "toltecmk"
version = "0.3.4"
version = "0.4.0"
authors = [
{ name="Mattéo Delabre", email="[email protected]" },
{ name="Eeems", email="[email protected]" },
{ name="Noa Himesaka", email="[email protected]" },
]
description = "Build system used for the Toltec community repository"
requires-python = ">=3.11"
Expand Down
12 changes: 7 additions & 5 deletions toltec/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,15 @@ def _build(self, recipe: Recipe, src_dir: str) -> None:
)

if host_deps:
opkg_conf_path = "$SYSROOT/etc/opkg/opkg.conf"
opkg_conf_path = "$SYSROOT_AARCH64/etc/opkg/opkg.conf" if recipe.arch == "rmpp" else "$SYSROOT/etc/opkg/opkg.conf"
opkg_exec = "opkg-aarch64" if recipe.arch == "rmpp" else "opkg"

pre_script.extend(
(
'echo -n "dest root /',
"arch all 100",
"arch armv7-3.2 160",
"src/gz entware https://bin.entware.net/armv7sf-k3.2",
f"arch {'aarch64-3.10' if recipe.arch == 'rmpp' else 'armv7-3.2'} 160",
f"src/gz entware https://bin.entware.net/{'aarch64-k3.10' if recipe.arch == 'rmpp' else 'armv7sf-k3.2'}",
"arch rmall 200",
"src/gz toltec-rmall file:///repo/rmall",
f'" > "{opkg_conf_path}"',
Expand All @@ -340,8 +342,8 @@ def _build(self, recipe: Recipe, src_dir: str) -> None:

pre_script.extend(
(
"opkg update --verbosity=0",
"opkg install --verbosity=0 --no-install-recommends"
f"{opkg_exec} update --verbosity=0",
f"{opkg_exec} install --verbosity=0 --no-install-recommends"
" -- " + " ".join(host_deps),
)
)
Expand Down