Go to file
Tony Garnock-Jones 8382a23063 Update README 2022-10-18 09:12:24 +02:00
devices alsactl store outputs from alsaucm 2022-05-26 14:54:12 +02:00
fonts Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
gsm-specs Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
images Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
sounds Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
squeak-dev-config For dev, put squeak stderr to tty 2022-05-28 10:51:20 +02:00
.gitignore Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
ACTORS.md Notes on actors in the Squeak image 2022-05-26 13:35:59 +02:00
DevSupport.st Cope with absent USER variable 2022-10-17 20:55:37 +02:00
Makefile Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
MorphicForCellphone.1.cs Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
README.md Update README 2022-10-18 09:12:24 +02:00
Squeakerfile.phone-base.st Adapt to Squeak 6.x 2022-10-17 16:45:05 +02:00
Squeakerfile.phone-dev.st Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
Squeakerfile.phone.st Initializing the SystemDataspace seems to allow non-dev images MachineConfigurations to boot properly (?) 2022-10-17 22:07:07 +02:00
backup-pm-home.sh Backup /etc/syndicate too 2022-10-11 13:55:29 +02:00
dpi.fallback Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
postmarketos-rndis.txt Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
proxy-modem-pinephone.sh Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
pull-image-from-phone.sh Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
push-image-to-phone.sh Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
rsnapshot.conf.pm-home Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
run_squeak.sh Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
squeak.pr Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
ssh-pm.sh Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00
unscaled-vnc-phone.sh Adapt to Squeak 6.x 2022-10-17 16:45:05 +02:00
vnc-phone.sh Initial commit - project started Aug 2020 (!) 2022-03-09 16:37:19 +01:00

README.md

SqueakPhone: Running Squeak Smalltalk as the UI for a PostmarketOS-based Cellphone

License: MIT.
Copyright ©20202022 Tony Garnock-Jones.

SqueakPhone comes in two pieces: this is the git-based portion, and there's another part that lives in SqueakSource.

Setting up your local Unix account

The LinuxIO package depends on being able to access /dev/input/*, which means on Debian at least that your user needs to be in the input group. This applies not only for running the image, but for building it too, even if you don't plan to develop with it on your local build host.

Loading the Smalltalk code into an existing image

You can work with most of the codebase without actually running it on a phone. (In fact, it also makes sense to transfer images back and forth between desktop VMs and the phone.)

The relevant packages to load into your Squeak image are:

Installer squeaksource project: 'Preserves'; install: 'Preserves'.
Installer squeaksource project: 'TouchScrolling'; install: 'TouchScrolling'.
Installer squeaksource project: 'TiledMaps'; install: 'TiledMaps'.
Installer squeaksource
	project: 'SyndicatedActors';
	install: 'BTree-Collections';
	install: 'SyndicatedActors'.
Installer squeaksource
	project: 'SqueakPhone';
	install: 'LinuxIO';
	install: 'SqueakPhone'.

Building/installing the system for on-phone use

Follow these steps after installing the base Synit system.

Check out the squeak-phone repository:

git clone https://git.syndicate-lang.org/tonyg/squeak-phone

Install squeaker so that the squeaker program is on your $PATH.

Run make dev. Eventually, a window should open with a transient Squeak image with a fully loaded set of SqueakPhone packages.

If that worked, try make images/current. Then, connect your phone, set up SSH to log in to it, and run

./push-image-to-phone.sh PHONEHOSTNAME

This will use rsync (which has to already have been installed with apk add rsync on the phone) to synchronise

  • the images/current/ image files
  • the sounds/ folder
  • squeak.pr, the syndicate-server configuration responsible for defining and starting the Squeak synit service.

Notes on working with PostmarketOS

How to use pmbootstrap

Switching devices:

pmbootstrap config device <new_device>

e.g.

pmbootstrap config device pine64-pinephone
pmbootstrap config device samsung-herolte
pmbootstrap config device qemu-amd64

Building for Samsung Galaxy S7 (samsung-herolte):

pmbootstrap install --android-recovery-zip

Building for Pinephone (pine64-pinephone):

pmbootstrap install --sdcard BLOCKDEV

Building for qemu-amd64:

pmbootstrap install
pmbootstrap qemu

How to install on Samsung Galaxy S7

(See https://wiki.postmarketos.org/wiki/Installation_from_recovery_mode )

Reboot holding power + home + volup to enter the recovery. Choose Advanced, ADB sideload.

Then run

pmbootstrap flasher --method adb sideload

How to use RNDIS to connect via ssh over USB

(See https://wiki.postmarketos.org/wiki/USB_Network )

For pinephone, which does get a MAC address for the RNDIS device:

sudo ip a del 10.42.0.1/32 dev usb0
sudo ip a add 172.16.42.2/32 dev usb0
sudo ip r add 172.16.0.0/16 dev usb0
SSH_AUTH_SOCK= ssh user@172.16.42.1

... or, huh, just use DHCP to get an address from the phone! It turns out to work.

The equivalent for samsung-herolte is similar but requires inventing a MAC address and assigning it at the link layer:

sudo ip link set dev enx000000000000 address 12:12:12:12:12:12
sudo ip a add 172.16.42.2/32 dev enx000000000000
sudo ip r add 172.16.0.0/16 dev enx000000000000
SSH_AUTH_SOCK= ssh user@172.16.42.1

How to set up WiFi on a running instance

(See https://wiki.postmarketos.org/wiki/WiFi)

When you pick "none" UI, you get no nmcli or wpa_supplicant.

Pick "console". Then you get both.

sudo nmcli device wifi connect <SSID> password <PASSWORD> ifname wlan0