Originally Posted by SilentStormer
I know this isnt really completely OT, I have a vision for what this bootloader could be like. Imagine a bootlosder where you could create custom profiles for your favorite ROMs and chose between them at startup. You could specify a name and then specify the zip or recovery file you wanted it to run. It would automatically take the necessary steps to install such as wiping data and dalvik etc etc. I'm picturing something that's super easy to use and easy to set up and maybe this is more in the idea of a recovery instead of a boot loader but I could see it happening here too. Hope you like the idea!
Sent from my Cyanogenmod 9 Alpha 0 Nook Tablet
You're describing a recovery. Remember-- the bootloader loads BEFORE any operating system-- before even a kernel is loaded! It has full access to the hardware, but few drivers at this point, and it can't do much-- the only file system it can read I think is vfat, and it can't even create a file from scratch, only read or modify an existing file by copying its contents directly into memory or dump memory into the file.
Think of the bootloader, programatically, as sorta like a big program that runs in a primitive DOS environment. Most of what it does is initialize hardware and then start the kernel, but it has a very limited ability to read files and detect what should happen as far as which kernel it should load.
The fact that it has a console (ie, can write text to the screen) and a menu system and all that is stuff I (crudely) added... it's not using any kind of API or screen drawing libraries or anything-- it's just one big C program calling functions that draw the characters to the screen as a bitmap pixel by pixel, and it's reading raw input from the button presses.... The menu all had to be written starting with a blank file called "menu.c" and going from there... I used parts of the stuff I did for nook color (which was in turn based on stuff from J4mm3r), but it was kind of a rethink.
To do installation of zips pretty much is perfectly suited for a recovery environment, and everything you propose would be great for someone enhancing CWM. But for the bootloader, it should be simple and lightweight, I think.
For the feature where you talk about "custom profiles for your favorite ROMs"-- that is what the altboot configuration is for. You can set up a 2nd kernel/ramdisk to be whatever you want-- a recovery, or another OS, or whatever.
This is being used to great effect in Nook Colorworld, where user "racks" has created a dualboot cm7/cm9 SD card. So you can boot from either at will off SD. It works well with CyanBoot