Index: branches/slice/trunkM/Chameleon.xcodeproj/project.pbxproj =================================================================== --- branches/slice/trunkM/Chameleon.xcodeproj/project.pbxproj (revision 1183) +++ branches/slice/trunkM/Chameleon.xcodeproj/project.pbxproj (revision 1184) @@ -17,6 +17,8 @@ 019DFBAF11FB94090013E8CC /* MEMTEST86_LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MEMTEST86_LICENSE; sourceTree = ""; }; 1D145307137073F40050C0CD /* bootargs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootargs.h; sourceTree = ""; }; 1D2A1AF513743A2600787720 /* bootargs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootargs.h; sourceTree = ""; }; + 26F2051D13D04B060020D229 /* exfat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = exfat.h; sourceTree = ""; }; + 26F2052013D04B130020D229 /* exfat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = exfat.c; sourceTree = ""; }; 65ED53931204B83200B22507 /* disk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = disk.h; sourceTree = ""; }; B0056CE711F3868000754B65 /* boot0.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = boot0.s; sourceTree = ""; }; B0056CE811F3868000754B65 /* chain0.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = chain0.s; sourceTree = ""; }; @@ -425,6 +427,8 @@ B0056D2411F3868000754B65 /* libsaio */ = { isa = PBXGroup; children = ( + 26F2052013D04B130020D229 /* exfat.c */, + 26F2051D13D04B060020D229 /* exfat.h */, B0056D2511F3868000754B65 /* acpi.h */, B0056D2611F3868000754B65 /* acpi_patcher.c */, B0056D2711F3868000754B65 /* acpi_patcher.h */, Index: branches/slice/trunkM/i386/libsaio/exfat.c =================================================================== --- branches/slice/trunkM/i386/libsaio/exfat.c (revision 0) +++ branches/slice/trunkM/i386/libsaio/exfat.c (revision 1184) @@ -0,0 +1,266 @@ +/* + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2004 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * dmazar, 14/7/2011 + * support for EXFAT volume label reading + * EXFAT info from: http://www.ntfs.com/exfat-overview.htm + * + * EXFAT shares partition type with NTFS (0x7) and easiest way of + * adding it was through ntfs.c module. All functions here are called + * from similar ntfs.c funcs as fallback (if not NTFS, maybe it's EXFAT). + */ + +#include "libsaio.h" +#include "sl.h" + +#ifndef DEBUG_EXFAT +#define DEBUG_EXFAT 0 +#endif + +#if DEBUG_EXFAT +#define DBG(x...) printf(x) +#define PAUSE() getchar() +#else +#define DBG(x...) +#define PAUSE() +#endif + +#define EXFAT_BBID "EXFAT " +#define EXFAT_BBIDLEN 8 + +#define MAX_BLOCK_SIZE 4096 +#define MAX_CLUSTER_SIZE 32 * 1024 * 1024 + +#define ERROR -1 + + +/* + * boot sector of the partition + * http://www.ntfs.com/exfat-boot-sector.htm + */ +struct exfatbootfile { + u_int8_t reserved1[3]; /* JumpBoot: 0xEB7690 */ + u_int8_t bf_sysid[8]; /* FileSystemName: 'EXFAT ' */ + u_int8_t reserved2[53]; /* MustBeZero */ + u_int64_t bf_prtoff; /* PartitionOffset: In sectors; if 0, shall be ignored */ + u_int64_t bf_vollen; /* VolumeLength: Size of exFAT volume in sectors */ + u_int32_t bf_fatoff; /* FatOffset: In sectors */ + u_int32_t bf_fatlen; /* FatLength: In sectors. May exceed the required space in order to align the second FAT */ + u_int32_t bf_cloff; /* ClusterHeapOffset: In sectors. */ + u_int32_t bf_clcnt; /* ClusterCount: 2^32-11 is the maximum number of clusters could be described. */ + u_int32_t bf_rdircl; /* RootDirectoryCluster. */ + u_int32_t bf_volsn; /* VolumeSerialNumber. */ + u_int16_t bf_fsrev; /* FileSystemRevision: as MAJOR.minor, major revision is high byte, minor is low byte; currently 01.00. */ + u_int16_t bf_volflags; /* VolumeFlags. */ + u_int8_t bf_bpss; /* BytesPerSectorShift: Power of 2. Minimum 9 (512 bytes per sector), maximum 12 (4096 bytes per sector) */ + u_int8_t bf_spcs; /* SectorsPerClusterShift: Power of 2. Minimum 0 (1 sector per cluster), maximum 25 Ð BytesPerSectorShift, so max cluster size is 32 MB */ + u_int8_t bf_nfats; /* NumberOfFats: 2 is for TexFAT only */ + u_int8_t bf_drvs; /* DriveSelect: Extended INT 13h drive number; typically 0x80 */ + u_int8_t bf_pused; /* PercentInUse: 0..100 Ð percentage of allocated clusters rounded down to the integer 0xFF Ð percentage is not available */ + u_int8_t reserved3[7]; /* Reserved */ + u_int8_t bootcode[390]; /* BootCode */ + u_int16_t bf_bsig; /* BootSignature: 0xAA55 */ +}; + +struct direntry_label { + u_int8_t type; /* EntryType: 0x83 (or 0x03 if label is empty) */ + u_int8_t llen; /* CharacterCount: Length in Unicode characters (max 11) */ + u_int16_t label[11]; /* VolumeLabel: Unicode characters (max 11) */ + u_int8_t reserved1[8]; /* Reserved */ +}; + + +/** + * Reads volume label into str. + * Reads boot sector, performs dome checking, loads root dir + * and parses volume label. + */ +void +EXFATGetDescription(CICell ih, char *str, long strMaxLen) +{ + struct exfatbootfile *boot; + u_int32_t bytesPerSector = 0; + u_int32_t sectorsPerCluster = 0; + long long rdirOffset = 0; + char *buf = NULL; + struct direntry_label *dire = NULL; + int loopControl = 0; + + DBG("EXFAT: start %x:%x\n", ih->biosdev, ih->part_no); + + buf = (char *)malloc(MAX_BLOCK_SIZE); + if (buf == 0) + { + goto error; + } + + /* + * Read the boot sector, check signatures, and do some minimal + * sanity checking. NOTE: the size of the read below is intended + * to be a multiple of all supported block sizes, so we don't + * have to determine or change the device's block size. + */ + Seek(ih, 0); + Read(ih, (long)buf, MAX_BLOCK_SIZE); + + // take our boot structure + boot = (struct exfatbootfile *) buf; + + /* + * The first three bytes are an Intel x86 jump instruction. I assume it + * can be the same forms as DOS FAT: + * 0xE9 0x?? 0x?? + * 0xEC 0x?? 0x90 + * where 0x?? means any byte value is OK. + */ + if (boot->reserved1[0] != 0xE9 + && (boot->reserved1[0] != 0xEB || boot->reserved1[2] != 0x90)) + { + goto error; + } + + // Check the "EXFAT " signature. + if (memcmp((const char *)boot->bf_sysid, EXFAT_BBID, EXFAT_BBIDLEN) != 0) + { + goto error; + } + + /* + * Make sure the bytes per sector and sectors per cluster are + * powers of two, and within reasonable ranges. + */ + bytesPerSector = 1 << boot->bf_bpss; /* Just one byte; no swapping needed */ + DBG("EXFAT: bpss=%d, bytesPerSector=%d\n", boot->bf_bpss, bytesPerSector); + if (boot->bf_bpss < 9 || boot->bf_bpss > 12) + { + DBG("EXFAT: invalid bytes per sector shift(%d)\n", boot->bf_bpss); + goto error; + } + + sectorsPerCluster = 1 << boot->bf_spcs; /* Just one byte; no swapping needed */ + DBG("EXFAT: spcs=%d, sectorsPerCluster=%d\n", boot->bf_spcs, sectorsPerCluster); + if (boot->bf_spcs > (25 - boot->bf_bpss)) + { + DBG("EXFAT: invalid sectors per cluster shift (%d)\n", boot->bf_spcs); + goto error; + } + + // calculate root dir cluster offset + rdirOffset = boot->bf_cloff + (boot->bf_rdircl - 2) * sectorsPerCluster; + DBG("EXFAT: rdirOffset=%d\n", rdirOffset); + + // load MAX_BLOCK_SIZE bytes of root dir + Seek(ih, rdirOffset * bytesPerSector); + Read(ih, (long)buf, MAX_BLOCK_SIZE); + DBG("buf 0 1 2 = %x %x %x\n", 0x00ff & buf[0], 0x00ff & buf[1], 0x00ff & buf[2]); + + str[0] = '\0'; + + /* + * Search for volume label dir entry (type 0x83), convert from unicode and put to str. + * Set loopControl var to avoid searching outside of buf. + */ + loopControl = MAX_BLOCK_SIZE / sizeof(struct direntry_label); + dire = (struct direntry_label *)buf; + while (loopControl && dire->type && dire->type != 0x83) + { + dire++; + loopControl--; + } + if (dire->type == 0x83 && dire->llen > 0 && dire->llen <= 11) + { + utf_encodestr( dire->label, (int)dire->llen, (u_int8_t *)str, strMaxLen, OSLittleEndian ); + } + DBG("EXFAT: label=%s\n", str); + + free(buf); + PAUSE(); + return; + + error: + if (buf) free(buf); + DBG("EXFAT: error\n"); + PAUSE(); + return; +} + +/** + * Sets UUID to uuidStr. + * Reads the boot sector, does some checking, generates UUID + * (like the one you get on Windows???) + */ +long EXFATGetUUID(CICell ih, char *uuidStr) +{ + struct exfatbootfile *boot; + void *buf = malloc(MAX_BLOCK_SIZE); + if ( !buf ) + return -1; + + /* + * Read the boot sector, check signatures, and do some minimal + * sanity checking. NOTE: the size of the read below is intended + * to be a multiple of all supported block sizes, so we don't + * have to determine or change the device's block size. + */ + Seek(ih, 0); + Read(ih, (long)buf, MAX_BLOCK_SIZE); + + boot = (struct exfatbootfile *) buf; + + /* + * Check the "EXFAT " signature. + */ + if (memcmp((const char *)boot->bf_sysid, EXFAT_BBID, EXFAT_BBIDLEN) != 0) + return -1; + + // Check for non-null volume serial number + if( !boot->bf_volsn ) + return -1; + + // Use UUID like the one you get on Windows + sprintf(uuidStr, "%04X-%04X", (unsigned short)(boot->bf_volsn >> 16) & 0xFFFF, + (unsigned short)boot->bf_volsn & 0xFFFF); + + DBG("EXFATGetUUID: %x:%x = %s\n", ih->biosdev, ih->part_no, uuidStr); + return 0; +} + +/** + * Returns true if given buffer is the boot rec of the EXFAT volume. + */ +bool EXFATProbe(const void * buffer) +{ + bool result = false; + + // boot sector structure + const struct exfatbootfile * boot = buffer; + + // Looking for EXFAT signature. + if (memcmp((const char *)boot->bf_sysid, EXFAT_BBID, EXFAT_BBIDLEN) == 0) + result = true; + + DBG("EXFATProbe: %d\n", result ? 1 : 0); + return result; +} Index: branches/slice/trunkM/i386/libsaio/exfat.h =================================================================== --- branches/slice/trunkM/i386/libsaio/exfat.h (revision 0) +++ branches/slice/trunkM/i386/libsaio/exfat.h (revision 1184) @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 2.0 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * dmazar, 14/7/2011 + * support for EXFAT volume label reading + * + */ + +extern void EXFATGetDescription(CICell ih, char *str, long strMaxLen); +extern bool EXFATProbe (const void *buf); +extern long EXFATGetUUID(CICell ih, char *uuidStr); Index: branches/slice/trunkM/i386/libsaio/gma.c =================================================================== --- branches/slice/trunkM/i386/libsaio/gma.c (revision 1183) +++ branches/slice/trunkM/i386/libsaio/gma.c (revision 1184) @@ -10,6 +10,7 @@ #include "platform.h" #include "device_inject.h" #include "gma.h" +#include "graphics.h" #ifndef DEBUG_GMA #define DEBUG_GMA 0 Index: branches/slice/trunkM/i386/libsaio/nvidia.c =================================================================== --- branches/slice/trunkM/i386/libsaio/nvidia.c (revision 1183) +++ branches/slice/trunkM/i386/libsaio/nvidia.c (revision 1184) @@ -83,11 +83,7 @@ const char *nvidia_name_1[] = { "@1,name", "NVDA,Display-B" }; const char *nvidia_slot_name[] = { "AAPL,slot-name", "Slot-1" }; -static uint8_t display_cfg_0[]= {0x03, 0x01, 0x03, 0x00}; -static uint8_t display_cfg_1[]= {0xff, 0xff, 0x00, 0x01}; - - -uint8_t default_NVCAP[]= { +static uint8_t default_NVCAP[]= { 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00 @@ -95,6 +91,12 @@ #define NVCAP_LEN ( sizeof(default_NVCAP) / sizeof(uint8_t) ) +static uint8_t default_dcfg_0[]= {0x03, 0x01, 0x03, 0x00}; +static uint8_t default_dcfg_1[]= {0xff, 0xff, 0x00, 0x01}; + +#define DCFG0_LEN ( sizeof(default_dcfg_0) / sizeof(uint8_t) ) +#define DCFG1_LEN ( sizeof(default_dcfg_1) / sizeof(uint8_t) ) + static uint8_t default_NVPM[]= { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -103,8 +105,6 @@ }; #define NVPM_LEN ( sizeof(default_NVPM) / sizeof(uint8_t) ) -#define DCFG0_LEN ( sizeof(default_dcfg_0) / sizeof(uint8_t) ) -#define DCFG1_LEN ( sizeof(default_dcfg_1) / sizeof(uint8_t) ) static struct nv_chipsets_t NVKnownChipsets[] = { { 0x00000000, "Unknown" }, Index: branches/slice/trunkM/i386/boot2/graphics.h =================================================================== --- branches/slice/trunkM/i386/boot2/graphics.h (revision 1183) +++ branches/slice/trunkM/i386/boot2/graphics.h (revision 1184) @@ -18,6 +18,7 @@ #define DEFAULT_SCREEN_WIDTH 1024 #define DEFAULT_SCREEN_HEIGHT 768 +extern int gDualLink; int loadPngImage(const char *filename, uint16_t *width, uint16_t *height, uint8_t **imageData); unsigned long lookUpCLUTIndex( unsigned char index, unsigned char depth ); Index: branches/slice/trunkM/i386/boot2/boot.c =================================================================== --- branches/slice/trunkM/i386/boot2/boot.c (revision 1183) +++ branches/slice/trunkM/i386/boot2/boot.c (revision 1184) @@ -59,6 +59,7 @@ #include "gui.h" #include "platform.h" #include "modules.h" +#include "graphics.h" long gBootMode; /* defaults to 0 == kBootModeNormal */ bool gOverrideKernel; Index: branches/slice/trunkM/i386/boot2/gui.c =================================================================== --- branches/slice/trunkM/i386/boot2/gui.c (revision 1183) +++ branches/slice/trunkM/i386/boot2/gui.c (revision 1184) @@ -712,6 +712,7 @@ // set our screen structure with the mode width & height gui.screen.width = screen_params[0]; gui.screen.height = screen_params[1]; + gDualLink =((screen_params[0] * screen_params[1]) > (1<<20))?1:0; //Slice - needed for GMAX3100 // load graphics otherwise fail and return if (loadGraphics() == 0) { Index: branches/slice/trunkM/i386/modules/NetbookInstaller/Cconfig =================================================================== --- branches/slice/trunkM/i386/modules/NetbookInstaller/Cconfig (revision 0) +++ branches/slice/trunkM/i386/modules/NetbookInstaller/Cconfig (revision 1184) @@ -0,0 +1,10 @@ +# +# Chameleon Modules +# + +config NBI_MODULE + tristate "NetbookInstaller Module" + default n + ---help--- + Say Y here if you want to enable the use of this module. + Index: branches/slice/trunkM/i386/modules/KextPatcher/Cconfig =================================================================== --- branches/slice/trunkM/i386/modules/KextPatcher/Cconfig (revision 0) +++ branches/slice/trunkM/i386/modules/KextPatcher/Cconfig (revision 1184) @@ -0,0 +1,10 @@ +# +# Chameleon Modules +# + +config KEXTPATCHER_MODULE + tristate "KextPatcher Module" + default n + ---help--- + Say Y here if you want to enable the use of this module. + Index: branches/slice/trunkM/i386/modules/NVRAM/Cconfig =================================================================== --- branches/slice/trunkM/i386/modules/NVRAM/Cconfig (revision 0) +++ branches/slice/trunkM/i386/modules/NVRAM/Cconfig (revision 1184) @@ -0,0 +1,10 @@ +# +# Chameleon Modules +# + +config NVRAM_MODULE + tristate "NVRAM Module" + default m + ---help--- + Say Y here if you want to enable the use of this module. + Index: branches/slice/trunkM/i386/modules/KernelPatcher/Cconfig =================================================================== --- branches/slice/trunkM/i386/modules/KernelPatcher/Cconfig (revision 0) +++ branches/slice/trunkM/i386/modules/KernelPatcher/Cconfig (revision 1184) @@ -0,0 +1,10 @@ +# +# Chameleon Modules +# + +config KernelPatcher_MODULE + tristate "KernelPatcher Module" + default n + ---help--- + Say Y here if you want to enable the use of this module. + Index: branches/slice/trunkM/i386/modules/Networking/Cconfig =================================================================== --- branches/slice/trunkM/i386/modules/Networking/Cconfig (revision 0) +++ branches/slice/trunkM/i386/modules/Networking/Cconfig (revision 1184) @@ -0,0 +1,10 @@ +# +# Chameleon Modules +# + +config NETWORK_MODULE + tristate "Networking Module" + default n + ---help--- + Say Y here if you want to enable the use of this module. + Index: branches/slice/trunkM/i386/modules/HPET/Cconfig =================================================================== --- branches/slice/trunkM/i386/modules/HPET/Cconfig (revision 0) +++ branches/slice/trunkM/i386/modules/HPET/Cconfig (revision 1184) @@ -0,0 +1,10 @@ +# +# Chameleon Modules +# + +config HPET_MODULE + tristate "HPET Module" + default m + ---help--- + Say Y here if you want to enable the use of this module. + Index: branches/slice/trunkM/i386/modules/USBFix/Cconfig =================================================================== --- branches/slice/trunkM/i386/modules/USBFix/Cconfig (revision 0) +++ branches/slice/trunkM/i386/modules/USBFix/Cconfig (revision 1184) @@ -0,0 +1,10 @@ +# +# Chameleon Modules +# + +config USBFIX_MODULE + tristate "USBFix Module" + default m + ---help--- + Say Y here if you want to enable the use of this module. + Index: branches/slice/trunkM/i386/modules/Memory/Cconfig =================================================================== --- branches/slice/trunkM/i386/modules/Memory/Cconfig (revision 0) +++ branches/slice/trunkM/i386/modules/Memory/Cconfig (revision 1184) @@ -0,0 +1,10 @@ +# +# Chameleon Modules +# + +config MEMORY_MODULE + tristate "Memory Module" + default n + ---help--- + Say Y here if you want to enable the use of this module. + Index: branches/slice/trunkM/revision =================================================================== --- branches/slice/trunkM/revision (revision 1183) +++ branches/slice/trunkM/revision (revision 1184) @@ -1 +1 @@ -1174:1175 \ No newline at end of file +1183 \ No newline at end of file Index: branches/slice/trunkM/Makefile =================================================================== --- branches/slice/trunkM/Makefile (revision 1183) +++ branches/slice/trunkM/Makefile (revision 1184) @@ -19,6 +19,7 @@ PRODUCT = Chameleon-$(VERSION)-r$(REVISION) CDLABEL = ${PRODUCT} ISOIMAGE = ${SYMROOT}/${CDLABEL}.iso +DISTFILE = ${SYMROOT}/${PRODUCT} EXCLUDE = --exclude=.svn --exclude=.DS_Store --exclude=sym --exclude=obj \ --exclude=package --exclude=archive --exclude=User_Guide_src --exclude=*.sh @@ -89,31 +90,40 @@ fi; \ done -image: - @if [ -e "$(SYMROOT)" ]; then \ - rm -r -f ${IMGROOT}; \ - mkdir -p ${IMGROOT}/usr/standalone/i386; \ - mkdir -p ${IMGROOT}/Extra/modules; \ - mkdir -p ${IMGROOT}/Extra/Themes/Default; \ - if [ -e "$(IMGSKELROOT)" ]; then \ - cp -R -f "${IMGSKELROOT}"/* "${IMGROOT}"; \ - fi; \ - cp -f ${SYMROOT}/i386/cdboot ${CDBOOT}; \ - cp -f ${SYMROOT}/i386/modules/* ${IMGROOT}/Extra/modules; \ - cp -f ${SRCROOT}/artwork/themes/default/* ${IMGROOT}/Extra/Themes/Default; \ - 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) \ +dist image: all + @echo "================= Distrib =================" + @echo "\t[RM] ${IMGROOT}" + @rm -rf ${IMGROOT} + @echo "\t[MKDIR] ${IMGROOT}/usr/standalone/i386" + @mkdir -p ${IMGROOT}/usr/standalone/i386 + @echo "\t[MKDIR] ${IMGROOT}/Extra/modules" + @mkdir -p ${IMGROOT}/Extra/modules + @echo "\t[MKDIR] ${IMGROOT}/Extra/Themes/Default" + @mkdir -p ${IMGROOT}/Extra/Themes/Default + @if [ -e "$(IMGSKELROOT)" ]; then \ + @echo "\t[CP] ${IMGROOTSKEL} ${IMGROOT}" \ + @cp -R -f "${IMGSKELROOT}"/* "${IMGROOT}"; \ fi; + @cp -f ${SYMROOT}/i386/cdboot ${CDBOOT} + @cp -f ${SYMROOT}/i386/modules/* ${IMGROOT}/Extra/modules + @cp -f ${SRCROOT}/artwork/themes/default/* ${IMGROOT}/Extra/Themes/Default + @cp -f ${SYMROOT}/i386/boot ${IMGROOT}/usr/standalone/i386 + @cp -f ${SYMROOT}/i386/boot0 ${IMGROOT}/usr/standalone/i386 + @cp -f ${SYMROOT}/i386/boot0md ${IMGROOT}/usr/standalone/i386 + @cp -f ${SYMROOT}/i386/boot1h ${IMGROOT}/usr/standalone/i386 + @cp -f ${SYMROOT}/i386/boot1f32 ${IMGROOT}/usr/standalone/i386 + @echo "\t[HDIUTIL] ${ISOIMAGE}" + @hdiutil makehybrid -iso -joliet -hfs -hfs-volume-name \ + ${CDLABEL} -eltorito-boot ${CDBOOT} -no-emul-boot -ov -o \ + "${ISOIMAGE}" ${IMGROOT} -quiet + @echo "\t[GZ] ${DISTFILE}.tar.gz" + @rm -f ${DISTFILE}.tar.gz + @tar -cf ${DISTFILE}.tar ${IMGROOT} + @gzip --best ${DISTFILE}.tar pkg installer: all - @if [ -e "$(SYMROOT)" ]; then \ - sudo ${SRCROOT}/package/buildpkg.sh ${SYMROOT}/package; \ - fi; + @# TODO: remove sudo + sudo ${SRCROOT}/package/buildpkg.sh ${SYMROOT}/package; $(SYMROOT)/i386/vers.h: version @echo "#define I386BOOT_VERSION \"5.0.132\"" > $@