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

Will Debian Bullseye come? #1554

Open
jwaxy opened this issue Jan 28, 2023 · 12 comments
Open

Will Debian Bullseye come? #1554

jwaxy opened this issue Jan 28, 2023 · 12 comments
Labels

Comments

@jwaxy
Copy link

jwaxy commented Jan 28, 2023

Question

Debian released Buster and Bullseye but ev3dev is stuck on stretch. Does there is any plan to upgrade? Or is this project discounted?

@jwaxy jwaxy added the question label Jan 28, 2023
@dlech
Copy link
Member

dlech commented Jan 30, 2023

Not likely (unless someone wants to sponsor me to work on it).

@pythoncat1
Copy link

I wanted to try to update it myself, any suggestions to how I might do it?

@dlech
Copy link
Member

dlech commented Aug 30, 2023

The first step would be to get https://github.com/ev3dev/lego-linux-drivers updated to the latest kernel and make sure everything still works. Then try building the image from https://github.com/ev3dev/docker-library and see if there are any more ev3dev-specific packages that need to be updated and rebuilt.

@pythoncat1
Copy link

Thanks! I’ll try that!

@Growflavor
Copy link

Thanks! I’ll try that!

@pythoncat1 I am also curious about this...did you happen to make any progress with either Bullseye (or Buster)?

@pythoncat1
Copy link

@Growflavor Unfortunately no… i’m not really familiar with this sort of thing 😅

@Growflavor
Copy link

@Growflavor Unfortunately no… i’m not really familiar with this sort of thing 😅

Ok thank you for the update!

Some reference info for anyone else curious or tinkering:

(or perhaps incase updates or python packages eventually stop being able to be installed, for example, via 'sudo apt install python3-numpy' on the released EV3dev Debian 9 "Stretch" armel version...)

--as discussed in #1228, for basic EV3 core set sensors/motors the EV3dev beta "Buster" (which uses python 3.7 and apparently has Brickman 0.10.2 in the default docker pull rather than 0.10.3) does boot, updates via internet, connects to VScode, & appears to run at least basic programs (so far I've just used basic motors & sensors)
https://github.com/ev3dev/docker-library/tree/master/ev3dev-buster
#1228 (comment)
ev3dev/lego-linux-drivers@ev3dev-buster...Eisverygoodletter:lego-linux-drivers:ev3dev-buster

