Because colorOS is not designed to be a general purpose operating system, but rather designed for using the Raspberry Pi as an Internet of Things (IoT) device, it is written so that it can be easily customized for each project to include just the desired features and services needed, excluding any features and services that are not required. The customization of features and services is defined within the coloros.h header file. After updating this file, a new operating system image can be built reflecting those customizations.
The colorOS operating system is currently tested and supported on the following Raspberry Pi models, using the specified image name (other models may work, but they are not tested or officially supported):
- Raspberry Pi 1B (Ethernet Only): kernel.img (32 bit)
- Raspberry Pi 2B (Ethernet Only): kernel7.img (32 bit)
- Raspberry Pi Zero 2W (WiFi Only): kernel8.img (64 bit)
- Raspberry Pi 3B (Ethernet & WiFi): kernel8.img (64 bit)
- Raspberry Pi 4B (Ethernet & WiFi): kernel8-rpi4.img (64 bit)
Enabling / Disabling Tasks
The following colorOS tasks can be enabled by defining these macros in coloros.h (prefix with // to disable):
#define CLUSTER - Cluster with other colorOS nodes
#define ECHO_SERVER - Run an echo server on port 7
#define TELNET_SERVER - Run a telnet server on port 23
#define WEB_SERVER - Run a web server on port 80
Enabling / Disabling Logins
Enable colorOS logins by defining these macros in coloros.h (prefix with // to disable, also enables read / write to SD card):
#define USE_LOGIN
#define DRIVE "SD:"
Networking
Enable colorOS networking by defining these macros in coloros.h (prefix with // to disable):
#define NETWORK - Enable networking
#define DHCP - Enable DHCP for dynamic IP address
If not using DHCP, disable the DHCP define, and define using the appropriate values for your network:
#if defined NETWORK && !defined DHCP
#define IPV4_ADDRESS {192, 168, 1, 66}
#define IPV4_MASK {255, 255, 255, 0}
#define IPV4_GATEWAY {192, 168, 1, 1}
#define IPV4_DNS {192, 168, 1, 1}
#endif
Define one of the following macros to define your network type (but never both):
#define ETHERNET - Enable Ethernet networking
#define WIFI - Enable WiFi networking
Adding New Commands
In addition to customizing the features and services built into colorOS, it is also possible to add new commands by writing C/C++ code and linking them into the operating system kernel.
How to Add New Commands
Building a New Customized Kernel Image
After any changes are made to the coloros.h header file, or new commands are added, the kernel image must be rebuilt to reflect those changes.