This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
HaddockDev's profile picture

Chameleon - your thoughts!

Started by HaddockDev, 02 February 2017 - 08:56 PM
HaddockDev #1
Posted 02 February 2017 - 09:56 PM
This is a project I've been working on for the past few days. It is a EFI-like bootloader (Kinda like the Mac bootloader)

It works like the Mac bootloader (or so I think), basically it gives you a second to put in a boot modifier and then loads Mac OS.
Basically, I have a front end (shown below) which is basically a looping loading screen. It may look like it is doing nothing but in reality it has a script running in the background. The script sets up the environment, then says "Hey, I'm finished, you can run this function now!". The function in question (ChameleonDone) MUST be defined in the script, or else the bootloader gets sad.



So far, I've been able to make OneOS able to run under Chameleon.

(You don't get to see the animation since it's in a emulator, it's that fast.)
(Another note, for some reason OneOS boots faster in Chameleon than it's native bootloader. It might be that I stripped a lot of code that was not needed though)

So, this is the tl;dr version of what Chameleon does:
  1. waits for boot modifier (z for shell, x for custom startup script)
  2. launches /boot
  3. while the animation is playing, the script is doing things to setup the environment (?)
  4. once the script is done it will launch the ChameleonDone function
  5. ???
  6. Profit!
There is a log function too, but it is mainly used for scripts.

I am going to release the source sometime tonight, along with the OneOS script.
Chameleon
OneOS start script (save to /boot)

Anyways, I'd like your thoughts on this and on how I could improve it.
Thanks for any feedback.

I'm not entirely sure if I'm/anybodys going to use this, but I decided to make it anyway.
Edited on 02 February 2017 - 09:37 PM
クデル #2
Posted 16 February 2017 - 06:52 AM
Pretty cool bootloader, I'll probably use it in conjunction with a new kernel and shell.