Giter Club home page Giter Club logo

rm-docker's People

Contributors

eeems avatar fenollp avatar timower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rm-docker's Issues

SSH log in requires password

Readme says:

# Now login using the root account, no password
# Or ssh:
ssh root@localhost -p 2222

but with

ssh root@localhost -p 2222

a password is required.

Note: the password also changes at each new docker run --rm -it ..

qcow2 copy on write

It would be interesting to use copy on write to store changes to the base image in a way where this can be uploaded without the rootfs, but with the qcow2 images with all the changes from the base image. Then fetch and create the base qcow2 image if it's missing on launch of the container.

Emulator unresponsive to mouse events after saving vm

Steps to reproduce:

  1. Build Docker image from repo with qemu-rm2fb as target
  2. Run inside a container with port 22 open:
    $ docker run -it --volume /tmp/.X11-unix:/tmp/.X11-unix --volume $HOME/.Xauthority:/root/.Xauthority --env DISPLAY --hostname "$(hostnamectl hostname)" --publish 22:22 -it rm-docker
  3. After xochitl initialisation, run /opt/bin/save_vm.sh in container exec.
  4. Restart Docker container.

When the container first starts and everything finishes loading, it's possible to interact with the emulator as if using a pen.
After having saved a snapchot of the qemu vm, and restarted the container, the emulator is back up but it is no longer possible to interact with it using the mouse.

Add missing input devices

I've been poking around with running applications from toltec in the emulator, and quite a few of them hard code the input paths, which cause them to crash when attempting to run them. For example chessmarkable will panic if you try to run it. While it would be best to solve this by having the emulator expose the devices, another workaround would be to update the rm2fb client to spoof those paths.

Allow allocating more CPU/memory

It would be useful if the run_vm.sh script allowed overriding the cpu core count and the memory allocation. Automated build processes using this image would benefit from more resources.

Help on using this

Hi! I'd like to use the X11 forwarding feature but I'm getting this:

# docker buildx build -t rm-docker:plain https://github.com/timower/rM-docker.git
# docker run --rm -it \
  --volume /tmp/.X11-unix:/tmp/.X11-unix \
  --volume $HOME/.Xauthority:/root/.Xauthority \
  --env DISPLAY \
  --hostname "$(hostnamectl hostname)" \
  --publish 2222:22 \
  -it rm-docker:plain
+ run_vm.sh -serial null -daemonize
Staring QEMU...
qemu-system-arm: warning: nic imx.enet.1 has no peer
+ ssh -o StrictHostKeyChecking=no root@localhost true
+ sleep 5
+ ssh -o StrictHostKeyChecking=no root@localhost ./rm2fb-forward
Socket unlink: No such file or directory
+ ssh -o StrictHostKeyChecking=no root@localhost LD_PRELOAD=/home/root/librm2fb_client.so /usr/bin/xochitl
+ rm2fb-emu 127.0.0.1 8888
Authorization required, but no authorization protocol specified

