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

rM1 support for yaft #3

Closed
raisjn opened this issue Feb 9, 2021 · 12 comments
Closed

rM1 support for yaft #3

raisjn opened this issue Feb 9, 2021 · 12 comments
Assignees

Comments

@raisjn
Copy link

raisjn commented Feb 9, 2021

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
Copy link
Owner

timower commented Feb 9, 2021

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

@timower timower self-assigned this Feb 9, 2021
@timower
Copy link
Owner

timower commented Feb 11, 2021

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

@raisjn
Copy link
Author

raisjn commented Feb 13, 2021

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

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<int, std::pair<int const, rmlib::input::InputManager::InputDevice>, std::allocator<std::pair<int const, rmlib::input::InputManager::InputDevice> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_emplace<int&, rmlib::input::InputManager::InputDevice> (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<int, std::pair<int const, rmlib::input::InputManager::InputDevice>, std::allocator<std::pair<int const, rmlib::input::InputManager::InputDevice> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_emplace<int&, rmlib::input::InputManager::InputDevice> (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<int, std::pair<int const, rmlib::input::InputManager::InputDevice>, std::allocator<std::pair<int const, rmlib::input::InputManager::InputDevice> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::emplace<int&, rmlib::input::InputManager::InputDevice> (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<int, rmlib::input::InputManager::InputDevice, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, rmlib::input::InputManager::InputDevice> > >::emplace<int&, rmlib::input::InputManager::InputDevice> (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
Copy link
Owner

timower commented Feb 13, 2021

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

@raisjn
Copy link
Author

raisjn commented Feb 13, 2021

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 <http://gnu.org/licenses/gpl.html>
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:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

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
Copy link
Owner

timower commented Feb 21, 2021

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
Copy link
Author

raisjn commented Feb 21, 2021

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
Copy link
Owner

timower commented Mar 16, 2021

Can you check if 8860dee 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
Copy link
Author

raisjn commented Mar 17, 2021

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
Copy link
Owner

timower commented Mar 17, 2021

Should be fixed now in 314a896

@raisjn
Copy link
Author

raisjn commented Mar 17, 2021

great, works - thank you!

@raisjn
Copy link
Author

raisjn commented Mar 18, 2021

#resolved

@raisjn raisjn closed this as completed Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants