Chameleon

Chameleon Commit Details

Date:2010-12-24 18:08:28 (13 years 4 months ago)
Author:Evan Lojewski
Commit:690
Parents: 689
Message:Compiles again. Only tested with Xcode 4.
Changes:
M/branches/meklort/i386/cdboot/Makefile
M/branches/meklort/i386/libsaio/md5c.c
M/branches/meklort/i386/modules/MakeInc.dir
M/branches/meklort/i386/modules/klibc/strxspn.c
M/branches/meklort/i386/boot0/Makefile
M/branches/meklort/i386/boot1/Makefile
M/branches/meklort/i386/libsa/string.c
M/branches/meklort/i386/boot2/Makefile

File differences

branches/meklort/i386/libsaio/md5c.c
2828
2929
3030
31
31
3232
33
34
35
36
37
38
3933
4034
4135
......
4337
4438
4539
46
47
48
49
50
51
5240
5341
54
5542
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
9743
9844
9945
* edited for clarity and style only.
*/
#include <sys/types.h>
#include "libsaio.h"
#ifdef KERNEL
#include <sys/systm.h>
#else
#include <string.h>
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
# include <Kernel/libkern/crypto/md5.h>
#else
#endif
#ifdef KERNEL
#define memset(x,y,z)bzero(x,z);
#define memcpy(x,y,z)bcopy(y, x, z)
#endif
#if defined(__i386__) || defined(__alpha__)
#define Encode memcpy
#define Decode memcpy
#else /* __i386__ */
/*
* Encodes input (u_int32_t) into output (unsigned char). Assumes len is
* a multiple of 4.
*/
/* XXX not prototyped, and not compatible with memcpy(). */
static void
Encode (output, input, len)
unsigned char *output;
u_int32_t *input;
unsigned int len;
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4) {
output[j] = (unsigned char)(input[i] & 0xff);
output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
}
}
/*
* Decodes input (unsigned char) into output (u_int32_t). Assumes len is
* a multiple of 4.
*/
static void
Decode (output, input, len)
u_int32_t *output;
const unsigned char *input;
unsigned int len;
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) |
(((u_int32_t)input[j+2]) << 16) | (((u_int32_t)input[j+3]) << 24);
}
#endif /* i386 */
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
branches/meklort/i386/boot0/Makefile
22
33
44
5
5
6
67
78
89
910
1011
11
12
1213
1314
1415
DIR = boot0
include ../MakePaths.dir
NASM = /Developer/usr/bin/nasm
NASM = $(shell which nasm)
#/Developer/usr/bin/nasm
INSTALLDIR = $(DSTROOT)/usr/standalone/i386
DIRS_NEEDED = $(SYMROOT)
all embedtheme optionrom: $(DIRS_NEEDED) boot0 boot0hfs chain0
boot0: boot0.s Makefile $(NASM)
boot0: boot0.s
@echo "\t[NASM] $@"
@$(NASM) boot0.s -o $(SYMROOT)/$@
branches/meklort/i386/boot1/Makefile
55
66
77
8
8
9
910
1011
1112
INSTALLDIR = $(DSTROOT)/usr/standalone/i386
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
NASM = /Developer/usr/bin/nasm
NASM = $(shell which nasm)
#/Developer/usr/bin/nasm
VERSIONED_FILES = boot1h
branches/meklort/i386/boot2/Makefile
1919
2020
2121
22
22
2323
2424
25
25
26
2627
2728
2829
......
3132
3233
3334
34
35
35
36
37
38
3639
3740
3841
......
7780
7881
7982
80
83
8184
8285
8386
8487
8588
8689
87
90
8891
8992
9093
......
9295
9396
9497
95
96
97
98
9998
100
101
99
102100
103101
104102
SYMDIR = $(SYMROOT)
LIBSADIR = ../libsa
LIBSAIODIR = ../libsaio
KLIBCDIR = ../klibc
#KLIBCDIR = ../klibc
UTILDIR = ../util
INC = -I. -I.. -I$(SYMDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) -I$(KLIBCDIR)
INC = -I. -I.. -I$(SYMDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR)
#-I$(KLIBCDIR)
ifneq "" "$(wildcard /bin/mkdirs)"
MKDIRS = /bin/mkdirs
else
AS = as
LD = gcc
# LIBS= -lc_static
LIBS= -L$(SYMDIR) -lsaio -lsa -lklibc
LIBDEP= $(SYMDIR)/libsaio.a $(SYMDIR)/libsa.a $(SYMDIR)/libklibc.a
LIBS= -L$(SYMDIR) -lsaio -lsa
#-lklibc
LIBDEP= $(SYMDIR)/libsaio.a $(SYMDIR)/libsa.a
#$(SYMDIR)/libklibc.a
OTHER_FILES =
@echo "\t[LD] boot.sys"
@$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
-nostdlib -arch i386 -Wl,-segalign,20 \
-o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS)
-o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext
@make Symbols.dylib
@echo "\t[LD] boot_embeded.sys"
@$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
-nostdlib -arch i386 -Wl,-segalign,20 \
-Wl,-sectcreate,__DATA,__Symbols,$(SYMROOT)/Symbols.dylib \
-o $(SYMROOT)/boot_embeded.sys $(filter %.o,$^) $(LIBS)
-o $(SYMROOT)/boot_embeded.sys $(filter %.o,$^) $(LIBS) -lcc_kext
@ld -arch i386 \
-undefined dynamic_lookup \
-S -x -Z -dead_strip_dylibs \
-no_uuid \
-final_output Symbols.dylib \
-L$(OBJROOT)/ \
-L$(OBJROOT)/../ \
-L$(OBJROOT)/../*/ \
-L$(SYMROOT)/ \
$(filter %.o,$^) $(LIBS) \
-weak_library $(SYMROOT)/boot.sys \
-o $(SYMROOT)/Symbols_NOTE_linker_use_only.dylib
-o $(OBJROOT)/Symbols_LINKER_ONLY.dylib
branches/meklort/i386/modules/MakeInc.dir
3535
3636
3737
38
39
38
4039
40
4141
4242
4343
......
6060
6161
6262
63
6463
6564
66
67
65
66
6867
6968
7069
-final_output $(MODULE_NAME) \
-L$(OBJROOT)/ \
-L$(OBJROOT)/../ \
-L$(OBJROOT)/../*/ \
-L$(SYMROOT)/ \
-L$(SYMROOT)/ \
$(OBJROOT)/*.o \
-weak_library $(OBJROOT)/../../boot2/Symbols_LINKER_ONLY.dylib \
-weak_library $(SYMROOT)/*.dylib \
-o $(SYMROOT)/$(MODULE_NAME).dylib
-final_output $(MODULE_NAME) \
-L$(OBJROOT)/ \
-L$(OBJROOT)/../ \
-L$(OBJROOT)/../*/ \
-L$(SYMROOT)/ \
$(OBJROOT)/*.o \
-o $(SYMROOT)/$(MODULE_NAME).dylib
-weak_library $(OBJROOT)/../../boot2/Symbols_LINKER_ONLY.dylib \
-o $(SYMROOT)/$(MODULE_NAME).dylib
@cp -rf include/* ../module_includes/ &> /dev/null || true
endif
branches/meklort/i386/modules/klibc/strxspn.c
22
33
44
5
6
7
85
96
107
8
9
10
1111
1212
1313
* strpbrk
*/
#include <string.h>
#include <stddef.h>
#include <inttypes.h>
#include <limits.h>
#include "strxspn.h"
size_t __strxspn(const char *s, const char *map, int parity)
{
char matchmap[UCHAR_MAX + 1];
branches/meklort/i386/cdboot/Makefile
22
33
44
5
5
6
67
78
89
DIR = cdboot
include ../MakePaths.dir
NASM = /Developer/usr/bin/nasm
NASM = $(shell which nasm)
#/Developer/usr/bin/nasm
INSTALLDIR = $(DSTROOT)/usr/standalone/i386
DIRS_NEEDED = $(SYMROOT)
branches/meklort/i386/libsa/string.c
5656
5757
5858
59
5960
6061
6162
memset(dst, 0, len);
}
#else
void * memcpy(void * dst, const void * src, size_t len)
{

Archive Download the corresponding diff file

Revision: 690