error: XDG_RUNTIME_DIR is invalid or not set in the environment.
uintput: No such file or directory
Error making uinput device
GC16Fast Update: { { 0, 0 }, { 1403, 1871 } }
Hooking 368872 - 373952 with 3063564044
Hooking 344056 with 3063560928
Hooking 732936 with 3063564060
debug: "2023-07-18T12:39:14Z tags/releases/3.5.2.1807-device+3.5.2.753-clients 17579f6"
debug: we're running on an epaper device
12:52:37.064 default                  QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
12:52:37.094 qt.qpa.input             evdevtouch: Using device discovery
Registering exit handlers
REPLACING THE IMAGE with shared memory
HOOK: create threads called
12:52:37.798 rm.battery               Unable to find battery information in /sys/class/power_supply/max77818_battery
12:52:37.807 rm.filesystem            open( QFlags(0x1) )  "/sys/devices/soc0/usbphynop2/uevent"  failed:  "No such file or directory"
12:52:37.813 rm.filesystem            file '/sys/devices/soc0/usbphynop2/uevent' could not be opened (readFile /__w/xochitl/xochitl/src/filesystem/src/filesystem.cpp:36)
12:52:37.815 rm.filesystem            open( QFlags(0x1) )  "/sys/class/power_supply/max77818_battery/voltage_now"  failed:  "No such file or directory"
12:52:37.816 rm.filesystem            file '/sys/class/power_supply/max77818_battery/voltage_now' could not be opened (readFile /__w/xochitl/xochitl/src/filesystem/src/filesystem.cpp:36)
12:52:37.818 rm.filesystem            open( QFlags(0x1) )  "/sys/class/power_supply/max77818_battery/current_now"  failed:  "No such file or directory"
12:52:37.818 rm.filesystem            file '/sys/class/power_supply/max77818_battery/current_now' could not be opened (readFile /__w/xochitl/xochitl/src/filesystem/src/filesystem.cpp:36)
12:52:37.819 rm.filesystem            open( QFlags(0x1) )  "/sys/class/power_supply/max77818_battery/charge_now"  failed:  "No such file or directory"
12:52:37.820 rm.filesystem            file '/sys/class/power_supply/max77818_battery/charge_now' could not be opened (readFile /__w/xochitl/xochitl/src/filesystem/src/filesystem.cpp:36)
12:52:37.821 rm.filesystem            open( QFlags(0x1) )  "/sys/class/power_supply/max77818_battery/capacity"  failed:  "No such file or directory"
12:52:37.822 rm.filesystem            file '/sys/class/power_supply/max77818_battery/capacity' could not be opened (readFile /__w/xochitl/xochitl/src/filesystem/src/filesystem.cpp:36)
12:52:37.823 rm.battery               Unable to parse battery level from battery file
12:52:37.850 rm.filesystem            open( QFlags(0x1) )  "/home/root/.config/remarkable/xochitl.conf"  failed:  "No such file or directory"
12:52:37.851 rm.filesystem            open( QFlags(0x1) )  "/home/root/.config/remarkable/xochitl.conf"  failed:  "No such file or directory"
12:52:37.855 rm.filesystem            open( QFlags(0x1) )  "/dev/mmcblk2boot1"  failed:  "No such file or directory"
12:52:37.856 default                  Failed to read serial number
12:52:37.857 rm.filesystem            open( QFlags(0x1) )  "/sys/fsl_otp/HW_OCOTP_TESTER0"  failed:  "No such file or directory"
12:52:37.857 default                  Failed to open file "/sys/fsl_otp/HW_OCOTP_TESTER0"
12:52:37.859 rm.filesystem            open( QFlags(0x1) )  "/sys/fsl_otp/HW_OCOTP_TESTER1"  failed:  "No such file or directory"
12:52:37.859 default                  Failed to open file "/sys/fsl_otp/HW_OCOTP_TESTER1"
12:52:37.864 rm.deviceinfo            Unable to get a real device id. Using a generated one: "4032c561-f8c6-48e3-a9a6-749ec911ae46"
12:52:37.878 rm.filesystem            open( QFlags(0x1) )  "/dev/mmcblk2boot1"  failed:  "No such file or directory"
12:52:37.878 rm.deviceinfo            Failed to open serial number partition file
12:52:37.882 rm.deviceinfo            Zero or more than one phy dir in /sys/class/ieee80211/: 
12:52:38.111 default                  Lock in temp location
12:52:38.187 rm.filesystem            open( QFlags(0x1) )  "/home/root/.config/remarkable/xochitl.conf"  failed:  "No such file or directory"
12:52:38.188 rm.filesystem            open( QFlags(0x1) )  "/home/root/.config/remarkable/xochitl.conf"  failed:  "No such file or directory"
12:52:38.192 rm.filesystem            open( QFlags(0x1) )  "/dev/mmcblk2boot1"  failed:  "No such file or directory"
12:52:38.193 rm.deviceinfo            Failed to open serial number partition file
12:52:38.194 rm.deviceinfo            Zero or more than one phy dir in /sys/class/ieee80211/: 
12:52:38.212 rm.network.settings      Forcefully setting LibraryExplorer to true on boot, happy bug testing and please don't turn me off, we are going to try to ship this next release! xoxo
12:52:38.884 rm.wifi                  Failed to get interface flags: No such device
12:52:38.984 rm.digitizer             Unable to discover correct device
12:52:39.082 rm.network.usertoken     Invalid UserToken : "" (userToken2Json /__w/xochitl/xochitl/src/network/src/usertoken.cpp:33)
12:52:39.084 rm.network.usertoken     Could not parse UserToken as Json object (parseTimeinfo /__w/xochitl/xochitl/src/network/src/usertoken.cpp:94)
12:52:39.245 rm.batterymanager        set sleep delay timer to 12000 (setSyncBeforeSleep /__w/xochitl/xochitl/src/deviceinfo/src/batterymanager.cpp:109)
Got msg: { { 0, 0; 1403, 1871 }, wave: 2 flags: 1 }
Read: 5256576 / 5256576
GC16Fast Update: { { 0, 0 }, { 1403, 1871 } }
Mem: 0xb65fe000
Waiting for connection on port 8888
SWTCON :p!
Goal: 5256576 written: 5256576
UPDATE { { 0, 0; 1403, 1871 }, wave: 2 flags: 1 }: 1
Got msg: { { 576, 1063; 825, 1072 }, wave: 0 flags: 4 }
Read: 5000 / 5000
DU Update: { { 576, 1063 }, { 825, 1072 } }
Got msg: { { 576, 999; 825, 1062 }, wave: 2 flags: 4 }
Read: 32000 / 32000
GC16Fast Update: { { 576, 999 }, { 825, 1062 } }
Got msg: { { 576, 1063; 825, 1072 }, wave: 0 flags: 4 }
Read: 5000 / 5000
DU Update: { { 576, 1063 }, { 825, 1072 } }
Got msg: { { 576, 1063; 825, 1072 }, wave: 0 flags: 4 }
... snip ...
Goal: 5000 written: 5000
Goal: 32000 written: 32000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
Goal: 5000 written: 5000
... snip ...
UPDATE { { 0, 0; 1403, 1871 }, wave: 2 flags: 0 }: 1
Read: 5256576 / 5256576
GC16Fast Update: { { 0, 0 }, { 1403, 1871 } }
12:52:55.653 rm.wifi                  No interface to scan
12:52:55.654 rm.filesystem            open( QFlags(0x1) )  "/sys/class/power_supply/max77818_battery/voltage_now"  failed:  "No such file or directory"
12:52:55.655 rm.filesystem            file '/sys/class/power_supply/max77818_battery/voltage_now' could not be opened (readFile /__w/xochitl/xochitl/src/filesystem/src/filesystem.cpp:36)
12:52:55.657 rm.filesystem            open( QFlags(0x1) )  "/sys/class/power_supply/max77818_battery/current_now"  failed:  "No such file or directory"
12:52:55.657 rm.filesystem            file '/sys/class/power_supply/max77818_battery/current_now' could not be opened (readFile /__w/xochitl/xochitl/src/filesystem/src/filesystem.cpp:36)
12:52:55.658 rm.filesystem            open( QFlags(0x1) )  "/sys/class/power_supply/max77818_battery/charge_now"  failed:  "No such file or directory"
12:52:55.658 rm.filesystem            file '/sys/class/power_supply/max77818_battery/charge_now' could not be opened (readFile /__w/xochitl/xochitl/src/filesystem/src/filesystem.cpp:36)
12:52:55.659 rm.filesystem            open( QFlags(0x1) )  "/sys/class/power_supply/max77818_battery/capacity"  failed:  "No such file or directory"
12:52:55.660 rm.filesystem            file '/sys/class/power_supply/max77818_battery/capacity' could not be opened (readFile /__w/xochitl/xochitl/src/filesystem/src/filesystem.cpp:36)
12:52:55.660 rm.battery               Unable to parse battery level from battery file
12:52:55.671 rm.stp.network           Error on requesting integrations with "" (operator() /__w/xochitl/xochitl/src/syncthirdparty/src/network.cpp:163)
12:52:55.672 rm.stp.network              with error OperationCanceledError (operator() /__w/xochitl/xochitl/src/syncthirdparty/src/network.cpp:164)
12:52:55.672 rm.stp.network              with body "" (operator() /__w/xochitl/xochitl/src/syncthirdparty/src/network.cpp:169)
12:52:55.674 rm.updates               Request finished. Was dispatched at: 2023-10-04T12:52:39.179
12:52:55.676 rm.updates               Network error: QNetworkReply::OperationCanceledError Payload: ""
12:52:56.811 default                  Model size of -1 is less than 0
... ^C ...

I'm on ubuntu jammy (hmm might be on Wayland then)

# docker version
Client: Docker Engine - Community
 Version:           24.0.6
 API version:       1.43
 Go version:        go1.20.7
 Git commit:        ed223bc
 Built:             Mon Sep  4 12:31:44 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.6
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       1a79695
  Built:            Mon Sep  4 12:31:44 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.24
  GitCommit:        61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
 runc:
  Version:          1.1.9
  GitCommit:        v1.1.9-0-gccaecfc
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Add rM1 as well

It would be useful to support rM1 emulation as well to ensure things work the same between the two devices. The rm2fb shim should work fine here too, since it was build to allow rM1 apps to work on a rM2.

Override rm2fb service

I would recommend overriding the rm2fb service with some sort of dummy so that packages that install with toltec that depend on it will not error out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.