Chameleon

Chameleon Commit Details

Date:2015-01-30 22:26:32 (9 years 2 months ago)
Author:ErmaC
Commit:2570
Parents: 2569
Message:Typo
Changes:
M/branches/ErmaC/Enoch/package/po/ca.po
M/branches/ErmaC/Enoch/i386/boot2/options.c
M/branches/ErmaC/Enoch/package/po/sr.po
M/branches/ErmaC/Enoch/i386/boot2/modules.h
M/branches/ErmaC/Enoch/package/po/fa.po
M/branches/ErmaC/Enoch/i386/boot2/drivers.c
M/branches/ErmaC/Enoch/package/po/mk.po
M/branches/ErmaC/Enoch/package/po/hr.po
M/branches/ErmaC/Enoch/package/po/nl.po
M/branches/ErmaC/Enoch/package/po/pl.po
M/branches/ErmaC/Enoch/i386/boot2/boot.c
M/branches/ErmaC/Enoch/package/po/hu.po
M/branches/ErmaC/Enoch/i386/boot2/modules.c
M/branches/ErmaC/Enoch/i386/util/dyldsymboltool.c

File differences

branches/ErmaC/Enoch/i386/boot2/drivers.c
159159
160160
161161
162
162
163
163164
164165
165166
......
499500
500501
501502
502
503
504
503505
504
506
507
508
505509
506510
507511
......
512516
513517
514518
515
519
520
516521
517
522
523
524
518525
519526
520527
521528
522529
523
530
531
524532
525533
526534
......
528536
529537
530538
531
539
540
532541
533
542
543
544
534545
535546
536547
537548
538
549
550
539551
540552
541553
542554
543
555
556
544557
545558
546559
......
566579
567580
568581
569
582
583
570584
571585
572586
gTempSpec = malloc( 4096 );
gFileName = malloc( 4096 );
if ( !gExtensionsSpec || !gDriverSpec || !gFileSpec || !gTempSpec || !gFileName ) {
if ( !gExtensionsSpec || !gDriverSpec || !gFileSpec || !gTempSpec || !gFileName )
{
stop("InitDriverSupport error");
}
do{
// Save the driver path.
if(name) {
if(name)
{
snprintf(gFileSpec, 4096, "%s/%s/%s", dirSpec, name, (bundleType == kCFBundleType2) ? "Contents/MacOS/" : "");
} else {
}
else
{
snprintf(gFileSpec, 4096, "%s/%s", dirSpec, (bundleType == kCFBundleType2) ? "Contents/MacOS/" : "");
}
executablePathLength = strlen(gFileSpec) + 1;
}
strcpy(tmpExecutablePath, gFileSpec);
if(name) {
if(name)
{
snprintf(gFileSpec, 4096, "%s/%s", dirSpec, name);
} else {
}
else
{
snprintf(gFileSpec, 4096, "%s", dirSpec);
}
bundlePathLength = strlen(gFileSpec) + 1;
tmpBundlePath = malloc(bundlePathLength);
if (tmpBundlePath == 0) {
if (tmpBundlePath == 0)
{
break;
}
// Construct the file spec to the plist, then load it.
if(name) {
if(name)
{
snprintf(gFileSpec, 4096, "%s/%s/%sInfo.plist", dirSpec, name, (bundleType == kCFBundleType2) ? "Contents/" : "");
} else {
}
else
{
snprintf(gFileSpec, 4096, "%s/%sInfo.plist", dirSpec, (bundleType == kCFBundleType2) ? "Contents/" : "");
}
length = LoadFile(gFileSpec);
if (length == -1) {
if (length == -1)
{
break;
}
length = length + 1;
buffer = malloc(length);
if (buffer == 0) {
if (buffer == 0)
{
break;
}
strlcpy(buffer, (char *)kLoadAddr, length);
module->bundlePathLength = bundlePathLength;
module->plistAddr = malloc(length);
if ((module->executablePath == 0) || (module->bundlePath == 0) || (module->plistAddr == 0)) {
if ((module->executablePath == 0) || (module->bundlePath == 0) || (module->plistAddr == 0))
{
break;
}
branches/ErmaC/Enoch/i386/boot2/boot.c
423423
424424
425425
426
427
428
426
427
428
429429
430430
431431
bool firstRun = true;
bool instantMenu;
bool rescanPrompt;
intstatus;
unsigned intallowBVFlags = kBVFlagSystemVolume | kBVFlagForeignBoot;
unsigned intdenyBVFlags = kBVFlagEFISystem;
intstatus;
unsigned intallowBVFlags = kBVFlagSystemVolume | kBVFlagForeignBoot;
unsigned intdenyBVFlags = kBVFlagEFISystem;
// Set reminder to unload the PXE base code. Neglect to unload
// the base code will result in a hang or kernel panic.
branches/ErmaC/Enoch/i386/boot2/modules.c
11
2
2
33
44
55
......
3333
3434
3535
36
37
38
36
37
38
3939
4040
4141
......
142142
143143
144144
145
146
147
145
146
147
148148
149149
150150
/*
* Copyright 2010 Evan Lojewski. All rights reserved.
* Copyright 2010-2015 Evan Lojewski. All rights reserved.
*
*/
#include "boot.h"
static UInt64 textSection = 0;
/** Internal symbols, however there are accessor methods **/
moduleHook_t* moduleCallbacks = NULL;
moduleList_t* loadedModules = NULL;
symbolList_t* moduleSymbols = NULL;
moduleHook_t *moduleCallbacks = NULL;
moduleList_t *loadedModules = NULL;
symbolList_t *moduleSymbols = NULL;
unsigned int (*lookup_symbol)(const char*) = NULL;
char *strrchr(const char *s, int c)
return retVal;
}
void start_built_in_module(const char* name,
const char* author,
const char* description,
void start_built_in_module(const char *name,
const char *author,
const char *description,
UInt32 version,
UInt32 compat,
void(*start_function)(void))
branches/ErmaC/Enoch/i386/boot2/modules.h
11
22
3
3
44
55
66
......
1414
1515
1616
17
18
19
20
21
17
18
19
20
21
2222
2323
2424
......
2626
2727
2828
29
30
31
29
30
31
3232
3333
3434
......
4646
4747
4848
49
50
51
52
53
54
49
50
51
52
53
54
55
5556
5657
5758
......
5960
6061
6162
62
63
64
65
66
63
64
65
66
67
6768
6869
6970
/*
* Module Loading functionality
* Copyright 2009 Evan Lojewski. All rights reserved.
* Copyright 2009-2015 Evan Lojewski. All rights reserved.
*
*/
#define MODULE_PATH"/Extra/modules/"
#define SYMBOLS_MODULE "Symbols.dylib"
#define SYMBOLS_AUTHOR "Chameleon"
#define SYMBOLS_DESCRIPTION "Chameleon symbols for linking"
#define SYMBOLS_VERSION 0
#define SYMBOLS_COMPAT 0
#define SYMBOLS_MODULE"Symbols.dylib"
#define SYMBOLS_AUTHOR"Chameleon"
#define SYMBOLS_DESCRIPTION"Chameleon symbols for linking"
#define SYMBOLS_VERSION0
#define SYMBOLS_COMPAT0
#define VOID_SYMBOL"dyld_void_start"
typedef struct symbolList_t
{
char* symbol;
UInt64 addr;
struct symbolList_t* next;
char*symbol;
UInt64addr;
struct symbolList_t*next;
} symbolList_t;
typedef struct callbackList_t
typedef struct modulesList_t
{
const char*name;
const char* author;
const char* description;
UInt32version;
UInt32compat;
struct modulesList_t* next;
const char*name;
const char*author;
const char*description;
//const void*base;
UInt32version;
UInt32compat;
struct modulesList_t*next;
} moduleList_t;
int init_module_system();
void load_all_modules();
void start_built_in_module(const char* name,
const char* author,
const char* description,
UInt32 version,
UInt32 compat,
void start_built_in_module(const char*name,
const char*author,
const char*description,
UInt32version,
UInt32compat,
void(*start_function)(void));
int load_module(char* module);
branches/ErmaC/Enoch/i386/boot2/options.c
11041104
11051105
11061106
1107
1108
1107
1108
1109
1110
11091111
11101112
11111113
......
11211123
11221124
11231125
1124
1126
1127
11251128
11261129
11271130
......
11301133
11311134
11321135
1133
1136
1137
1138
11341139
11351140
11361141
......
15181523
15191524
15201525
1521
1526
15221527
15231528
15241529
// New behavior:
// Switch between text & graphic interfaces
// Only Permitted if started in graphics interface
if (useGUI) {
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
if (useGUI)
{
if (bootArgs->Video.v_display != VGA_TEXT_MODE)
{
setVideoMode(VGA_TEXT_MODE, 0);
setCursorPosition(0, 0, 0);
nextRow = kMenuTopRow;
showPrompt = true;
if (gDeviceCount) {
if (gDeviceCount)
{
printf("Use \30\31 keys to select the startup volume.");
showMenu(menuItems, gDeviceCount, selectIndex, kMenuTopRow + 2, kMenuMaxItems);
nextRow += MIN(gDeviceCount, kMenuMaxItems) + 3;
showPrompt = (gDeviceCount == 0) || (menuBVR->flags & kBVFlagNativeBoot);
showBootPrompt(nextRow, showPrompt);
//changeCursor( 0, kMenuTopRow, kCursorTypeUnderline, 0 );
} else {
}
else
{
gui.redraw = true;
setVideoMode(GRAPHICS_MODE, 0);
updateVRAM();
void showTextBuffer(char *buf_orig, int size)
{
char*bp;
char* buf;
char*buf;
intline;
intline_offset;
intc;
branches/ErmaC/Enoch/i386/util/dyldsymboltool.c
11
2
2
33
44
55
......
2222
2323
2424
25
25
2626
27
27
2828
2929
3030
3131
3232
3333
34
35
36
34
35
36
3737
3838
3939
......
116116
117117
118118
119
120
121
119
120
121
122122
123123
124124
......
135135
136136
137137
138
139
140
138
139
140
141141
142142
143143
......
153153
154154
155155
156
157
158
156
157
159158
160159
161160
......
183182
184183
185184
186
185
187186
188187
189188
......
193192
194193
195194
196
195
197196
198197
199198
......
204203
205204
206205
207
206
208207
209208
210209
......
216215
217216
218217
219
218
220219
221220
222221
/*
* Copyright (c) 2010 Evan Lojewski. All rights reserved.
* Copyright (c) 2010-2015 Evan Lojewski. All rights reserved.
*
*dyldsymboltool
*
typedef struct symbols_dylib
{
struct mach_headerheader;
struct mach_headerheader;
struct dylib_commanddylib_info;
charmodule_name[sizeof(DYLIB_NAME)];
charmodule_name[sizeof(DYLIB_NAME)];
struct symtab_commandsymtab;
} symbols_dylib_t;
typedef struct symbolList_t
{
char*name;
uint32_taddr;
intpos;
char*name;
uint32_taddr;
intpos;
struct symbolList_t*next;
} symbolList_t;
//exit(1);
}
else
{
add_symbol(&symbols, START_SYMBOL, start_addr);
else
{
add_symbol(&symbols, START_SYMBOL, start_addr);
}
/* Header command info */
dylib.dylib_info.cmd = LC_ID_DYLIB;
dylib.dylib_info.cmdsize = sizeof(struct dylib_command) + sizeof(dylib.module_name);// todo: verify
dylib.dylib_info.dylib.name.offset = sizeof(struct dylib_command);
dylib.dylib_info.dylib.timestamp = 0;// TODO: populate with time
dylib.dylib_info.dylib.current_version = 0;// TODO
dylib.dylib_info.dylib.compatibility_version = 0;// TODO
dylib.dylib_info.dylib.timestamp = 0;// TODO: populate with time
dylib.dylib_info.dylib.current_version = 0;// TODO
dylib.dylib_info.dylib.compatibility_version = 0;// TODO
//int offset = dylib.dylib_info.cmdsize%4 ? 4 - (dylib.dylib_info.cmdsize % 4) : 0;
dylib.symtab.stroff = sizeof(dylib) + dylib.symtab.nsyms * sizeof(struct nlist);
dylib.symtab.strsize = string_size(symbols);
dylib.symtab.cmdsize = sizeof(struct symtab_command);
FILE* outfile = fopen(argv[argc-1], "w");
fwrite(&dylib,sizeof(dylib)/* Sizeof header + module name */
, 1, outfile);
}
fwrite(orig,
dylib.symtab.stroff+// Sizeof symbol nlists
dylib.symtab.stroff+// Sizeof symbol nlists
dylib.symtab.strsize - sizeof(dylib) + 1// sizeof symbol strings
, 1, outfile);
exit(0);
}
int num_symbols(symbolList_t* list)
int num_symbols(symbolList_t *list)
{
int retVal = 0;
while(list)
return retVal;
}
int string_size(symbolList_t* list)
int string_size(symbolList_t *list)
{
int retVal = 0;
while(list)
}
void add_symbol(symbolList_t** list, char* name, uint32_t addr)
void add_symbol(symbolList_t **list, char *name, uint32_t addr)
{
symbolList_t* entry = malloc(sizeof(symbolList_t));
entry->next = (*list);
branches/ErmaC/Enoch/package/po/mk.po
88
99
1010
11
11
1212
1313
1414
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-01 21:43+0000\n"
"PO-Revision-Date: 2014-11-24 20:00-0000\n"
"PO-Revision-Date: 2015-01-18 03:30-0000\n"
"Last-Translator: ErmaC\n"
"Language-Team: mk <mk@li.org>\n"
"Language: mk\n"
branches/ErmaC/Enoch/package/po/nl.po
88
99
1010
11
11
1212
1313
1414
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-01 21:43+0000\n"
"PO-Revision-Date: 2014-11-24 19:59-0000\n"
"PO-Revision-Date: 2015-01-18 03:28-0000\n"
"Last-Translator: beta992 <beta992@gmail.com>\n"
"Language-Team: nl <nl@li.org>\n"
"Language: nl\n"
branches/ErmaC/Enoch/package/po/hr.po
88
99
1010
11
11
1212
1313
1414
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-01 21:43+0000\n"
"PO-Revision-Date: 2014-11-24 20:04-0000\n"
"PO-Revision-Date: 2015-01-18 03:31-0000\n"
"Last-Translator: Xpam.AmAdEuS <miljenkohalapir@outlook.com>\n"
"Language-Team: hr <hr@li.org>\n"
"Language: hr\n"
branches/ErmaC/Enoch/package/po/pl.po
88
99
1010
11
11
1212
1313
1414
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-01 21:43+0000\n"
"PO-Revision-Date: 2014-11-24 19:59-0000\n"
"PO-Revision-Date: 2015-01-18 03:27-0000\n"
"Last-Translator: oswaldini <oswaldinimtb@gmail.com>\n"
"Language-Team: pl <pl@li.org>\n"
"Language: pl\n"
branches/ErmaC/Enoch/package/po/hu.po
88
99
1010
11
11
1212
1313
1414
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-01 21:43+0000\n"
"PO-Revision-Date: 2014-11-24 20:03-0000\n"
"PO-Revision-Date: 2015-01-18 03:31-0000\n"
"Last-Translator: ErmaC\n"
"Language-Team: hu <hu@li.org>\n"
"Language: hu\n"
branches/ErmaC/Enoch/package/po/ca.po
88
99
1010
11
11
1212
1313
1414
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-01 21:43+0000\n"
"PO-Revision-Date: 2014-11-24 20:07-0000\n"
"PO-Revision-Date: 2015-01-18 03:29-0000\n"
"Last-Translator: ErmaC <ErmaC@insanelymac.com>\n"
"Language-Team: ca <ca@li.org>\n"
"Language: ca\n"
branches/ErmaC/Enoch/package/po/sr.po
88
99
1010
11
11
1212
1313
1414
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-01 21:43+0000\n"
"PO-Revision-Date: 2014-11-24 19:56-0000\n"
"PO-Revision-Date: 2015-01-18 03:29-0000\n"
"Last-Translator: ErmaC\n"
"Language-Team: sr <sr@li.org>\n"
"Language: sr\n"
branches/ErmaC/Enoch/package/po/fa.po
77
88
99
10
10
1111
1212
1313
......
601601
602602
603603
604
604
605605
606606
607607
......
613613
614614
615615
616
616
617617
618618
619619
......
623623
624624
625625
626
627
626
628627
629
628
630629
631630
632631
......
636635
637636
638637
639
640
638
641639
642
640
643641
644642
645643
......
651649
652650
653651
654
652
655653
656654
657655
......
23172315
23182316
23192317
2320
2318
23212319
23222320
23232321
......
23292327
23302328
23312329
2332
2330
23332331
23342332
23352333
......
23562354
23572355
23582356
2359
2357
23602358
23612359
23622360
......
23682366
23692367
23702368
2371
2369
23722370
23732371
23742372
......
23842382
23852383
23862384
2387
2385
23882386
23892387
23902388
......
23962394
23972395
23982396
2399
2397
24002398
24012399
24022400
msgstr ""
"Project-Id-Version: Chameleon 2.3\n"
"POT-Creation-Date: 2015-01-01 21:43+0000\n"
"PO-Revision-Date: 2014-01-05 13:57+0000\n"
"PO-Revision-Date: 2015-01-18 03:33-0000\n"
"Last-Translator: minlite <miromarkarian@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: fa\n"
#: Resources/templates/Localizable.strings:126
#, no-wrap
msgid "PrivateData=No"
msgstr ""
msgstr "‏PrivateData=No"
#. type: "PrivateData_description"
#: Resources/templates/Localizable.strings:127
#: Resources/templates/Localizable.strings:131
#, no-wrap
msgid "USBBusFix=Yes"
msgstr ""
msgstr "‏USBBusFix=Yes"
#. type: "USBBusFix_description"
#: Resources/templates/Localizable.strings:132
#. type: "USBLegacyOff_title"
#: Resources/templates/Localizable.strings:134
#, fuzzy, no-wrap
#| msgid "LegacyLogo=Yes"
#, no-wrap
msgid "USBLegacyOff=Yes"
msgstr "LegacyLogo=Yes"
msgstr "‏LegacyLogo=YesUSBLegacyOff=Yes"
#. type: "USBLegacyOff_description"
#: Resources/templates/Localizable.strings:135
#. type: "XHCILegacyOff_title"
#: Resources/templates/Localizable.strings:137
#, fuzzy, no-wrap
#| msgid "LegacyLogo=Yes"
#, no-wrap
msgid "XHCILegacyOff=Yes"
msgstr "LegacyLogo=Yes"
msgstr "‏XHCILegacyOff=Yes"
#. type: "XHCILegacyOff_description"
#: Resources/templates/Localizable.strings:138
#: Resources/templates/Localizable.strings:140
#, no-wrap
msgid "UHCIreset=Yes"
msgstr ""
msgstr "‏UHCIreset=Yes"
#. type: "UHCIreset_description"
#: Resources/templates/Localizable.strings:141
#: Resources/templates/Localizable.strings:635
#, no-wrap
msgid "npci=0x2000"
msgstr ""
msgstr "‏npci=0x2000"
#. type: "Npci_description"
#: Resources/templates/Localizable.strings:636
#: Resources/templates/Localizable.strings:638
#, no-wrap
msgid "npci=0x3000"
msgstr ""
msgstr "‏npci=0x3000"
#. type: "Npci3_description"
#: Resources/templates/Localizable.strings:639
#: Resources/templates/Localizable.strings:646
#, no-wrap
msgid "darkwake=0"
msgstr ""
msgstr "‏darkwake=0"
#. type: "Darkwake_description"
#: Resources/templates/Localizable.strings:647
#: Resources/templates/Localizable.strings:649
#, no-wrap
msgid "nvda_drv=1"
msgstr ""
msgstr "‏nvda_drv=1"
#. type: "NvdaDrv1_description"
#: Resources/templates/Localizable.strings:650
#: Resources/templates/Localizable.strings:655
#, no-wrap
msgid "kext-dev-mode=1"
msgstr ""
msgstr "‏kext-dev-mode=1"
#. type: "kext-dev-mode1_description"
#: Resources/templates/Localizable.strings:656
#: Resources/templates/Localizable.strings:658
#, no-wrap
msgid "dart=0"
msgstr ""
msgstr "‏dart=0"
#. type: "Dart0_description"
#: Resources/templates/Localizable.strings:659

Archive Download the corresponding diff file

Revision: 2570