Chameleon Applications

Chameleon Applications Commit Details

Date:2011-05-26 18:09:14 (9 years 4 months ago)
Author:ErmaC
Commit:293
Parents: 292
Message:Update file and script for the latest chameleon trunk... no more boot0hfs
Changes:
A/branches/iFabio/Chameleon/Cconfig
A/branches/iFabio/Chameleon/Make.rules
M/branches/iFabio/Chameleon/CHANGES
M/branches/iFabio/Chameleon/package/buildpkg
M/branches/iFabio/Chameleon/Makefile
M/branches/iFabio/Chameleon/package/Scripts/Standard/postinstall
M/branches/iFabio/Chameleon/package/Scripts/EFI/postinstall
M/branches/iFabio/Chameleon/TODO

File differences

branches/iFabio/Chameleon/package/buildpkg
5858
5959
6060
61
61
6262
6363
6464
......
122122
123123
124124
125
126
127
125
126
127
128128
129
129
130130
131131
132132
cp -R ${1%/*}/i386/modules ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot0hfs ${1}/Core/Root/usr/standalone/i386
# cp -f ${1%/*}/i386/boot0hfs ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386
# End build Modules packages
# build bdmesg package
mkdir -p ${1}/Bdmesg/Root
cp -f ${1%/*}/i386/bdmesg ${1}/Bdmesg/Root
fixperms "${1}/Bdmesg/Root/"
#mkdir -p ${1}/Bdmesg/Root
#cp -f ${1%/*}/i386/bdmesg ${1}/Bdmesg/Root
#fixperms "${1}/Bdmesg/Root/"
# echo "[BUILD] bdmesg "
buildpackage "${1}/Bdmesg" "/usr/sbin/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
#buildpackage "${1}/Bdmesg" "/usr/sbin/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
# End build bdmesg package
((xmlindent--))
branches/iFabio/Chameleon/package/Scripts/Standard/postinstall
22
33
44
5
65
76
87
......
297296
298297
299298
300
301
299
300
302301
303302
304303
diskloader="boot0"
diskloaderdualboot="boot0hfs"
partitionloaderhfs="boot1h"
partitionloaderfat="boot1f32"
filesystemloader="boot"
#---------------------------------------------------------------------
# If it exists then Windows is also installed on the HDD and we need to write boot0hfs
#---------------------------------------------------------------------
echo "Executing command: fdisk440 -u -f /usr/standalone/i386/${diskloaderdualboot} -y ${bootdisk}"
fdisk440 -u -f "${bootvolume}/usr/standalone/i386/${diskloaderdualboot}" -y ${bootdisk}
echo "Executing command: fdisk440 -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"
fdisk440 -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
fi
else
echo "Diskupdate is false, so no stage 0 file was written"
branches/iFabio/Chameleon/package/Scripts/EFI/postinstall
11
22
33
4
54
65
76
......
8180
8281
8382
84
83
8584
8685
8786
......
310309
311310
312311
313
314
312
313
315314
316315
317316
#!/bin/bash
diskloader="boot0"
diskloaderdualboot="boot0hfs"
partitionloaderhfs="boot1h"
partitionloaderfat="boot1f32"
filesystemloader="boot"
echo "Disk device is ${bootdisk}"
echo "Disk raw device is ${bootrdisk}"
echo "Disk loader normal is ${diskloader}"
echo "Disk loader dual boot is ${diskloaderdualboot}"
echo "Disk loader dual boot is also ${diskloader}"
echo "Partition loader HFS is ${partitionloaderhfs}"
echo "Partition loader FAT is ${partitionloaderfat}"
echo "Filesystem loader is ${filesystemloader}"
# If it exists then Windows is also installed on the HDD and we need to write boot0hfs
#---------------------------------------------------------------------
echo "Executing command: fdisk -u -f ${diskloaderdualboot} -y ${bootdisk}"
fdisk -u -f "${osxvolume}/${diskloaderdualboot}" -y ${bootdisk}
echo "Executing command: fdisk -u -f ${diskloader} -y ${bootdisk}"
fdisk -u -f "${osxvolume}/${diskloader}" -y ${bootdisk}
fi
else
echo "Diskupdate is false, so no stage 0 file was written"
branches/iFabio/Chameleon/TODO
11
22
3
34
45
56
TODO List for Chameleon Boot Loader
====================================
- Setup makefile to use module config for determining which modules to compile in and which to compile as modules
- Fix the module system when booting chameleon with multiboot. Cleanup the xcode 4 fix.
- Integrate Prasys current work on options and quick shortcut modified version of 18seven
branches/iFabio/Chameleon/Make.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
-include $(SRCROOT)/auto.conf
export USE_APPLE_PB_SUPPORT = all
ifneq "" "$(wildcard /bin/mkdirs)"
MKDIRS = /bin/mkdirs
else
MKDIRS = /bin/mkdir -p
endif
AS = as
LD = ld
CC = cc
CPP = g++
PAX = /bin/pax
NASM = $(shell which nasm) -p $(SRCROOT)/autoconf.inc
# CFLAGS= -O $(MORECPP) -arch i386 -g
CFLAGS= $(CONFIG_OPTIMIZATION_LEVEL) $(MORECPP) -g -Wmost -Werror
CPPFLAGS = -fno-exceptions -fno-rtti
DEFINES=
CONFIG = hd
#LIBDIR = libsa
#INC = -I. -I$(LIBDIR)
#
# Common makefile targets.
#
# Define these variables (if desired) in directory makefiles:
#DIRS_NEEDED
#INSTALLDIR
#SRCROOT
#
# Toggle this as to whether you want a frame pointer (%ebp) to be used. It is
# invaluable for debugging the booter. For example using GDB attached to VMware.
# In fact, it's so invaluable that it's now the default. Not only that but the
# compiler seems to generate slightly smaller code and the real<->prot code
# clearly handles it appropriately so I have no idea why Apple omitted it.
#OMIT_FRAME_POINTER_CFLAG=-fomit-frame-pointer
OMIT_FRAME_POINTER_CFLAG=
$(OBJROOT)/%.o: %.c
@echo "\t[CC] $<"
@$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o32: %.c
@echo "\t[CC32] $<"
@$(CC) $(CFLAGS) $(DEFINES) -c $(INC) -arch i386 $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o64: %.c
@echo "\t[CC64] $<"
@$(CC) $(CFLAGS) $(DEFINES) -c $(INC) -arch x86_64 $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o: %.m
@echo "\t[M] $<"
@$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o: %.cpp
@echo "\t[CPP] $<"
@$(CPP) $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
#$(OBJROOT)/.s.o:
#@echo "\t[AS] $<"
#@cc $(CPPFLAGS) -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $<
# This breaks make, must use make all (FIXME)
$(OBJROOT)/boot2.o:
@echo "\t[AS] boot2.s"
@cc $(CPPFLAGS) -Wa,-n -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) boot2.s \
-MD -dependency-file $*.d
@md -u $(OBJROOT)/Makedep -f -d $*.d
$(OBJROOT)/%.o: %.s
@echo "\t[AS] $<"
@$(CC) $(CPPFLAGS) -c $(INC) -arch i386 -o $@ $< \
-MD -dependency-file $*.d
@md -u $(OBJROOT)/Makedep -f -d $*.d
# This breaks make, must use make all (FIXME)
$(DIRS_NEEDED) $(INSTALLDIR) $(OBJROOT) $(SYMROOT):
@echo "\t[MKDIR] $@"
@$(MKDIRS) $@
$(SRCROOT)/auto.conf $(SRCROOT)/autoconf.h $(SRCROOT)/.config:
@echo "\t[MAKE] config"
@cd $(SRCROOT) && make rebuild_config
.PHONY: clean
clean:
@echo "\t[RM] $(OBJROOT)"
@echo "\t[RM] $(SYMROOT)"
@echo "\t[RM] $(DSTROOT)"
@echo "\t[RM] $(SRCROOT)/revision"
@echo "\t[RM] $(SRCROOT)/i386/modules/module_includes"
@echo "\t[RM] $(SRCROOT)/auto.conf"
@echo "\t[RM] $(SRCROOT)/autoconf.h"
@echo "\t[RM] $(SRCROOT)/autoconf.inc"
@rm -rf $(OBJROOT) $(SYMROOT) $(DSTROOT) $(SRCROOT)/revision \
$(SRCROOT)/i386/modules/module_includes \
$(SRCROOT)/auto.conf \
$(SRCROOT)/autoconf.h \
$(SRCROOT)/autoconf.inc
branches/iFabio/Chameleon/CHANGES
1
12
23
34
- New makefile + configuration system.
- Added the BOOT2_MAX_LENGTH constant in memory.h. This is now used in moot.c to relocate the correct number of bytes for boot2.
- Added new ATi/AMD Graphics Card Enabler.
- Added new SMBIOS patcher.
branches/iFabio/Chameleon/Cconfig
1
2
3
4
5
6
#
# Chameleon Configuration
#
mainmenu "Chameleon Configuration"
source "i386/Cconfig"
branches/iFabio/Chameleon/Makefile
1
2
31
2
3
4
5
6
7
8
9
410
5
6
7
8
9
10
11
12
13
14
15
16
17
1811
19
20
21
22
23
24
25
26
12
2713
14
2815
2916
3017
......
3825
3926
4027
41
42
4328
4429
4530
4631
4732
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
4852
49
53
5054
5155
5256
......
5963
6064
6165
66
6267
6368
6469
......
6873
6974
7075
71
7276
7377
7478
......
8589
8690
8791
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
10492
105
93
10694
10795
10896
10997
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
98
99
100
export USE_APPLE_PB_SUPPORT = all
#Makefile for kernel booter
SRCROOT = $(shell pwd)
OBJROOT = $(SRCROOT)/obj
SYMROOT = $(SRCROOT)/sym
DSTROOT = $(SRCROOT)/dst
DOCROOT = $(SRCROOT)/doc
IMGROOT = $(SRCROOT)/sym/cache
IMGSKELROOT = $(SRCROOT)/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
# CFLAGS= -O $(MORECPP) -arch i386 -g
DEFINES=
CONFIG = hd
LIBDIR = libsa
INC = -I. -I$(LIBDIR)
ifneq "" "$(wildcard /bin/mkdirs)"
MKDIRS = /bin/mkdirs
else
MKDIRS = /bin/mkdir -p
endif
AS = as
LD = ld
PAX = /bin/pax
OBJROOT = `pwd`/obj
SYMROOT = `pwd`/sym
DSTROOT = `pwd`/dst
SRCROOT = /tmp
DOCROOT = `pwd`/doc
IMGROOT = `pwd`/sym/cache
IMGSKELROOT = `pwd`/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
include Make.rules
THEME = default
VERSION = `cat version`
ARCHLESS_RC_CFLAGS=`echo $(RC_CFLAGS) | sed 's/-arch [a-z0-9]*//g'`
VPATH = $(OBJROOT):$(SYMROOT)
GENERIC_SUBDIRS =
#
# Currently builds for i386
#
clean config rebuild_config:
@if [ -e ".svn" ]; then svnversion -n | tr -d [:alpha:] > revision; fi
@echo ================= make config for i386 =================;
@( OBJROOT=$(OBJROOT)/i386; \
SYMROOT=$(SYMROOT)/i386; \
DSTROOT=$(DSTROOT); \
SRCROOT=$(SRCROOT); \
cd i386; ${MAKE} \
"OBJROOT=$$OBJROOT" \
"SYMROOT=$$SYMROOT" \
"DSTROOT=$$DSTROOT" \
"SRCROOT=$$SRCROOT" \
"RC_ARCHS=$$RC_ARCHS" \
"TARGET=$$i" \
"RC_KANJI=$(RC_KANJI)" \
"JAPANESE=$(JAPANESE)" \
"RC_CFLAGS=$$XCFLAGS" $@ \
) || exit $$?; \
all embedtheme tags debug install installhdrs: $(SYMROOT) $(OBJROOT)
all: $(SYMROOT) $(OBJROOT) $(SRCROOT)/auto.conf $(SRCROOT)/autoconf.h $(SRCROOT)/autoconf.inc $(SRCROOT)/.config
@if [ -e ".svn" ]; then svnversion -n | tr -d [:alpha:] > revision; fi
@if [ -z "$(RC_ARCHS)" ]; then \
RC_ARCHS="i386"; \
( OBJROOT=$(OBJROOT)/$${i}; \
SYMROOT=$(SYMROOT)/$${i}; \
DSTROOT=$(DSTROOT); \
SRCROOT=$(SRCROOT); \
XCFLAGS=$(ARCHLESS_RC_CFLAGS); \
GENSUBDIRS="$(GENERIC_SUBDIRS)"; \
for x in $$GENSUBDIRS; \
break; \
fi \
done; \
echo "$$OBJROOT $$SYMROOT $$DSTROOT"; \
cd $$i; ${MAKE} \
"OBJROOT=$$OBJROOT" \
"SYMROOT=$$SYMROOT" \
fi; \
done
image:
@if [ -e "$(SYMROOT)" ]; then \
rm -r -f ${IMGROOT}; \
mkdir -p ${IMGROOT}/usr/standalone/i386; \
if [ -e "$(IMGSKELROOT)" ]; then \
cp -R -f "${IMGSKELROOT}"/* "${IMGROOT}"; \
fi; \
cp -f ${SYMROOT}/i386/cdboot ${CDBOOT}; \
cp -f ${SYMROOT}/i386/boot ${IMGROOT}/usr/standalone/i386; \
cp -f ${SYMROOT}/i386/boot0 ${IMGROOT}/usr/standalone/i386; \
cp -f ${SYMROOT}/i386/boot1h ${IMGROOT}/usr/standalone/i386; \
cp -f ${SYMROOT}/i386/boot1f32 ${IMGROOT}/usr/standalone/i386;\
$(shell hdiutil makehybrid -iso -joliet -hfs -hfs-volume-name \
${CDLABEL} -eltorito-boot ${CDBOOT} -no-emul-boot -ov -o \
"${ISOIMAGE}" ${IMGROOT} -quiet) \
fi;
pkg installer: embedtheme
pkg installer: all
@if [ -e "$(SYMROOT)" ]; then \
sudo `pwd`/package/buildpkg `pwd`/sym/package; \
fi;
release: $(SYMROOT)
@if [ -e ".svn" ]; then svnversion -n | tr -d [:alpha:] > revision; fi
@if [ -e "$(SYMROOT)" ]; then \
sudo `pwd`/package/buildpkg `pwd`/sym/package; \
fi;
@tar -czf $(SYMROOT)/$(PRODUCT)-src.tar.gz ${EXCLUDE} .
@tar -cjf $(SYMROOT)/$(PRODUCT)-src.tar.bz2 ${EXCLUDE} .
clean:
rm -rf sym obj dst revision i386/modules/module_includes
#distclean: clean
#@rm -f $(SYMROOT)/$(PRODUCT)-src.*
#@rm -f $(SYMROOT)/$(PRODUCT).pkg
installsrc:
gnutar cf - . | (cd ${SRCROOT}; gnutar xpf -)
$(SYMROOT) $(OBJROOT) $(DSTROOT):
@$(MKDIRS) $@
.PHONY: config
.PHONY: clean
.DEFAULT_GOAL := all

Archive Download the corresponding diff file

Revision: 293