Say what? SmartOS is based on illumos, the only free, open source SVR4 UNIX out there.
Get the code: https://github.com/joyent/illumos-joyent
Build it! https://wiki.smartos.org/display/DOC/Building+SmartOS+on+Sma...
Modify it: https://wiki.smartos.org/display/DOC/SmartOS+Developers+Guid...