Chameleon Applications

Chameleon Applications Commit Details

Date:2011-06-02 05:55:16 (9 years 4 months ago)
Author:ErmaC
Commit:309
Parents: 308
Message:more tweaks on the build dmg script. (not complete).
Changes:
M/branches/iFabio/Chameleon/i386/modules/AMDGraphicsEnabler/Makefile
M/branches/iFabio/Chameleon/i386/modules/HelloWorld/Makefile
M/branches/iFabio/Chameleon/i386/boot2/drivers.c
M/branches/iFabio/Chameleon/i386/modules/uClibcxx/Makefile
M/branches/iFabio/Chameleon/i386/modules/Resolution/Makefile
M/branches/iFabio/Chameleon/package/slimpkg
M/branches/iFabio/Chameleon/i386/modules/NVIDIAGraphicsEnabler/Makefile
M/branches/iFabio/Chameleon/i386/modules/klibc/Makefile
M/branches/iFabio/Chameleon/package/builddmg
M/branches/iFabio/Chameleon/i386/modules/IntelGraphicsEnabler/Makefile
M/branches/iFabio/Chameleon/i386/modules/ATiGraphicsEnabler/Makefile

File differences

branches/iFabio/Chameleon/i386/boot2/drivers.c
183183
184184
185185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214186
215187
216188
......
250222
251223
252224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253253
254254
255255
}
else if ( gBootFileType == kBlockDeviceType )
{
// First try to load Extra extensions from the ramdisk if isn't aliased as bt(0,0).
if (gRAMDiskVolume && !gRAMDiskBTAliased)
{
strcpy(dirSpecExtra, "rd(0,0)/Extra/");
FileLoadDrivers(dirSpecExtra, 0);
}
// Next try to load Extra extensions from the selected root partition.
strcpy(dirSpecExtra, "/Extra/");
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
{
// If failed, then try to load Extra extensions from the boot partition
// in case we have a separate booter partition or a bt(0,0) aliased ramdisk.
if ( !(gBIOSBootVolume->biosdev == gBootVolume->biosdev && gBIOSBootVolume->part_no == gBootVolume->part_no)
|| (gRAMDiskVolume && gRAMDiskBTAliased) )
{
// Next try a specfic OS version folder ie 10.5
sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion);
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
{
// Next we'll try the base
strcpy(dirSpecExtra, "bt(0,0)/Extra/");
FileLoadDrivers(dirSpecExtra, 0);
}
}
}
if(!gHaveKernelCache)
{
// Non-prelinked kernel, load system mkext.
}
}
// First try to load Extra extensions from the ramdisk if isn't aliased as bt(0,0).
if (gRAMDiskVolume && !gRAMDiskBTAliased)
{
strcpy(dirSpecExtra, "rd(0,0)/Extra/");
FileLoadDrivers(dirSpecExtra, 0);
}
// Next try to load Extra extensions from the selected root partition.
strcpy(dirSpecExtra, "/Extra/");
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
{
// If failed, then try to load Extra extensions from the boot partition
// in case we have a separate booter partition or a bt(0,0) aliased ramdisk.
if ( !(gBIOSBootVolume->biosdev == gBootVolume->biosdev && gBIOSBootVolume->part_no == gBootVolume->part_no)
|| (gRAMDiskVolume && gRAMDiskBTAliased) )
{
// Next try a specfic OS version folder ie 10.5
sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion);
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
{
// Next we'll try the base
strcpy(dirSpecExtra, "bt(0,0)/Extra/");
FileLoadDrivers(dirSpecExtra, 0);
}
}
}
}
else
{
branches/iFabio/Chameleon/i386/modules/uClibcxx/Makefile
1
21
2
3
34
45
56
MODULE_NAME = uClibcxx
MODULE_DESCRIPTION = This module provides a minimalistic c++ runtime library for use in other modules. This does not provide functionality by itself, instead it is used to allow for the c++ language to be used in other modules. Please note that rtti and exceptions has both been disabled.
MODULE_AUTHOR =
MODULE_VERSION = "0.2.2"
MODULE_COMPAT_VERSION = "0.2.2"
MODULE_START = $(MODULE_NAME)_start
branches/iFabio/Chameleon/i386/modules/Resolution/Makefile
11
2
3
24
35
46
MODULE_NAME = Resolution
MODULE_DESCRIPTION = This module provides
MODULE_AUTHOR =
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = $(MODULE_NAME)_start
branches/iFabio/Chameleon/i386/modules/NVIDIAGraphicsEnabler/Makefile
11
2
3
24
35
46
MODULE_NAME = NVIDIAGraphicsEnabler
MODULE_DESCRIPTION = This module provides
MODULE_AUTHOR =
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = $(MODULE_NAME)_start
branches/iFabio/Chameleon/i386/modules/klibc/Makefile
11
2
3
24
35
46
MODULE_NAME = klibc
MODULE_DESCRIPTION = This module provides a standard c library for modules to link to if the library provided by chameleon is insufficient. This is currently only used by the uClibc++ library.
MODULE_AUTHOR =
MODULE_VERSION = "1.5.20"
MODULE_COMPAT_VERSION = "1.5.20"
MODULE_START = $(MODULE_NAME)_start
branches/iFabio/Chameleon/i386/modules/IntelGraphicsEnabler/Makefile
11
2
3
24
35
46
MODULE_NAME = IntelGraphicsEnabler
MODULE_DESCRIPTION = This module provides
MODULE_AUTHOR =
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = $(MODULE_NAME)_start
branches/iFabio/Chameleon/i386/modules/ATiGraphicsEnabler/Makefile
11
2
3
24
35
46
MODULE_NAME = ATiGraphicsEnabler
MODULE_DESCRIPTION = This module provides
MODULE_AUTHOR =
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = $(MODULE_NAME)_start
branches/iFabio/Chameleon/i386/modules/AMDGraphicsEnabler/Makefile
11
2
3
24
35
46
MODULE_NAME = AMDGraphicsEnabler
MODULE_DESCRIPTION = This module provides
MODULE_AUTHOR =
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = $(MODULE_NAME)_start
branches/iFabio/Chameleon/i386/modules/HelloWorld/Makefile
11
2
3
24
35
46
MODULE_NAME = HelloWorld
MODULE_DESCRIPTION = This module provides an example implementation of a module. Should not be used for regular bootup
MODULE_AUTHOR =
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = $(MODULE_NAME)_start
branches/iFabio/Chameleon/package/slimpkg
267267
268268
269269
270
271
272
273
274
275
276270
277271
278272
rm -rf "${pkgroot}/Icon"
# End
echo ""
echo -e $COL_BLACK"--------------------------"$COL_RESET
echo -e $COL_BLACK"Building process complete!"$COL_RESET
echo -e $COL_BLACK"--------------------------"$COL_RESET
echo ""
}
main "${1}" "${2}" "${3}" "${4}" "${5}"
branches/iFabio/Chameleon/package/builddmg
66
77
88
9
9
1010
11
11
12
13
1214
15
16
17
1318
14
15
16
19
20
21
22
23
24
25
1726
27
28
29
30
1831
1932
2033
......
2538
2639
2740
28
29
30
41
42
43
3144
3245
3346
......
3548
3649
3750
38
39
40
51
52
53
4154
42
55
56
57
58
59
60
61
62
63
64
65
66
4367
44
45
46
47
48
68
69
70
71
72
4973
50
51
52
53
74
75
76
77
78
79
5480
55
81
5682
57
83
5884
5985
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
60229
OPENUP_TOOL=${1%/*}/i386/openUp
SRC_FOLDER=$DMG_ROOT/source
SRC_FOLDER=${1%/*}/source
VOLUME_NAME="Chameleon"
DMG_TEMP_NAME=${DMG_ROOT}/rw.${DMG_NAME}
DMG_TEMP_NAME=${DMG_ROOT}/rw.${VOLUME_NAME}
BACKGROUND_FILE=$DMG_ROOT/dmg/background.png
EULA_RSRC=$DMG_ROOT/dmg/EULA.rtf
# =============================
# Setting icon and .DStore path
# =============================
#
# ==========================
#
# To fix # DMG_DSSTORE=$DMG_ROOT/dmg/.DStore
# To fix # ICON_DOC=$DMG_ROOT/dmg/doc.icns
# To fix # ICON_I386=$DMG_ROOT/dmg/i386.icns
# To fix # ICON_PAN=$DMG_ROOT/dmg/pan.icns
# To fix # ICON_THEMES=$DMG_ROOT/dmg/tm.icns
# To fix # ICON_DMG=$DMG_ROOT/dmg/dmg.icns
# To fix # ICON_VOL=$DMG_ROOT/dmg/Volume.icns
# =============================
# Setting color for text output
# =============================
COL_BLACK="\x1b[30;01m"
COL_RED="\x1b[31;01m"
COL_GREEN="\x1b[32;01m"
COL_BLUE="\x1b[34;01m"
COL_RESET="\x1b[39;49;00m"
#
# ==========================
#
# ======================
# Setting Chameleon info
# ======================
version=$( cat version )
stage=${version##*-}
builddate=$( grep I386BOOT_BUILDDATE sym/i386/vers.h | awk '{ print $3,$4 }' | tr -d '\"' )
timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" )
#
# Create a read-only disk image of the contents of a folder
#
# =========================
# Start of building process
# =========================
echo "=========== BUILD .DMG TEST ==========="
echo ""
echo -e $COL_BLACK"----------------------"$COL_RESET
echo -e $COL_BLACK"Building $VOLUME_NAME DMG"$COL_RESET
echo -e $COL_BLACK"----------------------"$COL_RESET
echo ""
# <-- Remove this part from here to...
# ==================================================================
# Series of informative echos for show assigned path tools file ecc.
# ==================================================================
echo -e $COL_BLACK"=========== BUILD .DMG TEST ==========="$COL_RESET
echo ""
echo "- Version:$version"
echo "- Stage:$stage"
echo "- Revision:$revision"
echo "- Build date:$builddate"
echo "- Time stamp:$timestamp"
echo -e $COL_BLUE"- Version:"$COL_RESET $COL_RED"$version"$COL_RESET
echo -e $COL_BLUE"- Stage:"$COL_RESET $COL_RED"$stage"$COL_RESET
echo -e $COL_BLUE"- Revision:"$COL_RESET $COL_RED"$revision"$COL_RESET
echo -e $COL_BLUE"- Build date:"$COL_RESET $COL_RED"$builddate"$COL_RESET
echo -e $COL_BLUE"- Time stamp:"$COL_RESET $COL_RED"$timestamp"$COL_RESET
echo ""
echo "- DMG path:$DMG_ROOT"
echo "- Source dir:$SRC_FOLDER"
echo "- Volume name:$VOLUME_NAME"
echo "- Temp dmg:$DMG_TEMP_NAME"
echo -e $COL_BLUE"- DMG path:"$COL_RESET $COL_RED"$DMG_ROOT"$COL_RESET
echo -e $COL_BLUE"- Source dir:"$COL_RESET $COL_RED"$SRC_FOLDER"$COL_RESET
echo -e $COL_BLUE"- Volume name:"$COL_RESET $COL_RED"$VOLUME_NAME"$COL_RESET
echo -e $COL_BLUE"- Temp dmg:"$COL_RESET $COL_RED"$DMG_TEMP_NAME"$COL_RESET
echo -e $COL_BLUE"- dmg background:"$COL_RESET $COL_RED"$BACKGROUND_FILE"$COL_RESET
echo -e $COL_BLUE"- EULA path:"$COL_RESET $COL_RED"$EULA_RSRC"$COL_RESET
echo ""
echo "- OpenUp path:$OPENUP_TOOL"
echo -e $COL_BLUE"- OpenUp path:"$COL_RESET $COL_RED"$OPENUP_TOOL"$COL_RESET
echo ""
echo "================= END ================="
echo -e $COL_BLACK"================= END ================="$COL_RESET
echo ""
# ==================================================================
# ... to here -->
# =========================================================
# Create a read-only disk image of the contents of a folder
# =========================================================
if ! test -z "$SRC_FOLDER"; then
echo "Deleting previus existing source folder "
rm -R $SRC_FOLDER
fi
# ==========================
# 1) Create the source folder
# ==========================
echo "[mkdir] Creating source folder "
mkdir $SRC_FOLDER
# TODO --> List of command to add the needed contents into the folder content
echo "==========================="
# ======================================
# 2) Find the size of the folder contents
# ======================================
FOLDER_SIZE=`du -s $SRC_FOLDER | sed s/[^0-9].*//`
echo "==========================="
# ===================================================
# 3) Allow for partition table and other overhead (3%)
# ===================================================
IMAGE_SIZE=$(($FOLDER_SIZE * 103/100))
echo "==========================="
# ===========================================
# 4) Minimum size for an HFS+ partition is 4Mb
# ===========================================
[ $IMAGE_SIZE -lt 8300 ] && IMAGE_SIZE=8300
echo "==========================="
# ================================================================
# 5) Make sure NEXT_ROOT is not set (if we're building with an SDK)
# ================================================================
unset NEXT_ROOT
echo "FOLDER SIZE = $FOLDER_SIZE"
echo "IMAGE SIZE = $IMAGE_SIZE"
echo "==========================="
# ===================
# 6) Create the image
# ===================
echo "[hdutil] Creating disk image "
#test -f "${DMG_TEMP_NAME}" && rm -f "${DMG_TEMP_NAME}"
#hdiutil create -sectors $IMAGE_SIZE -fs HFS+ $DMG_TEMP_NAME -volname $VOLUME_NAME
echo "==========================="
# ===========
# 7) Mount it
# ===========
echo "[hdutil] Mounting disk image "
#DEV_NAME=`hdid $DMG_TEMP_NAME | sed 1q | awk '{print $1}'`
#MOUNT_DIR=`hdid $DMG_TEMP_NAME | grep Apple_HFS | awk '{print $3}'`
echo "Device name:$DEV_NAME"
echo "Mount directory: $MOUNT_DIR"
echo "==========================="
# ===========================================================
# 8) Adding optional Finder window layout and bakground image
# ===========================================================
#cp RightDS_Store "/Volumes/${VOLUME_NAME}/.DS_Store"
#if ! test -z "$BACKGROUND_FILE"; then
echo "[cp]Copying background file..."
# test -d "$MOUNT_DIR/.background" || mkdir "$MOUNT_DIR/.background"
# cp "$BACKGROUND_FILE" "$MOUNT_DIR/.background/$BACKGROUND_FILE_NAME"
#fi
echo "==========================="
# =====================================
# 9) Make sure it's not world writeable
# =====================================
echo "[chmod] Fixing permission for \"${MOUNT_DIR}\""
#chmod -Rf go-w "${MOUNT_DIR}" || true
#chmod -f a-w "${MOUNT_DIR}"/.DS_Store || true
echo "Done fixing permissions."
echo "==========================="
# =============================================
# 10) Make the top window open itself on mount:
# =============================================
echo "[openUp] Setting auto open flag"
#if [ -x ${OPENUP_TOOL} ]; then
echo "Applying openUp..."
# ${OPENUP_TOOL} "${MOUNT_DIR}"
#fi
echo "==========================="
# ======================
# 11) Add icon to Volume
# ======================
#if [ -f "${MOUNT_DIR}/.VolumeIcon.icns" ]; then
echo "Setting icon for \"${MOUNT_DIR}\""
#${SETFILE_TOOL} -a C "${MOUNT_DIR}"
#fi
echo "==========================="
# ===========
# 12) Unmount
# ===========
echo "[hdutil] Unmounting disk image"
#hdiutil detach $DEV_NAME
echo "==========================="
# ==================
# 13) Compress image
# ==================
echo "[hdutil] Compressing disk image"
#hdiutil convert $DMG_TEMP_NAME -format UDZO -imagekey zlib-level=9 -o ${DMG_DIR}/${VOLUME_NAME}
#rm -f $DMG_TEMP_NAME
echo "==========================="
# =========================
# 14) Adding EULA resources
# =========================
#if [ ! -z "${EULA_RSRC}" -a "${EULA_RSRC}" != "-null-" ]; then
echo "[ResMerger] Adding EULA resources"
# hdiutil unflatten ${DMG_DIR}/${VOLUME_NAME}
# /Developer/Tools/ResMerger -a ${EULA_RSRC} -o ${DMG_DIR}/${VOLUME_NAME}
# hdiutil flatten ${DMG_DIR}/${VOLUME_NAME}
#fi
echo "==========================="
echo "Finish $VOLUME_NAME.dmg"
echo "==========================="
echo ""
# ============
exit 0

Archive Download the corresponding diff file

Revision: 309