Chameleon

Chameleon Commit Details

Date:2010-01-31 05:55:21 (14 years 1 month ago)
Author:Pradeesh
Commit:53
Parents: 52
Message:+ few clean ups + thanks rekursor for letting me know where my mistake was (argh are you a cyborg ?) + umm where was i , uh yea , included 32bit and 64-bit argh (press and hold 3 and 2 together to boot into 32-bit)
Changes:
M/branches/prasys/i386/boot2/options.c
M/branches/prasys/i386/boot2
M/branches/prasys

File differences

branches/prasys/i386/boot2/options.c
724724
725725
726726
727
728
727729
728730
729
731
730732
731733
732734
......
736738
737739
738740
739
741
742
740743
741744
742745
......
769772
770773
771774
772
775
773776
774777
775
778
779
780
781
776782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
777800
778801
779802
* alt+v verbose (in mac its command +v)
* alt+x safe mode (aka boot args with -x , in macs its command +x)
* alt+l legacy mode (not sure why you need this)
* 6 +4 = 64-bit
* 3 + 2 = 32-bit
*/
{
bool f8 = false, altf = false, shiftf = false, alts = false, altv = false, altl = false, altx = false;
bool f8 = false, altf = false, shiftf = false, alts = false, altv = false, 32 = false, 64 = false altx = false;
int key;
while (readKeyboardStatus()) {
key = bgetc ();
if (key == 0x1F00) alts = true;
if (key == 0x2F00) altv = true;
if (key == 0x2D00) altx = true;
if (key == 0x2600) altl = true;
if (key == 0x0403) 32 = true;
if (key == 0x0705) 64 = true;
}
if (f8) {
gBootMode &= ~kBootModeQuiet;
//*(gBootArgsPtr++) = '';
//*(gBootArgsPtr++) = '';
}
if ((altl) && (gBootArgsPtr + 3 < gBootArgsEnd)) {
if ((32) && (gBootArgsPtr + 3 < gBootArgsEnd)) { // Boot into 32-bit Kernel
*(gBootArgsPtr++) = ' ';
*(gBootArgsPtr++) = '-';
*(gBootArgsPtr++) = 'legacy';
*(gBootArgsPtr++) = 'x';
*(gBootArgsPtr++) = '3';
*(gBootArgsPtr++) = '2';
// gBootArgsPtr only takes increasement by one char
}
if ((64) && (gBootArgsPtr + 3 < gBootArgsEnd)) { // Boot into 64-bit Kernel (in case those who are using 32-bit and wanna try 64-bit)
*(gBootArgsPtr++) = ' ';
*(gBootArgsPtr++) = '-';
*(gBootArgsPtr++) = 'x';
*(gBootArgsPtr++) = '6';
*(gBootArgsPtr++) = '4';
// gBootArgsPtr only takes increasement by one char
}
if ((altx) && (gBootArgsPtr + 5 < gBootArgsEnd)) {
*(gBootArgsPtr++) = ' ';
*(gBootArgsPtr++) = '-';
*(gBootArgsPtr++) = 'x';
//*(gBootArgsPtr++) = '';
//*(gBootArgsPtr++) = '';
}
}

Archive Download the corresponding diff file

Revision: 53