Phoenix 0.0.5 Now Available

Phoenix 0.0.5 is now available for download. This version of Phoenix focuses on networking, adding a bunch of new network utilities and servers for connecting your computers together. It also includes new kernel compression with Luz, which reduces the size of the kernel by about 200 kB, as well as FUSE filesystems, allowing implementing filesystems without needing kernel modules.

Installation

As always, Phoenix can be installed with wget run https://phoenix.madefor.cc/install.lua. The installer has been updated to add the Luz kernel, as well as a confirmation prompt for passwords.

If you’re upgrading from 0.0.4, use sudo update to install the new packages. There are a few notes for upgrade:

  • A new configuration scheme was implemented for pxboot in 0.0.5, which causes a warning when booting, and some entries may be duplicated. To fix this, run sudo curl -R https://phoenix.madefor.cc/hotfixes/0.0.4-pxboot-config.lua, which will automatically rewrite the config to work with the new scheme, resolving the warning.
  • /etc/fstab has been updated, so dpkg will ask whether you want to replace it with the new version. The update isn’t super important, so it’s okay to skip it. If you use spanfs, keep the version you have installed.
  • A modification of some links will cause the upgrade of diskmgr to error - you can ignore this.
  • A few packages were downgraded to remove TypeScript typings. These will error when installing - you can ignore this.

Major Changes

Kernel

  • The kernel now executes system calls in a separate coroutine, which means that syscalls can now yield. This doesn’t mean much for the average user, but it streamlines a number of things internally.
  • Filesystem metadata is now only synced to the disk every second or so. This improves write performance significantly, especially on disks with lots of files, but it means that Ctrl+R may cause filesystem corruption. Always use sudo startctl reboot to reboot the system.
  • Network sockets (PSP) have gotten a significant amount of bugfixes. Among those are the new localIP method, which returns the IP of the interface the socket is associated with; the transfer method, which transfers a socket to the current process (useful if you create a socket in one process, then fork and want the new process to use the socket); and servers can now have multiple clients connected at once.
  • openterm and opengfx no longer throw an error when called twice in the same program - instead, the previously created handle is returned. This can simplify some operations for complex graphical apps.

libsystem

  • system.serialization now contains support for TOML files. TOML is a configuration language similar to INI and feels like Lua, and is used for config files in various managers.
  • system.expect now contains some “matcher” function generators that can be used to check that a table’s (or string’s) contents match an expected structure. These can be passed directly to expect.expect as a type argument.
  • system.process now contains variants of fork and start to run processes in the background. This means that these processes will be disconnected from the parent’s stdio handles before running. Use these functions when starting service programs, e.g. in startmgr .service files.

Luz

  • The new package luz adds support for Luz compression. Luz is a compression algorithm designed for Lua files that can reduce the size of the file by over 90%. The luz command can be used to compress, decompress, and run Lua/Luz files. You can also run .luz files directly, as it installs a kernel module that automatically decompresses any Luz file at runtime.
  • The phoenix-luz package contains a version of the kernel compressed with Luz, as well as a boot file with the required pxboot entries. This package is independent from phoenix, but it’s recommended to only have one installed at once (they share the same source file, so there’s no reason to have both). Luz compression saves about 200 kB of space on the kernel, but it will increase boot time by a little bit.

Networking

  • The new netutils package includes a number of programs that allow you to quickly configure networking information from the command line, using Linux-like programs. It includes the following programs: arp, dhclient, ifconfig, nc, ping, route.
  • The netmgr package includes a simple service that automatically configures network devices on startup. It can configure devices using DHCP or a static address, from a configuration file in /etc.
  • The dhcpmgr package includes a server for running DHCP on a network. This allows other computers on the same network to acquire an IP address from the server automatically. It is not recommended to run this on an Ender Modem (unless you’re in singleplayer) - this would result in the entire world’s IPs being controlled by your computer. If you’re the designated Phoenix master on the server, using an Ender Modem is fine; otherwise, keep things on their own local networks to avoid affecting other people.
  • The ftp package includes a File Transfer Protocol (FTP) client and server. You can use this to not only mount other shares as a local folder, but also to serve your own files to other computers using ftpmgr. The rich configuration allows creating multiple users with their own file roots, as well as passwords from either the config file or in usermgr as system users.