added tdeckboot
This commit is contained in:
@@ -18,7 +18,7 @@ On other generic platforms, most modules which are not T-Deck-specific are set t
|
||||
|
||||
## Installation on T-Deck (Plus)
|
||||
|
||||
Current installation process doesn't involve any `.mpy` module compilation, so, after installing the prerequisites, you just need to copy the `deck` and `app` directories into the root of the `CIRCUITPY` removable volume.
|
||||
Current installation process doesn't involve any `.mpy` module compilation, so, after installing the prerequisites, you just need to copy the `deck` and `app` directories (and optionally the `tdeckboot.py` file, see the FAQ) into the root of the `CIRCUITPY` removable volume.
|
||||
|
||||
## Components (`deck.*`)
|
||||
|
||||
@@ -214,6 +214,8 @@ No, but it provides comparable functionality to the on-device Python REPL. You c
|
||||
|
||||
It may at some point, but the entire idea is to give you the foundation to easily create your own custom shells for any special purposes. The project carries the spirit of early personal computing days when the programming language REPL (BASIC, Forth, Lisp etc) **was** your primary operating environment. In this case, the on-device Python REPL is such an environment.
|
||||
|
||||
To get a hang of how the shell **might** look like, you can run `from tdeckboot import *`. This will expose all the common methods from the main core modules. See the [tdeckboot.py](./tdeckboot.py) file for details.
|
||||
|
||||
### Which platforms is T-DeckARD being tested on?
|
||||
|
||||
CircuitPython 10.x on a T-Deck Plus and MicroPython for modern x86_64 Linux. That's it.
|
||||
|
||||
@@ -18,6 +18,15 @@ def lock_rootfs():
|
||||
if MCU_STORAGE:
|
||||
storage.remount("/", readonly=True)
|
||||
|
||||
# TODO: switch to buffered copying to avoid RAM overflow
|
||||
def copy(p1, p2):
|
||||
with open(p1, 'rb') as f1:
|
||||
content = f1.read()
|
||||
with open(p2, 'wb') as f2:
|
||||
f2.write(content)
|
||||
|
||||
cp = copy # shortcut export
|
||||
|
||||
# Some shortcut export bindings to corresponding os functions
|
||||
|
||||
sep = pathsep = os.sep
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# TDeckARD "boot script" importing all commonly used functions
|
||||
# for a shell-like experience
|
||||
# Usage: from tdeckboot import *
|
||||
# Created by Luxferre in 2025, released into public domain
|
||||
|
||||
from deck.fs import unlock_rootfs, lock_rootfs, env, rnd, sync
|
||||
from deck.fs import du, df, sep, pwd, ls, md, cd, rd, rm, mv, cp
|
||||
from deck.input import input, input_multi
|
||||
from deck.pager import print_paged, term_size
|
||||
from app.ed import edit, view
|
||||
try:
|
||||
from deck import net
|
||||
requests = net.init_requests()
|
||||
socket = net.init_socket()
|
||||
except:
|
||||
import requests, socket
|
||||
Reference in New Issue
Block a user