View Single Post
Old 09-24-2023, 05:34 PM   #7
elinkser
Addict
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 242
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
***

@NiLuJe:

That's great info. I will try that, but I may need a trip to the library to mooch off their broadband.

Unless there's a way to use my old "./gen-tc.sh kobo" build without having to download a lot more files???


***

@raisjn:

Thanks so much for this project!

I have only my little Clara HD, so I put the enjoyable challenge to any other interested Kobo owners to try rmkit and report back.

Maybe even Pocketbook owners???


There ARE a couple of items that come to mind...

1) Do you have any ideas as to what I'm doing wrong building drawing_demo (I get no output)?
UPDATE : "FIXED" - see below

$ source ~/koxtoolchain/refs/x-compile.sh kobo env bare

$ cd rmkit-build/

$ cd rmkit-master/

$ nano -l src/drawing_demo/main.cpy
Code:
 10     vfb = new framebuffer::FileFB("/mnt/onboard/.adds/koreader/note.raw", self.fb->display_width, self.fb->height)
 17     if input::is_touch_event(ev):
 18 //      return
 19         debug "on_mouse_move debug, ev=", ev.x              
... 
 23 //    if prevx != -1:
...
 29     debug "on_mouse_move debug, prevx=", ev.x
$ ARCH=kobo make drawing_demo

Copy drawing_demo from rmkit-master/src/build/ on my PC to /mnt/onboard/.adds/rmkit/bin/apps/ on my kobo.


When I run from SSH on PC:

# ps | grep remux
1514 root 0:00 sh /opt/bin/remux.sh
1516 root 0:00 /opt/bin/apps/remux
1648 root 0:00 grep remux

# kill -KILL 1514
# kill -KILL 1516

# sh /opt/bin/remux.sh

Then swipe up to start remux, and select the drawing_demo app:
DISPLAYED LAUNCHER FOR 2200 MS
LAUNCHING APP drawing_demo drawing_demo
POWER MANAGEMENT: 1
RESETTING MT GESTURES
CHECKING PROCESS drawing_demo 0
RENDERING drawing_demo
DECOMP TOOK 0.00358233
RUNNING ON CLARA HD
SETTING SCREEN DEPTH 32
W: 1072 H: 1448 S: 1088
XRES 1072 YRES 1448 BPP 32 GRAYSCALE 0
OPENING /dev/input/event0 AS BUTTONS
OPENING /dev/input/event1 AS TOUCH
ERROR OPENING INPUT DEVICE /dev/input/event2
ERROR OPENING INPUT DEVICE /dev/input/event3
ERROR OPENING INPUT DEVICE /dev/input/event4
on_mouse_move debug, ev= 262
on_mouse_move debug, prevx= 262
on_mouse_move debug, ev= 262
on_mouse_move debug, prevx= 262
on_mouse_move debug, ev= 262
on_mouse_move debug, ev= 263
on_mouse_move debug, prevx= 263


Copy /mnt/onboard/.adds/koreader/note.raw to my PC.

$ sudo apt install ufraw

$ ufraw note.raw

* The note.raw file is actually an empty file!

Any tips on how to debug or maybe switch to another way to work around this note.raw requirement to get drawing_demo to work?


2) Aside from the information in the docs/ folder, can you explain to us pleebs what a .cpy file is?

My attempt at using a ctags-like tagging system (https://www.gnu.org/software/global/ + pygments_parser) treated .cpp files like cpp programs and .py files like python programs, but .cpy files like COBOL programs!


Maybe an entry in your online guide?

reMarkable Guide
https://remarkable.guide/devel/langu...%2B/rmkit.html

okp - write c like python
https://oky.moe/okp/

raisjn/okp
https://github.com/raisjn/okp

rsperanza/CPY
https://github.com/vrsperanza/CPY



***

BROWSING SOURCE CODE IN A WEB BROWSER USING GLOBAL:


$ mkdir myglobal

$ cd myglobal/

GNU Global - a source code tagging system
https://www.gnu.org/software/global/
https://github.com/oracle/opengrok/w...-Similar-Tools
https://www.gnu.org/software/global/globaldoc_toc.html

$ wget https://ftp.gnu.org/pub/gnu/global/global-6.6.10.tar.gz

$ tar zxvf global-6.6.10.tar.gz

$ cd global-6.6.10/

$ ./configure --with-exuberant-ctags=/usr/bin/ctags

$ make

$ cp gtags.conf ~/.globalrc

$ cp gtags/gtags ~/.local/bin/

$ cp htags/htags ~/.local/bin/

$ cp global/global ~/.local/bin/

$ sudo mkdir /usr/local/share/gtags/

$ sudo cp htags/style.css /usr/local/share/gtags/

$ sudo mkdir /usr/local/lib/gtags

$ sudo cp plugin-factory/.libs/exuberant-ctags.so /usr/local/lib/gtags/

$ sudo cp plugin-factory/.libs/pygments-parser.so /usr/local/lib/gtags/

$ sudo mkdir /usr/local/share/gtags/script

$ sudo cp plugin-factory/pygments_parser.py /usr/local/share/gtags/script/

$ sudo chmod 755 /usr/local/share/gtags/script/pygments_parser.py

$ sudo apt install python-pygments

$ export GTAGSLABEL=pygments

$ cd ..

$ unzip rmkit-master.zip

$ cd rmkit-master/src/

$ gtags --explain

$ htags

$ elinks HTML/index.html


***

UPDATE : "FIX" FOR DRAWING_DEMO

$ source ~/koxtoolchain/refs/x-compile.sh kobo env bare

$ cd rmkit-build/

$ cd rmkit-master/

$ nano -l src/drawing_demo/main.cpy
Code:
  9   Note(int x, y, w, h): Widget(x, y, w, h):
 10     vfb = new framebuffer::FileFB("/mnt/onboard/.adds/rmkit/note.raw", self.fb->display_width, self.fb->height)
...
 17 //    if input::is_touch_event(ev):  
 18 //      return
...
 24       vfb->draw_line(prevx, prevy, ev.x, ev.y, 3, BLACK)
$ ARCH=kobo make drawing_demo

$ cd ..

$ mkdir stripped

$ cd stripped/

$ cp ../rmkit-master/src/build/drawing_demo .

$ arm-kobo-linux-gnueabihf-strip -s drawing_demo

$ file drawing_demo
stripped/drawing_demo: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.33, stripped

$ zip drawing_demo.zip drawing_demo
adding: drawing_demo (deflated 44%)

$ ls -l drawing_demo*
-rwxr-xr-x 1 739216 drawing_demo
-rw-r--r-- 1 412129 drawing_demo.zip


Copy drawing_demo from stripped/ on my PC to /mnt/onboard/.adds/rmkit/bin/apps/ on my kobo.


***

Last edited by elinkser; 09-29-2023 at 06:52 PM. Reason: "FIX" FOR DRAWING_DEMO
elinkser is offline