Chameleon

Chameleon Commit Details

Date:2011-06-09 02:42:41 (12 years 10 months ago)
Author:Azimutz
Commit:997
Parents: 996
Message:Fixed but not synced, since i seem to have messed the trunk a bit... damn svn:mergeinfo properties...
Changes:
M/branches/azimutz/trunkAutoResolution/i386/libsaio/bootstruct.h
M/branches/azimutz/trunkAutoResolution/i386/libsaio/console.c
M/branches/azimutz/trunkAutoResolution/doc/BootHelp.txt
M/branches/azimutz/trunkAutoResolution/i386/boot2/graphics.c
M/branches/azimutz/trunkAutoResolution
M/branches/azimutz/trunkAutoResolution/i386/libsaio/bootstruct.c
M/branches/azimutz/trunkAutoResolution/version
M/branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c

File differences

branches/azimutz/trunkAutoResolution/version
1
1
2.0-RC5
2.0-RC5 trunkAutoResolution
branches/azimutz/trunkAutoResolution/i386/libsaio/console.c
5353
5454
5555
56
57
58
59
60
61
62
63
56
57
58
59
60
61
62
63
6464
6565
6666
6767
6868
6969
70
70
7171
7272
7373
7474
7575
7676
77
77
7878
7979
8080
bool gVerboseMode;
bool gErrors;
/** Kabyl: BooterLog
Azi: Doubled available log size; this seems to fix some hangs and instant reboots caused by
booting with -f (ignore caches). 96kb are enough to hold full log, booting with -f; even so,
this depends on how much we "play" at the boot prompt and with what patches we're playing,
depending on how much they print to the log.
**/ //Azi: closing **/ alows colapse/expand... is this desirable?? colapsing an entire page
// will also colapse comments....
/*
* Azi: Doubled available log size; this seems to fix some hangs and instant reboots caused by
* booting with -f (ignore caches). 96kb are enough to hold full log, booting with -f; even so,
* this depends on how much we "play" at the boot prompt and with what patches we're playing,
* depending on how much they print to the log.
*
* Kabyl: BooterLog
*/
#define BOOTER_LOG_SIZE(128 * 1024)
#define SAFE_LOG_SIZE134
char *msgbuf = 0;
char *cursor = 0;
struct putc_info //Azi: same as below
struct putc_info
{
char * str;
char * last_str;
};
static int
sputc(int c, struct putc_info * pi) //Azi: exists on printf.c & gui.c
sputc(int c, struct putc_info * pi)
{
if (pi->last_str)
if (pi->str == pi->last_str)
branches/azimutz/trunkAutoResolution/i386/libsaio/bootstruct.c
116116
117117
118118
119
119
120
120121
121122
122123
bootArgs = (boot_args *)AllocateKernelMemory(sizeof(boot_args));
bcopy(oldAddr, bootArgs, sizeof(boot_args));
}
else {
else
{
void *oldAddr = bootArgsPreLion;
bootArgsPreLion = (boot_args_pre_lion *)AllocateKernelMemory(sizeof(boot_args_pre_lion));
bcopy(oldAddr, bootArgsPreLion, sizeof(boot_args_pre_lion));
branches/azimutz/trunkAutoResolution/i386/libsaio/bootstruct.h
1
1
22
33
44
......
3030
3131
3232
33
33
3434
3535
3636
/** <-- JavaDoc style (doxygen) //Azi
/*
* Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
#include "bios.h"
#include "device_tree.h"
/*! <-- QT style (doxygen) //Azi
/*!
Kernel boot args global also used by booter for its own data.
*/
extern boot_args *bootArgs;
branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c
13181318
13191319
13201320
1321
1322
1321
1322
13231323
1324
1324
13251325
13261326
1327
1327
13281328
1329
1330
13291331
13301332
13311333
1332
1334
13331335
1334
1335
1336
13371336
13381337
13391338
1340
1341
1339
1340
13421341
1343
1342
13441343
13451344
1346
13471345
1346
1347
13481348
13491349
1350
1351
1352
1350
13531351
1352
13541353
1355
13561354
13571355
13581356
......
13701368
13711369
13721370
1371
1372
13731373
13741374
1375
13761375
13771376
13781377
}
}
if (getValueForKey(kdcfg0, &value, &len, &bootInfo->bootConfig) && len == DCFG0_LEN * 2)
{
if (getValueForKey(kdcfg0, &value, &len, &bootInfo->bootConfig) && len == DCFG0_LEN * 2){
uint8_t new_dcfg0[DCFG0_LEN];
if (hex2bin(value, new_dcfg0, DCFG0_LEN) == 0)
{
verbose("Using user supplied @0,display-cfg\n");
memcpy(default_dcfg_0, new_dcfg0, DCFG0_LEN);
verbose("Using user supplied @0,display-cfg\n");
printf("@0,display-cfg: %02x%02x%02x%02x\n",
default_dcfg_0[0], default_dcfg_0[1], default_dcfg_0[2], default_dcfg_0[3]);
devprop_add_value(device, "@0,display-cfg", default_dcfg_0, DCFG0_LEN);
}
}
if (getValueForKey(kdcfg1, &value, &len, &bootInfo->bootConfig) && len == DCFG1_LEN * 2)
{
if (getValueForKey(kdcfg1, &value, &len, &bootInfo->bootConfig) && len == DCFG1_LEN * 2){
uint8_t new_dcfg1[DCFG1_LEN];
if (hex2bin(value, new_dcfg1, DCFG1_LEN) == 0)
{
verbose("Using user supplied @1,display-cfg\n");
memcpy(default_dcfg_1, new_dcfg1, DCFG1_LEN);
verbose("Using user supplied @1,display-cfg\n");
printf("@1,display-cfg: %02x%02x%02x%02x\n",
default_dcfg_1[0], default_dcfg_1[1], default_dcfg_1[2], default_dcfg_1[3]);
devprop_add_value(device, "@1,display-cfg", default_dcfg_1, DCFG1_LEN);
}
}
devprop_add_value(device, "VRAM,totalsize", (uint8_t*)&videoRam, 4);
devprop_add_value(device, "model", (uint8_t*)model, strlen(model) + 1);
devprop_add_value(device, "rom-revision", (uint8_t*)biosVersion, strlen(biosVersion) + 1);
devprop_add_value(device, "@0,display-cfg", default_dcfg_0, DCFG0_LEN);
devprop_add_value(device, "@1,display-cfg", default_dcfg_1, DCFG1_LEN);
if (getBoolForKey(kVBIOS, &doit, &bootInfo->bootConfig) && doit) {
devprop_add_value(device, "vbios", rom, (nvBiosOveride > 0) ? nvBiosOveride : (rom[2] * 512));
}
branches/azimutz/trunkAutoResolution/i386/boot2/graphics.c
431431
432432
433433
434
435434
436435
437436
//Azi:autoresolution
#ifdef AUTORES_DEBUG
//Azi: who? who is about to set?? :P
PRINT("Is about to set mode #%d with resolution %dx%d\n", mode, minfo.XResolution, minfo.YResolution);
//getc(); //Azi: boot hangs, on the second call (like "old" Wait=y issue and usb fixes).
sleep(2);
branches/azimutz/trunkAutoResolution/doc/BootHelp.txt
11
22
33
4
4
55
66
77
......
1717
1818
1919
20
20
2121
2222
2323
......
2525
2626
2727
28
29
28
29
3030
3131
3232
......
4545
4646
4747
48
48
4949
5050
51
51
5252
5353
5454
......
5757
5858
5959
60
60
6161
6262
6363
......
6666
6767
6868
69
69
7070
7171
7272
7373
74
74
7575
76
76
7777
7878
79
80
81
82
79
80
8381
8482
8583
......
9391
9492
9593
96
94
9795
9896
9997
100
98
10199
102100
103101
......
110108
111109
112110
113
111
114112
115113
116114
......
118116
119117
120118
121
119
122120
123121
124122
The boot: prompt waits for you to type advanced startup options.
If you don't type anything, the computer continues starting up normally. It
uses the kernel and configuration files on the startup device, which it also
uses as the root device.
uses as the root device.
Advanced startup options use the following syntax:
flags: -v (verbose) -s (single user mode)
-x (safe mode) -f (ignore caches)
-F (ignore "Kernel Flags" specified in boot configuration file)
"Graphics Mode"="WIDTHxHEIGHTxDEPTH" (e.g. "1024x768x32")
kernel flags (e.g. debug=0x144)
Example: mach_kernel rd=disk0s1 -v "Graphics Mode"="1920x1200x32"
If the computer won't start up properly, you may be able to start it up
using safe mode. Type -x to start up in safe mode, which ignores all
If the computer won't start up properly, you may be able to start it up
using safe mode. Type -x to start up in safe mode, which ignores all
cached driver files.
Special booter hotkeys:
Wait=Yes|No Prompt for a key press before starting the kernel.
"Quiet Boot"=Yes|No Use quiet boot mode (no messages or prompt).
Timeout=8 Number of seconds to pause at the boot: prompt.
"Instant Menu"=Yes Force displaying the partition selection menu.
"Instant Menu"=Yes Force displaying the partition selection menu.
"Default Partition" Sets the default boot partition,
=hd(x,y)|UUID|"Label" Specified as a disk/partition pair, an UUID, or a
=hd(x,y)|UUID|"Label" Specified as a disk/partition pair, an UUID, or a
label enclosed in quotes.
"Hide Partition" Remove unwanted partition(s) from the boot menu.
"Rename Partition" Rename partition(s) for the boot menu.
=partition <alias> Where partition is hd(x,y), UUID or label enclosed
[;partition2 <alias2> in quotes. The alias can optionally be quoted too.
[;partition2 <alias2> in quotes. The alias can optionally be quoted too.
...]
GUI=No Disable the GUI (enabled by default).
PciRoot=<value> Use an alternate value for PciRoot (default value 0).
UseKernelCache=Yes|No Default is No. Yes will load pre-linked kernel and will
UseKernelCache=Yes|No Default is No. Yes will load pre-linked kernel and will
ignore /E/E and /S/L/E/Extensions.mkext.
GraphicsEnabler=Yes|No Automatic device-properties generation for gfx cards.
AtiConfig=<cardcfg> Use a different card config
UseAtiROM=Yes|No Use an alternate Ati ROM image
UseAtiROM=Yes|No Use an alternate Ati ROM image
(path: /Extra/<vendorid>_<devid>_<subsysid>.rom)
UseNvidiaROM=Yes|No Use an alternate Nvidia ROM image
UseNvidiaROM=Yes|No Use an alternate Nvidia ROM image
(path: /Extra/<vendorid>_<devid>.rom)
VBIOS=Yes|No Inject NVIDIA VBIOS into device-properties.
display_0=<value> Inject alternate value of display-cfg into NVDA,Display-A@0.
MUST BE 8 Chars in length (HEX)
display_1=<value> Inject alternate value of display-cfg into NVDA,Display-B@1.
MUST BE 8 Chars in length (HEX)
display_0=<value> Inject alternate value of display-cfg into NVDA,Display-A@0 (HEX).
display_1=<value> Inject alternate value of display-cfg into NVDA,Display-B@1 (HEX).
EthernetBuiltIn=Yes|No Automatic "built-in"=yes device-properties generation
for ethernet interfaces.
Wake=No Disable wake up after hibernation (default: enabled).
ForceWake=Yes Force using the sleepimage (disabled by default).
WakeImage=<file> Use an alternate sleepimage file.
WakeImage=<file> Use an alternate sleepimage file.
(default path is /private/var/vm/sleepimage).
DropSSDT=Yes Skip the SSDT tables while relocating the ACPI tables.
DSDT=<file> Use an alternate DSDT.aml file
DSDT=<file> Use an alternate DSDT.aml file
(default paths:
/DSDT.aml /Extra/DSDT.aml bt(0,0)/Extra/DSDT.aml).
EnableC3State=Yes Enable specific Processor power state, C3.
EnableC4State=Yes Enable specific Processor power state, C4.
SMBIOS=<file> Use an alternate SMBIOS.plist file
SMBIOS=<file> Use an alternate SMBIOS.plist file
(default paths:
/Extra/SMBIOS.plist bt(0,0)/Extra/SMBIOS.plist).
smbios.plist doesn't exist, factory values are kept.
"Scan Single Drive" Scan the drive only where the booter got loaded from.
=Yes|No Fix rescan pbs when using a DVD reader in AHCI mode.
=Yes|No Fix rescan pbs when using a DVD reader in AHCI mode.
Rescan=Yes Enable CD-ROM rescan mode.
"Rescan Prompt"=Yes Prompts for enable CD-ROM rescan mode.
SystemId=<UUID> Set manually the system id UUID,

Archive Download the corresponding diff file

Revision: 997