timower / rM2-stuff

Collection of reMarkable related apps, utilities and libraries.
GNU General Public License v3.0
125 stars 10 forks source link

rM1 support for yaft #3

Closed raisjn closed 3 years ago

raisjn commented 3 years ago

running yaft on rM1:

reMarkable: /etc/terminfo/y/ ~/apps/yaft
rM1 currently untested, please open a github issue if you encounter any issues
Max FD: 6
Max FD: 6
Max FD: 6
Max FD: 6
...
Max FD: 6
^C

and displays:

fb

it is possible the width is incorrect (1404 vs 1408) somewhere which often causes tearing like that

timower commented 3 years ago

Indeed, I hard coded the framebuffer size, should be an easy fix. Thanks for testing!

timower commented 3 years ago

@raisjn Can you try the latest master, should be fixed now.

raisjn commented 3 years ago

crashes on run. might be because of my toolchain - can you supply a binary?

toolchain used: /opt/codex/rm11x/2.5.2/environment-setup-cortexa7hf-neon-remarkable-linux-gnueabi

```bash Reading symbols from ./yaft... run(gdb) run Starting program: /home/root/apps/yaft rM1 currently untested, please open a github issue if you encounter any issues [Detaching after fork from child process 634] Program received signal SIGILL, Illegal instruction. std::_Hashtable, std::allocator >, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::_M_emplace (this=0x7eeb5f30) at /opt/codex/rm11x/2.5.2/sysroots/cortexa7hf-neon-remarkable-linux-gnueabi/usr/include/c++/7.3.0/bits/hashtable.h:1654 1654 /opt/codex/rm11x/2.5.2/sysroots/cortexa7hf-neon-remarkable-linux-gnueabi/usr/include/c++/7.3.0/bits/hashtable.h: No such file or directory. (gdb) bt #0 std::_Hashtable, std::allocator >, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::_M_emplace (this=0x7eeb5f30) at /opt/codex/rm11x/2.5.2/sysroots/cortexa7hf-neon-remarkable-linux-gnueabi/usr/include/c++/7.3.0/bits/hashtable.h:1654 #1 std::_Hashtable, std::allocator >, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::emplace (this=0x7eeb5f30) at /opt/codex/rm11x/2.5.2/sysroots/cortexa7hf-neon-remarkable-linux-gnueabi/usr/include/c++/7.3.0/bits/hashtable.h:736 #2 std::unordered_map, std::equal_to, std::allocator > >::emplace (this=0x7eeb5f30) at /opt/codex/rm11x/2.5.2/sysroots/cortexa7hf-neon-remarkable-linux-gnueabi/usr/include/c++/7.3.0/bits/unordered_map.h:387 #3 rmlib::input::InputManager::open (this=this@entry=0x7eeb5f30, input=..., inputTransform=...) at /home/okay/tonka/src/remarkable/rM2-stuff/libs/rMlib/Input.cpp:34 #4 0x0001cfb8 in Keyboard::init (this=0x7eeb5f18, this@entry=0x7eeb5f10, fb=..., term=...) at /home/okay/tonka/src/remarkable/rM2-stuff/apps/yaft/keyboard.cpp:264 #5 0x00013258 in main (argc=1, argv=0x7efffaa4) at /home/okay/tonka/src/remarkable/rM2-stuff/apps/yaft/main.cpp:234 (gdb) f 3 #3 rmlib::input::InputManager::open (this=this@entry=0x7eeb5f30, input=..., inputTransform=...) at /home/okay/tonka/src/remarkable/rM2-stuff/libs/rMlib/Input.cpp:34 34 /home/okay/tonka/src/remarkable/rM2-stuff/libs/rMlib/Input.cpp: No such file or directory. ```
timower commented 3 years ago

You can download a package with the binary from the CI here: https://github.com/timower/rM2-stuff/actions/runs/559070234

raisjn commented 3 years ago
``` reMarkable: ~/tmp/bin/ ls rocket tilem yaft reMarkable: ~/tmp/bin/ ./yaft rM1 currently untested, please open a github issue if you encounter any issues Segmentation fault (core dumped) reMarkable: ~/tmp/bin/ gdb ./yaft GNU gdb (GDB) 10.1 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-openwrt-linux". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./yaft... (gdb) run Starting program: /home/root/tmp/bin/yaft rM1 currently untested, please open a github issue if you encounter any issues [Detaching after fork from child process 1011] Program received signal SIGSEGV, Segmentation fault. 0x76cefee8 in memcpy () from /lib/libc.so.6 (gdb) bt #0 0x76cefee8 in memcpy () from /lib/libc.so.6 #1 0x0004984c in rmlib::Canvas::drawLine(rmlib::Point, rmlib::Point, int) () #2 0x0001b9f8 in Keyboard::drawKey(Keyboard::Key const&) const () #3 0x0001bde8 in Keyboard::draw() const () #4 0x000132f4 in main () (gdb) (gdb) info args No symbol table info available. (gdb) info f Stack level 1, frame at 0x7eeb58e0: pc = 0x4984c in rmlib::Canvas::drawLine(rmlib::Point, rmlib::Point, int); saved pc = 0x1b9f8 called by frame at 0x7eeb5988, caller of frame at 0x7eeb5890 Arglist at 0x7eeb5890, args: Locals at 0x7eeb5890, Previous frame's sp is 0x7eeb58e0 Saved registers: r4 at 0x7eeb58b4, r5 at 0x7eeb58b8, r6 at 0x7eeb58bc, r7 at 0x7eeb58c0, r8 at 0x7eeb58c4, r9 at 0x7eeb58c8, r10 at 0x7eeb58cc, r11 at 0x7eeb58d0, lr at 0x7eeb58d4 ```
timower commented 3 years ago

The latest master should fix the out of bounds drawing, you can get a build here: https://github.com/timower/rM2-stuff/actions/runs/586675935

raisjn commented 3 years ago

ok, it now runs, but the keys don't show up until i interact with them and i don't see anything displayed in the terminal area. sent images offline.

timower commented 3 years ago

Can you check if 8860dee14a3a29b5dce7fcabc57cc0d2f4b01564 helps? If that doesn't fix it I can create a build that always uses a non-DU waveform to see if that's the cause.

raisjn commented 3 years ago

i tested on artifacts in https://github.com/timower/rM2-stuff/actions/runs/658193967 and still have the same behavior. let's see if this other build works

timower commented 3 years ago

Should be fixed now in https://github.com/timower/rM2-stuff/commit/314a8961c044800e6b99fac00f78a27d248713c1

raisjn commented 3 years ago

great, works - thank you!

raisjn commented 3 years ago

resolved