Service Access on Stock Firmware¶
The stock firmware keeps its shell and its network login daemons switched off on a production device. Two marker files control that. Knowing about them is useful before libretouch is installed — they are the only way to get a shell or a network login on the stock system, whether to inspect a device before converting it or to work on one that has been restored to stock.
Neither switch is a libretouch feature. libretouch's own images give you a console and network access without any of this.
The two switches¶
| Marker name | What it turns on |
|---|---|
local_services |
The serial console gives a normal login instead of the SoundTouch command-line interface |
remote_services |
sshd and telnetd start |
On a device with neither marker, the serial console connects straight into the SoundTouch CLI — a command interpreter for the audio product, not a shell — and no network login is available at all.
Where the markers are looked for¶
Each name is checked in three directories, and any one of them is enough to enable the switch:
| Location | Lifetime |
|---|---|
/etc/<name> |
Part of the root filesystem, which is read-only in normal operation |
/mnt/nv/<name> |
Persistent volume; survives reboots and firmware updates |
/tmp/<name> |
Volatile; gone at the next reboot |
/mnt/nv is the writable persistent volume — the same one the
development setups use for fw_setenv. It is the right
place for a marker you want to keep.
Enabling remote services from a USB drive¶
This is the way in on a device where you have no shell yet.
- Format a USB drive as FAT32.
- Create an empty file named
remote_servicesin the root of the drive. No content, no extension. - With the device running, insert the drive into the USB-A port.
The drive is mounted automatically, the marker is noticed, and sshd and
telnetd are started straight away — no reboot needed.
Three things limit this route:
- it acts only on the first partition of the first USB disk, so use a single-partition drive and put the file in its root;
- the marker it leaves behind is created under
/tmp, so remote services are gone again after the next reboot; - if remote services are already enabled, inserting the drive does nothing.
Once you are logged in, make both switches permanent:
touch /mnt/nv/remote_services
touch /mnt/nv/local_services
Deleting those files and rebooting reverses it.
Version dependency on lisa_scm¶
The USB-drive route needs the USB port to work as a host port under Linux. On
lisa_scm boards, stock firmware only configures it that way up to 16.00.09. From
17.00.08 onwards the port is fixed to device-only, the drive never appears to
the running system, and a remote_services file on it has no effect.
| Stock version | lisa_scm USB port under Linux |
USB-drive route |
|---|---|---|
| 15.00.20 | dual-role | works |
| 16.00.09 | dual-role | works |
| 17.00.08 and later | device-only | no effect |
Since 15.00.20 is also the oldest release with a bootloader libretouch can use
(see Prerequisites), a lisa_scm device that satisfies
both is running exactly 15.00.20 or 16.00.09. If you are choosing which release
to put on a device, see
Preferred stock version on lisa_scm.
This is specific to lisa_scm. The other variants — spotty_scm, mojo_scm and
the rest — keep the port dual-role in every stock version, so the USB-drive
route works there regardless of firmware version. To check which variant a
device is, type this at the U-Boot prompt:
printenv variant
The restriction also applies only to the running Linux system. The bootloader
has its own USB stack and reads USB drives on every version, so USB firmware
updates such as installing to internal flash and
restoring stock firmware still work on a lisa_scm
running 17.00.08 or later.
Setting the markers on a newer lisa_scm¶
Warning: This procedure is currently untested.
Because the bootloader can still read a USB drive, the markers can be written from outside the stock system. Do a USB boot of libretouch — that is typed at the U-Boot prompt, changes nothing on the device, and needs no shell on the stock firmware — then mount the persistent volume and create the markers:
mkdir -p /mnt/nv
ubiattach /dev/ubi_ctrl -m 10 -d 1 -O 2048 -b 1
mount -t ubifs ubi1:persistent_volume /mnt/nv
touch /mnt/nv/local_services /mnt/nv/remote_services
umount /mnt/nv
Reboot back into the stock firmware and both switches are on.
Before you enable this¶
Both daemons expose a root-capable login, and telnetd carries the whole
session, credentials included, in clear text. Turn them on only on a network you
control, and delete the markers from /mnt/nv when you are done with them.