First system image of mobile Sculpt OS
At FOSDEM 2023, I'm going to introduce the mobile version of Sculpt OS at the "FOSS on mobile" developer room - the perfect opportunity to kick off a first public field test.
My presentation will be on Saturday, February 4, at 13:40 in the room UB4.136:
- Can Genode on the PinePhone question the notion of a smartphone?
-
https://fosdem.org/2023/schedule/event/genode_on_the_pinephone/
Besides introducing the project, I plan to give a live demonstration. Linked below you can find the system image as used for the demo.
Hardware requirements and target audience
-
PinePhone version 1.2
-
3 GiB RAM
-
SIM card
The image is not expected to work on earlier versions of the PinePhone.
Please note that the provided system is targeted at enthusiasts and developers of the Genode community, not at regular end users. Use it at your own risk.
Functionality covered
-
Custom user interface
-
Voice calls and mobile-data connectivity
-
On-target software installation and system update
-
Device controls (battery, brightness, volume, mic, reset, shutdown)
-
Installable software
-
Chromium-based Morph web browser
-
OpenGL test program using the GPU (glmark2)
-
Camera test, audio oscilloscope
-
Light-weight Unix-like system shell
-
-
Edit (April 2023): Wifi
Installation
-
Download experimental SD-card images from here:
https://depot.genode.org/nfeske/image
Edit (April 2023): an official PinePhone image for Sculpt OS 23.04 is now available as well.
You can find the disk image in two forms, as compressed .img.xz file or contained in a .zip file.
You may check the downloaded image's integrity with GnuPG using the accompanied .sig files and my public key.
-
Copy the image to an SD-card
On Unix-like systems, uncompress the downloaded .img.xz file and copy the resulting .img file to an SD-card.
$ xz -d sculpt-pinephone-<version>.img.xz $ sudo dd if=sculpt-pinephone-<version>.img of=/dev/sdX bs=1M conv=fsync
Replace /dev/sdX by the name of your SD-card device. You may check dmesg for obtaining the device name.
-
Boot the PinePhone with the SD-card inserted. After around 5 seconds, the user interface should appear.
-
Extend the Genode partition to the full size of the SD card. The downloaded image contains a tiny partition merely capable to the hold the base system. We need to expand it to the SD-card's actual capacity to have room for applications and data.
-
Select the "Storage" section
-
Select the partition "1"
-
Select "Expand" and confirm the operation
-
After a up to 20 seconds, you should see the partition size changed to the SD-card's capacity
-
-
Make the expanded partition the default using the "Default" button.
The concepts mirror the PC version of Sculpt OS. Please refer to the Sculpt OS documentation for more details.
Quick start
-
Toggle between the base system and the user-defined runtime at any time by touching the left screen edge.
-
Enable the modem in the "Phone" section of the GUI.
-
Once the modem is powered up, the SIM PIN is requested.
-
Once the phone is "ready", enable mobile-data connectivity in the "Network" section. While connecting, the status in the network section title displays "mobile ...". Once connected, the three little dots disappear and the device-local IP address of the modem is displayed below the buttons.
-
To test-drive the installation of software, select the "nano3d" preset in the "Software" section. This will trigger the installation of the components required by this preset, as reflected by the "install ..." message in the section title. You can get more details about the progress in the "Status" tab. Once the installation is complete, touch the left screen border to toggle between the just installed scenario and the base system.
Yes, you can control the spinning thing with your finger.
-
Try out the other presets.
Presets
- camera test
-
Shows the camera image, switching between the front and rear cameras every 10 seconds.
- empty
-
Resets the runtime to the initial state with no components present.
- gpu test
-
GLMark2 OpenGL demo using the GPU.
- morph browser
-
Web browser based on the Chromium engine and Qt5. It is hugely complex. Hence your patience is needed while downloading and extracting it. You may switch to the status tab to watch the progress.
Upon startup, the browser loads a simple landing page from genode.org with several links to the world-wide web.
The browser is configured such that no state is stored persistently by using the ram fs as location for the browser cache, cookies, and downloads. You can wipe this information using "Reset" button of the ram-fs component in the runtime graph.
- nano3d
-
A simple software-rendering demo.
- osci
-
An oscilloscope for the microphone input. You need to enable the microphone in the "Device" section to see anything interesting.
- system shell
-
A Unix-like command interface allowing you to access the inner life of Sculpt's config and report file systems using coreutils and ViM. You can find the Sculpt partition mounted at /rw/.
Feedback
Please leave your feedback on the Genode mailing list.
Commentary and caveats
-
When entering a wrong SIM PIN too often, the SIM card will request a PUK. PUK handing is not covered bu the user interface. To reset the SIM PIN, you will need to boot your favorite Linux variant for the PinePhone.
-
The battery percentage value is not always reliable. It is the plain information received from the power-management chip without any sanitizing. Take it lightly.
-
The power-meter information is updated every 10 seconds. To see the effect of a change like modifying the brightness, wait a bit.
-
The system-shell preset corresponds to the system shell in Sculpt OS. You can find the selected Sculpt partition mounted at /rw/, the config file system mounted at /config/ and the report file system mounted at /report/.
You can use vim to inspect the system log at /report/log.
-
The report-dump option combined with the system_clock-dummy option captures the entire state of the report file system (including the system log) to the root directory of the SD card. This allows you to inspect this diagnostic information offline by browsing the SD-card on a regular PC.
-
To take screen shots, enable the screenshot option in the software section. While enabled, a red dot is presented at the upper left screen corner, which can be touched to capture the current screen into a .png file. The .png files are named after a pseudo date and stored at the root of the Genode partition. As of now, they can be retrieved only by accessing the SD-card offline.
-
Resource-heavy websites can bring down the morph browser. You can restart it by using the "Restart" button.
-
The "Storage" section of the user interface looks out of place. This is because it was taken as is from the PC version of Sculpt OS, which was not designed for touch devices. In upcoming revisions, this section will become touch friendlier and will offer a file browser.
-
The "History" and "Contacts" tabs in the phone section are mere mock ups to illustrate where we are going. The features are not provided yet.
-
Some usability deficiencies like the missing ability to toggle the touch-screen keyboard in the morph-browser preset or the lack of proper symbols on the touch-screen keyboard are quite obvious. These surface-level usability aspects will be improved over time.
-
Should you unexpectedly observe the screen going black, you may have accidentally touched the left screen border that toggles the user between the base system and the runtime.
(added in April 2023):
-
One can select "Wifi" in the network part of the GUI, select an access point and enter your passphrase, just like on the PC version of Sculpt. Since the passphrase is not saved, however, one has to enter it each time when connecting, or use the trick described below.
-
Starting with the official Sculpt OS 23.04 version, both 2 GiB and 3 GiB models are in principle supported. However, the 2 GiB variant received almost no testing so far. The morph and jitsi presets are not expected to work with only 2 GiB.
-
When playing videos on the web browser, the sound is somewhat distorted, like overdriven.
-
The jitsi preset starts a pre-configured Morph browser right into Jitsi alongside the camera driver. The camera is operated in gray scale because we found the colors provided by the sensor not really presentable. Later, we may come back to work on the colors but until then, gray-scale looks nice enough. When asked, select "Use Jitsi on the Website". As of now, the preset is mainly intended to ease the testing of further performance optimizations. It may not by suited for practical use yet.
A few tips for your experimentation
(added in April 2023 for the Sculpt OS 23.04 release):
As a life hack to avoid typing the same WPA passphrase again and again, we can exploit the fact that the underpinning of the system is a regular Sculpt OS. After connecting once to your wireless network, you can do the following:
-
Switch to the system-shell preset
-
Issue the following commands to the system shell
mkdir -p /rw/config/23.04 cp /config/managed/wifi /rw/config/23.04/
Whenever Sculpt OS starts, the content of /rw/config/23.04/ is copied to /config (see the documentation). Now, with the hard-defined wifi configuration, we join the AP immediately when the wifi driver comes up. As a minor downside, the interactive AP selection is no longer offered. To revive it, remove the /config/wifi file using the system shell.
Note that also all the other Sculpt OS tricks work. For example, when saving a copy of /config/managed/nic_router to /rw/config/23.04 while being connected to wifi, you can hard-wire the selection of the network uplink to wifi, sparing you the manual activation of wifi right after booting.
Or, as another nicety, if you always want to enjoy the nano3d preset right after boot:
cp /config/presets/nano3d /rw/config/23.04/deploy
Building the image from source
This flavor of Sculpt OS evolves in my nfeske/genode and nfeske/genode-allwinner repositories, specifically the respective pinephone topic branches. Note that those branches are not stable. Stabilized commits are routinely funneled upstream to the genodelabs/genode and genodelabs/genode-allwinner repositories.
You can find further instructions in the README of the genode-allwinner repository.
The system image can be built via the following command from within the Genode build directory:
build/arm_v8a$ make run/sculpt_image KERNEL=hw \ BOARD=pinephone \ SCULPT=phone \ DEPOT=omit
During iterative development, it is recommended to use the run/sculpt_test script using fastboot.