Skip to content

Commit

Permalink
server: Change instructions to use xochitl & set process name to rm2f…
Browse files Browse the repository at this point in the history
…b-server

See #56 and toltec-dev/toltec#325 for context.
  • Loading branch information
matteodelabre committed Apr 8, 2021
1 parent aa70ce3 commit f1614c8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build `src/server/librm2fb_server.so.1.0.1`. Copy it to your
remarkable and run:

```
LD_PRELOAD=/path/to/librm2fb_server.so.1.0.1 /usr/bin/remarkable-shutdown
LD_PRELOAD=/path/to/librm2fb_server.so.1.0.1 /usr/bin/xochitl
```

### Framebuffer Client Shim
Expand Down
2 changes: 1 addition & 1 deletion scripts/run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
systemctl stop xochitl
LD_PRELOAD=${DIR}/librm2fb_server.so.1.0.0 `which remarkable-shutdown` &
LD_PRELOAD=${DIR}/librm2fb_server.so.1.0.0 `which xochitl` &
pid=$!
sleep 2
LD_PRELOAD=${DIR}/librm2fb_client.so.1.0.0 $*
Expand Down
4 changes: 4 additions & 0 deletions src/server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ int __libc_start_main(int (*_main)(int, char **, char **), int argc,
swtfb::SDK_BIN = argv[0];
fprintf(stderr, "BIN FILE: %s\n", argv[0]);

size_t argv0_len = strlen(argv[0]);
strncpy(argv[0], "rm2fb-server", argv0_len);
argv[0][argv0_len] = 0;

return func_main(server_main, argc, argv, init, fini, rtld_fini, stack_end);
};
};
2 changes: 1 addition & 1 deletion src/server/test.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
make && scp librm2fb.so.1.0.0 rm: && ssh -tt rm "LD_PRELOAD=/home/root/librm2fb.so.1.0.0 ./remarkable-shutdown"
make && scp librm2fb.so.1.0.0 rm: && ssh -tt rm "LD_PRELOAD=/home/root/librm2fb.so.1.0.0 /usr/bin/xochitl"
2 changes: 1 addition & 1 deletion src/shared/swtfb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using namespace std;

namespace swtfb {

string SDK_BIN = "/usr/bin/remarkable-shutdown";
string SDK_BIN = "/usr/bin/xochitl";
// todo: make it singleton
class SwtFB {
const int maxWidth = 1404;
Expand Down

0 comments on commit f1614c8

Please sign in to comment.