The EV3dev Beta Debian 10 "Buster" SD card image can be made using Brickstrap (just by following the provided instructions & terminal commands): https://github.com/ev3dev/brickstrap
In my case, I used Ubuntu 22.04 LTS running on WSL2 in Windows 10, & followed the various ev3dev instructions provided on the respective github pages ( = installed docker & brickstrap with apt from repository, pulled the "ev3-buster-generic" docker image & ran brickstrap then copied the .img to a windows folder & flashed a SDcard with Etcher & booted the EV3:

========== ev3dev-sysinfo ==========
Image file: ev3dev-buster-ev3-generic-2020-04-10
Kernel version: 4.19.85-ev3dev-3-beta2-ev3
Brickman: 0.10.2
BogoMIPS: 148.88
Bluetooth:
Board: board0
BOARD_INFO_HW_REV=8
BOARD_INFO_MODEL=LEGO MINDSTORMS EV3
BOARD_INFO_ROM_REV=6
BOARD_INFO_SERIAL_NUM=00165360CCF6
BOARD_INFO_TYPE=main

--also, there is a potentially interesting "user created update" (i.e. tinker & use at your own risk & with caution...) of EV3dev Debian 9 "Stretch" image that has Python 3.9.16 in the discussion at #1558 ...it does boot, etc.: I did succeed at flashing a SD card with the provided 14GB .ima image using the trial version of WinImage & have started tinkering...

#1558 (comment)

https://wiki.debian.org/LTS
Debian 8 “Jessie” | i386, amd64, armel and armhf | 17th June 2018 to June 30, 2020
Debian 9 “Stretch” | i386, amd64, armel, armhf and arm64 | July 6, 2020 to June 30, 2022
Current LTS Release(s)
Debian 10 “Buster” | i386, amd64, armhf and arm64 | August 1st, 2022 to June 30th, 2024

https://wiki.debian.org/LTS/Extended
Debian 8 “Jessie” | i386, amd64, armhf, armel | from 2020-07-01 to 2025-06-30
Debian 9 “Stretch” | i386, amd64, armhf | from 2022-07-01 to 2027-06-30
Debian 10 “Buster” | i386, amd64, ...? | from 2024-07-01 to 2029-06-30

@Growflavor
Copy link

Growflavor commented Mar 26, 2024

@jwaxy @pythoncat1 @atk-r

note for tinkering fun with ev3dev2 & Python 3.9.2 with the Debian Bullseye beta2 based on the old Kernel version: 4.19.85-ev3dev-3-beta2-ev3

@StepanTheFlowey made a brickman fork that will build on &
works with the above mentioned Bullseye beta2 image (apt updated with many packages) that is based on the
original image pulled by: sudo docker pull ev3dev/ev3dev-bullseye-ev3-generic

StepanTheFlowey/brickman#1 (comment)

With the disclaimer & caveat that the following image(s) are "tinker & use for your own 'breaking' fun/learning risk"
(who knows if it may cause CERN to spontaneously form a singularity that consumes your EV3 or... ;-)
since I only use them to help my son learn about VMs & linux & robotics & python3, etc...

google drive link to ZIP file with ev3dev11v7.img that can be flashed directly to SDcard by Etcher:

https://drive.google.com/file/d/1ryNuD96bsXy7Kkv1_DASmhP9_wthxCon/view?usp=drive_link

.zip sha-256: 917BF029AAF5EC88C70300BD1D84CD2E95AC1C46B49C40515209BD625379D255

.img sha-256: D6DE416D7DED2636B229B2B1DF10E5EF99E5C6B7D5CB1DAE829DC6A0B53A6AD1

this image was built using:

sudo brickstrap create-tar growflavor/ev3images:latest ev3dev11v7.tar

sudo brickstrap create-image ev3dev11v7.tar ev3dev11v7.img

========== ev3dev-sysinfo ==========
Image file: ev3dev-bullseye-ev3-generic-2021-05-10
Kernel version: 4.19.85-ev3dev-3-beta2-ev3
Brickman: 0.11.0+fl0wey1
BogoMIPS: 148.88
Bluetooth: 4.0
Board: board0
BOARD_INFO_HW_REV=8
BOARD_INFO_MODEL=LEGO MINDSTORMS EV3
BOARD_INFO_ROM_REV=6
BOARD_INFO_SERIAL_NUM=00165360CCF6
BOARD_INFO_TYPE=main

Note 1: for us PuTTY & VScode all connect with this above image by USB to ethernet adapter local LAN, USB cable connection to Win 11 computer, & the EV3 onboard Bluetooth. However, with connections to one of our EV3 bricks we had to increase the timeout value to 90 seconds in the VScode ev3dev Browser settings:

IncreaseTimeoutto90

Note 2: fun fact -- VScode has a jupyter note book extension so you can have a notebook open directly in VScode served from the same .venv you use for the pylance interpreter & use RPyC 5.3.1 to directly control your EV3 by notebook code cells

You can add RPyC to this Bullseye image:

Note this sudo use of pip is 'not an ideal' method (but it works ok in this case).

sudo python3 -m pip install rpyc==5.3.1
hostname -I
robot@ev3dev:~$ hostname -I
192.168.1.110 
robot@ev3dev:~$ 
then activate the EV3 RPyC server using the IP shown by hostname -I: 
sudo python3 /usr/local/bin/rpyc_classic.py --host=192.168.1.110

Note 3: using apt is painful onboard the EV3 especially with Bullseye, so easier to:

update the image using a docker container:

--make changes/updates in a docker container on a machine with a favorite brickstrap/docker setup:

commands below are for docker running on linux...
& in this case sudo is used since it is easier with Ubuntu running via Windows WSL2

details about brickstrap: https://github.com/ev3dev/brickstrap

sudo docker pull growflavor/ev3images:latest
sudo docker tag growflavor/ev3images:latest ev3d11old
sudo docker run --platform linux/arm/v5 -it ev3d11old su -l robot

--you will get a robot@ prompt, make the updates/changes you want inside this container, then logout from the robot@ prompt

--then commit the docker container you just updated to a docker image (docker ps -a will show the image(s) & ID#):

    sudo docker ps -a
    sudo docker container commit ID#_of_your_updated_container_e.g.123eeed582c2 ev3d11new:latest

--then use brickstrap to make a new .img from your updated docker container to flash with Etcher, for example:

sudo brickstrap create-tar ev3d11new:latest ev3dev11new.tar

sudo brickstrap create-image ev3dev11new.tar ev3dev11new.img

You may return to your stopped container (use your container's name i.e. not quizzical_wright ) to make further changes/updates anytime by starting it:

sudo docker start -i quizzical_wright

or if it is still running you can activate a shell to resume work with syntax like:

sudo docker exec -it quizzical_wright /bin/bash

you can also copy files out of the container with syntax like this:

sudo docker cp quizzical_wright:/usr/local/src/brickman_0.11.0+fl0wey1_armel.deb .

Note 4: for the moment, sudo docker pull growflavor/ev3images:latest should pull this sha-256#:

Digest: sha256:e0b53625b2375a4aec942a53860cc2d15f4043693bbc4ed78fa756687c212d76

Note 5: no micropython in this image since appears it would need to be rebuilt at least with libffi7 & libmagickwand-6.q16-6 to even have a chance of working with Bullseye

Note 6: fun fact -- "sudo chvt 6 sudo conspy" #880 (comment)

Note 7: If you learn or discover or add anything cool...let my son & I know!

@pythoncat1
Copy link

@Growflavor Very interesting! Will try it and tinker as soon as I can!

@Growflavor
Copy link

Growflavor commented May 1, 2024

Also, for anyone interested in tinkering with the docker library Stretch image...

sources for backports & security indicated >100 updates available (see below)...

so , here is a link to EV3devDebian9Stretch image based on the EV3dev docker library Stretch image...

  • apt update via docker container
  • pip installed RPyC 5.0.0 (which so far seems to work ok even though RPyC 4.x.x is for Python 3.5 -- this just makes it easier to use the same Jupyter Notebook environment that has RPyC 5.x.x with the Stretch, Buster, & Bullseye images)
  • added via apt some python packages like numpy...
  • added via apt the beta pybrick-micropython3 package ( #!/usr/bin/env pybricks-micropython3 )

ev3dev9mlv02.zip
https://drive.google.com/file/d/1AsLfR20OCXT4Lsv-pELsOdRfO8hqC90B/view?usp=drive_link

Ev3dev9mlv02.zip sha-256:
2FBE5EECDDD2A72CE282BAEBAAA4D192C4986270870A36FFCFE48D0934E85838

Ev3dev9mlv02.img sha-256:
244B3D45D91BA0150442B76461581AD375B91BBF218621E762B3C6DFFF280AB8

After flashing the .img to SD (e.g. via Balena Etcher), on first boot, the boot sequence may pause with a notice in the micro text on the screen that root access is locked. In my case, I press the center button = 'Enter" to continue boot, then reboot from Brickman menu once the 1st boot completes. After the reboot, I then connect to VScode etc.

EV3imageFirstBootDSC08459

snip from the start of the update in the docker container:
robot@faeecdd4302c:~$ sudo -S nano /etc/apt/sources.list
robot@faeecdd4302c:~$ sudo apt update
Ign:1 http://archive.debian.org/debian stretch InRelease
Hit:2 http://archive.debian.org/debian-security stretch/updates InRelease
Hit:3 http://archive.debian.org/debian stretch-backports InRelease
Hit:4 http://archive.debian.org/debian stretch Release
Hit:5 http://archive.ev3dev.org/debian stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
141 packages can be upgraded. Run 'apt list --upgradable' to see them.
robot@faeecdd4302c:~$ apt list --upgradable

@pythoncat1
Copy link

Also, for anyone interested in tinkering with the docker library Stretch image...

sources for backports & security indicated >100 updates available (see below)...

so , here is a link to EV3devDebian9Stretch image based on the EV3dev docker library Stretch image...

  • apt update via docker container
  • pip installed RPyC 5.0.0 (which so far seems to work ok even though RPyC 4.x.x is for Python 3.5 -- this just makes it easier to use the same Jupyter Notebook environment that has RPyC 5.x.x with the Stretch, Buster, & Bullseye images)
  • added via apt some python packages like numpy...
  • added via apt the beta pybrick-micropython3 package ( #!/usr/bin/env pybricks-micropython3 )

ev3dev9mlv02.zip https://drive.google.com/file/d/1AsLfR20OCXT4Lsv-pELsOdRfO8hqC90B/view?usp=drive_link

Ev3dev9mlv02.zip sha-256: 2FBE5EECDDD2A72CE282BAEBAAA4D192C4986270870A36FFCFE48D0934E85838

Ev3dev9mlv02.img sha-256: 244B3D45D91BA0150442B76461581AD375B91BBF218621E762B3C6DFFF280AB8

After flashing the .img to SD (e.g. via Balena Etcher), on first boot, the boot sequence may pause with a notice in the micro text on the screen that root access is locked. In my case, I press the center button = 'Enter" to continue boot, then reboot from Brickman menu once the 1st boot completes. After the reboot, I then connect to VScode etc.

EV3imageFirstBootDSC08459

snip from the start of the update in the docker container:

Interesting 👀
Is it possible to use newer versions of Python/Debian packages in this build?

@Growflavor
Copy link

Growflavor commented May 4, 2024

Also, for anyone interested in tinkering with the docker library Stretch image...
sources for backports & security indicated >100 updates available (see below)...
so , here is a link to EV3devDebian9Stretch image based on the EV3dev docker library Stretch image...

Interesting 👀 Is it possible to use newer versions of Python/Debian packages in this build?

some 'tinker thoughts':

  1. the objective of this specific image was primarily to show that the reasonably well documented process to docker pull, adjust in docker container, then use Brickstrap to turn the docker container into a flash-able/bootable EV3 SDcard image still works & is quite easy to do even for a person familiar with computers but not previously experienced specifically with docker/EV3/etc.

  2. RE: "Is it possible to use newer versions of Python/Debian packages"

a) you can easily tinker with 'make altinstall' of Python from source in the docker container (see 4) below as an example).

b) As for Debian packages:

-- if one needed a feature from a newer Debian package, a first step might be to see if that feature was made available via a backport package, then install just that backport & its dependencies via apt:

https://backports.debian.org/Instructions/
"The co-installability of all available backports is not tested, and it is strongly recommended to opt-into the use of specific backported packages on an as-needed basis."

-- if just using the python-ev3dev2 package, one 'tinker' path might be to update the Debian version to 'Bookworm' via docker container (in this case the newer Debian packages would be running on the older 'as is' 4.14 or 4.19 armel EV3 kernel) then create a python venv & pip install python-ev3dev2 -- if no major syntax or methods have been dropped by python 3.11.2 that might 'work enough to be useful'...

  1. Overall, in most cases, my sense with the EV3 is that a good base practice likely is to use laptops/desktops to do heavy newer python activities & simply exchange low bandwidth commands/data with the EV3 (running a stable image) via any number of the methods python offers..one of the 'beginner accessible' being RPyC. There are some interesting other examples of other methods such as the LOGO, Pathfind3r, Lidar projects at https://www.ev3dev.org/projects/ as well as Lina's ML for EV3.

  2. As one example, working with an EV3 image in a docker container does make experimenting much quicker/easier...a default './configure' 'make' 'make altinstall' for python3.11.2 from a python source package in this "Stretch" image...enables creating a python 3.11 venv...however, since some headers did not build on first try -- importantly, for example, SSL -- if/until one could address that then one can not update or install from pip in that python3.11 venv ... here is an excerpt from the ./configure :

checking for --with-openssl-rpath...
checking whether OpenSSL provides required ssl module APIs... no
checking whether OpenSSL provides required hashlib module APIs... no
checking for --with-ssl-default-suites... python
checking for --with-builtin-hashlib-hashes... md5,sha1,sha256,sha512,sha3,blake2
checking for LIBB2... no

example python3.11 altinstall in a copy of the same EV3dev armel "Stretch" container that built the .img being discussed:
growflavor@AloEnergia:~$ sudo docker start -ai confident_bohr	
robot@98fc57334730:~$ python --version	
Python 2.7.13	
robot@98fc57334730:~$ python3 --version	
Python 3.5.3	
robot@98fc57334730:~$ python3.11 --version	
Python 3.11.2	
robot@98fc57334730:~$	
  
robot@98fc57334730:~$ source ./py11venv/bin/activate	
(py11venv) robot@98fc57334730:~$ pip --version	
pip 22.3.1 from /home/robot/py11venv/lib/python3.11/site-packages/pip (python 3.11)	
(py11venv) robot@98fc57334730:~$ pip list	
Package    Version	
---------- -------	
pip        22.3.1	
setuptools 65.5.0	
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.	
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping	
WARNING: There was an error checking the latest version of pip.	
(py11venv) robot@98fc57334730:~$	

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants