First a word of thanks to rookie1 for putting this idea in my head and get me cracking on the code. (checkout his thread: [ADV](multi)u-boot v0.1). The idea is to present a boot menu of options to select the boot order for the NC.
I have implemented a set of custom console management functions (see sources below) which can be used to display any text based interface, there is support for Portrait/Landscape orientation and two font sizes are supported (Warning! Large font sizes look extremely ugly so I haven't compiled the binary with large fonts, if anyone needs it PM, me and I can send it to you via email)
Presented here is a compiled version of the u-boot.bin binary which has default font scaling and Portrait mode selected.
Installation
Simply use the u-boot.bin from the zip file attached with the post and follow rookie1's installation instructions from the his post linked above.
Important: Backup the original u-boot.bin in case you need to restore it in the future
Usage
To get to the boot menu, simply press any key within 5 seconds when the prompt appears.
There are two options to select and each one of them has alternatives to chose from:
Boot device enables the selection of the boot device. For the NC, there are just two options i.e eMMC (internal) or SD card.
Boot mode allows the selection of the kernel + ramdisk combo, which is then booted off from the selected Boot device:
This allows for the creation of dual boot setups where uAltImg + uAltRam files can be created to support a second OS or maybe overclocked kernels. Follow your favorite method for creating these as I'm not going to expand into the topic of dual boot setups here.
Follow the on-screen key usage guide to navigate the boot menu.
Default Behavior
When no key is pressed and the NC is powered up normally, the boot behavior is to boot into the normal (files: uImage + uRamdisk) found on the boot device, hence:
- When u-boot.bin is installed on the eMMC, the uImage + uRamdisk files are from eMMC
- When u-boot.bin is installed on the SD card, the uImage + uRamdisk files are from SD card.
Setting default Boot Device
A file named "u-boot.device" can be created at the same location where u-boot.bin is installed to control the default boot device. The contents of this file determine the boot device selected at boot.
The value of "0" means SD card and "1" means eMMC. So for example if installing u-boot.bin on the SD card, one wants to set the default boot device to be eMMC instead of the SD card, then the following can setup the u-boot.device file:
This is similar to the file u-boot.order as mentioned in rookie1's original post, but it only takes 1 byte instead of 2 in that case.
This is useful in case when you want to lend your nook to your girlfriend and have the stock BN Eclair installed on eMMC and HC on the SD card. This way you can setup u-boot.bin on the SD card along with the u-boot.device file pointing to eMMC and have the NC boot into stock even with the SD card inserted. Whenever you want to boot into HC, simply get into the boot menu and select SD + normal!!
Think of these choices as selecting the appropriate kernel + ramdisk images from either the eMMC (internal memory of the NC) or the SD card. Other exotic options like for example selecting uImage from eMMC and uRamdisk from the SD card are currently not supported.
Files
u-boot.bin_v0.4.zip - contains the u-boot.bin
Sources
(updated with v0.4 changes)
https://github.com/j4mm3r/bn_nc_u-boot/tree/boot_menu
Changelog
v0.4:
Now uses Portrait orientation for display
Implemented custom console functions that support:
Font scaling (default or double size)
Portait/Landscape mode
Added support for Portrait/Landscape mode
Changed keys to suit Portrait orientation
v0.3:
Cleaned up sources, misc fixes
Missed the power key (Press any key?)
v0.2:
Improved lcd console display
Supports alternate boot mode
Supports setting up a default boot device
v0.1:
Initial release
I'm lazy...
Make CWR installable zip (SD and eMMC versions)
A few words of caution: Please don't use this if you don't understand what you are doing and remember all the usual disclaimers and warnings apply here as well.
Furthermore, I target this thread towards developers and advanced users so I have deliberately left out user friendly instructions. Feel free to incorporate it into your own custom ROM/CWR release.
Enjoy!
I have implemented a set of custom console management functions (see sources below) which can be used to display any text based interface, there is support for Portrait/Landscape orientation and two font sizes are supported (Warning! Large font sizes look extremely ugly so I haven't compiled the binary with large fonts, if anyone needs it PM, me and I can send it to you via email)
Presented here is a compiled version of the u-boot.bin binary which has default font scaling and Portrait mode selected.
Installation
Simply use the u-boot.bin from the zip file attached with the post and follow rookie1's installation instructions from the his post linked above.
Important: Backup the original u-boot.bin in case you need to restore it in the future
Usage
To get to the boot menu, simply press any key within 5 seconds when the prompt appears.
There are two options to select and each one of them has alternatives to chose from:
- Boot Device
Select between: eMMC and SD
- Boot Mode
Select between: normal, recovery and alternative
Boot device enables the selection of the boot device. For the NC, there are just two options i.e eMMC (internal) or SD card.
Boot mode allows the selection of the kernel + ramdisk combo, which is then booted off from the selected Boot device:
- normal mode: kernel image file is "uImage" and ramdisk file is "uRamDisk"
- recovery mode: kernel image file is "uRecImg" and ramdisk file is "uRecRam"
- alternate mode: kernel image file is "uAltImg" and ramdisk file is "uAltRam"
This allows for the creation of dual boot setups where uAltImg + uAltRam files can be created to support a second OS or maybe overclocked kernels. Follow your favorite method for creating these as I'm not going to expand into the topic of dual boot setups here.
Follow the on-screen key usage guide to navigate the boot menu.
Default Behavior
When no key is pressed and the NC is powered up normally, the boot behavior is to boot into the normal (files: uImage + uRamdisk) found on the boot device, hence:
- When u-boot.bin is installed on the eMMC, the uImage + uRamdisk files are from eMMC
- When u-boot.bin is installed on the SD card, the uImage + uRamdisk files are from SD card.
Setting default Boot Device
A file named "u-boot.device" can be created at the same location where u-boot.bin is installed to control the default boot device. The contents of this file determine the boot device selected at boot.
The value of "0" means SD card and "1" means eMMC. So for example if installing u-boot.bin on the SD card, one wants to set the default boot device to be eMMC instead of the SD card, then the following can setup the u-boot.device file:
Code:
# echo -n "1" > /media/SDCARD/u-boot.device
This is useful in case when you want to lend your nook to your girlfriend and have the stock BN Eclair installed on eMMC and HC on the SD card. This way you can setup u-boot.bin on the SD card along with the u-boot.device file pointing to eMMC and have the NC boot into stock even with the SD card inserted. Whenever you want to boot into HC, simply get into the boot menu and select SD + normal!!
Think of these choices as selecting the appropriate kernel + ramdisk images from either the eMMC (internal memory of the NC) or the SD card. Other exotic options like for example selecting uImage from eMMC and uRamdisk from the SD card are currently not supported.
Files
u-boot.bin_v0.4.zip - contains the u-boot.bin
Sources
(updated with v0.4 changes)
https://github.com/j4mm3r/bn_nc_u-boot/tree/boot_menu
Changelog
v0.4:
Now uses Portrait orientation for display
Implemented custom console functions that support:
Font scaling (default or double size)
Portait/Landscape mode
Added support for Portrait/Landscape mode
Changed keys to suit Portrait orientation
v0.3:
Cleaned up sources, misc fixes
Missed the power key (Press any key?)
v0.2:
Improved lcd console display
Supports alternate boot mode
Supports setting up a default boot device
v0.1:
Initial release
I'm lazy...
Make CWR installable zip (SD and eMMC versions)
A few words of caution: Please don't use this if you don't understand what you are doing and remember all the usual disclaimers and warnings apply here as well.
Furthermore, I target this thread towards developers and advanced users so I have deliberately left out user friendly instructions. Feel free to incorporate it into your own custom ROM/CWR release.
Enjoy!
Attachments
Last edited: