04/12/2010, 08:33 AM
WebOS Internals has a charter of exploring the boundaries of low-level development for webOS-based devices, and then making the results of those explorations easily and safely installable for the mainstream webOS device user.
Now that the Preware and Save/Restore have mature 1.0 versions, it is time to turn our attention to the issue of next generation kernel development and packaging.
The Linux kernel is a very special item in the Linux operating system upon which webOS sits. The Linux kernel is always running, and is intended to be the sole interface to the underlying hardware. There is only ever one Linux kernel running on a webOS device, and it is the root upon which the security and functionality of the device is built. The kernel cannot be easily changed while the device is running (it requires a reboot to take effect), therefore users are forced to choose one kernel, and one kernel alone to meet their needs.
It is for these reasons that the processes for kernel development and kernel packaging are of critical importance. Some would argue that the processes for kernel development and packaging are even more important than the results obtained by the output of such processes ...
In this thread, we will outline the principles and criteria that we believe must be taken into account when developing and packaging replacement Linux kernels for webOS devices.
- The kernel must be built from publicly available source code.
This is a key requirement of the GNU Public License (the license that the Linux kernel uses). It is also critical to ensuring the continual sharing of, and building upon, improvements to the kernel.
- The kernel build process must be transparent to all, and must be repeatable by any third party using a publicly available build system.
This is a key requirement to ensure that the security and functionality of a replacement kernel can be trusted, and to ensure that no one single party can take a strangle-hold on kernel development (and that includes making sure that WebOS Internals does not have such a position).
- A replacement kernel must be uniquely identifiable.
Users and utilities must be able to determine at run-time the precise origin and pedigree of a replacement kernel, without relying on a user's memory of the installation process, or installation database files on volatile storage.
- A replacement kernel must not differ from the stock kernel at boot.
Any differences must be enabled by scripts, services or applications. New capabilities may be built into a replacement kernel, but they must be disabled by default. This requirement ensures a fail-safe scenario for kernels in the presence of OTA updates and partial erasure mechanisms. The requirement also allows multiple independent improvements to the kernel to be rolled into a single package and independently enabled at run-time as per the user's wishes.
- The stock vendor kernel must be available at all times as an installable option.
The user must be able to safely revert to the vendor kernel, even in the presence of bugs in the uninstall mechanisms for replacement kernels.
- A replacement kernel must verify that the files it is replacing have not been previously modified in any way.
This is to ensure that the new kernel is being installed into a known environment. This also applies when putting files back on uninstall. An exception to this principle is a recovery kernel, which is designed to forcibly overwrite any kernel files to ensure a correct recovery.
- A replacement kernel must verify that it is being installed on the correct version of webOS, and must refuse to install or correctly uninstall if the version is different.
Since each webOS version is likely to kernel changes, and the rest of the operating system is likely to assume that those changes are in place, it is important for fail-safe characteristics for a replacement kernel to refuse to install or safely uninstall on a different webOS version.
- I'm sure we'll think of, and get good suggestions for, others as we go down this path ... and we'll update this list if we do.
Based on these principles, WebOS Internals is embarking on the development of a number of replacement kernels for webOS devices.
- Palm Kernel
This kernel is simply the standard unmodified vendor kernel binaries, extracted directly from the webOS Doctor, available as an installable option for reverting back to the standard kernel when all other uninstallation options fail. It will forcibly install over the top of any other kernel, removes any other installed WebOS Internals custom kernels, and does nothing when you remove the package.
A collection of all the best (in the subjective opinion of the WebOS Internals kernel team) kernel improvements for the Palm Pre that comply with the above principles, all rolled into a single OTA-safe installation package.
As well as developing these kernels, we have also upgraded the rest of the open standard homebrew ecosystem to understand and work with replacement kernels.
To use the UberKernel, simply install the Govnah application and the UberKernel from Preware.
Those people who are interested in participating in the development of replacement kernel design and packaging solutions should make themselves known in the #webos-internals IRC channel.
-- Rod (on behalf of the WebOS Internals kernel team)