Index: trunk/Chameleon.xcodeproj/project.pbxproj =================================================================== --- trunk/Chameleon.xcodeproj/project.pbxproj (revision 2016) +++ trunk/Chameleon.xcodeproj/project.pbxproj (revision 2017) @@ -1116,6 +1116,9 @@ A396E5761502D0580025A245 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = wrapper.rtfd; name = zh_TW; path = zh_TW.lproj/Welcome.rtfd; sourceTree = ""; }; A396E5821502D3320025A245 /* Conclusion.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Conclusion.html; sourceTree = ""; }; A3F1F267141B9B3B00DDA709 /* Readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.txt; sourceTree = ""; }; + AB1DE71815B6E2D00088E06B /* Cconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Cconfig; sourceTree = ""; }; + AB1DE71A15B6E2D00088E06B /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + AB1DE71B15B6E2D00088E06B /* Sata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Sata.c; 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 = ""; }; B0056CE911F3868000754B65 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; @@ -2685,6 +2688,7 @@ A3561D021414024D00E9B51E /* MakeInc.dir */, A3561D031414024D00E9B51E /* Modules.txt */, A3561D041414024D00E9B51E /* Resolution */, + AB1DE71715B6E2D00088E06B /* Sata */, A3561D0F1414024D00E9B51E /* uClibcxx */, ); path = modules; @@ -3043,6 +3047,24 @@ path = Scripts; sourceTree = ""; }; + AB1DE71715B6E2D00088E06B /* Sata */ = { + isa = PBXGroup; + children = ( + AB1DE71815B6E2D00088E06B /* Cconfig */, + AB1DE71915B6E2D00088E06B /* include */, + AB1DE71A15B6E2D00088E06B /* Makefile */, + AB1DE71B15B6E2D00088E06B /* Sata.c */, + ); + path = Sata; + sourceTree = ""; + }; + AB1DE71915B6E2D00088E06B /* include */ = { + isa = PBXGroup; + children = ( + ); + path = include; + sourceTree = ""; + }; B0056CE511F3868000754B65 /* i386 */ = { isa = PBXGroup; children = ( Index: trunk/i386/modules/Cconfig =================================================================== --- trunk/i386/modules/Cconfig (revision 2016) +++ trunk/i386/modules/Cconfig (revision 2017) @@ -7,5 +7,6 @@ source "i386/modules/klibc/Cconfig" source "i386/modules/uClibcxx/Cconfig" source "i386/modules/HelloWorld/Cconfig" +source "i386/modules/Sata/Cconfig" source "i386/modules/Keylayout/Cconfig" endmenu Index: trunk/i386/modules/Sata/Cconfig =================================================================== --- trunk/i386/modules/Sata/Cconfig (revision 0) +++ trunk/i386/modules/Sata/Cconfig (revision 2017) @@ -0,0 +1,10 @@ +# +# Chameleon Modules +# + +config SATA_MODULE + tristate "Sata Module" + default m + ---help--- + Say Y here if you want to enable the use of this module. + Index: trunk/i386/modules/Sata/Sata.c =================================================================== --- trunk/i386/modules/Sata/Sata.c (revision 0) +++ trunk/i386/modules/Sata/Sata.c (revision 2017) @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2011,2012 cparm . All rights reserved. + * + */ + +#include "libsaio.h" +#include "modules.h" +#include "bootstruct.h" +#include "pci.h" +#include "device_inject.h" +#include "platform.h" + +#ifndef DEBUG_SATA +#define DEBUG_SATA 0 +#endif + +#if DEBUG_SATA +#define DBG(x...) printf(x) +#else +#define DBG(x...) +#endif + +void SATA_hook(void* arg1, void* arg2, void* arg3, void* arg4); + +uint8_t default_SATA_ID[]= { + 0x81, 0x26, 0x00, 0x00 +}; +#define SATA_ID_LEN ( sizeof(default_SATA_ID) / sizeof(uint8_t) ) + +void SATA_hook(void* arg1, void* arg2, void* arg3, void* arg4) +{ + pci_dt_t* current = arg1; + struct DevPropDevice *device = NULL; + char *devicepath = NULL; + + if (current && current->class_id == PCI_CLASS_STORAGE_SATA) + { + if (!string) + { + string = devprop_create_string(); + if (!string) return; + } + devicepath = get_pci_dev_path(current); + if (!devicepath) return; + + device = devprop_add_device(string, devicepath); + if (!device) return; + + devprop_add_value(device, "device-id", default_SATA_ID, SATA_ID_LEN); + + verbose("SATA device : [%04x:%04x :: %04x], changed to ICH6 ESB2 \n", + current->vendor_id, current->device_id,current->class_id); + + } + +} + +void Sata_start(void); +void Sata_start(void) +{ + register_hook_callback("PCIDevice", &SATA_hook); +} + Index: trunk/i386/modules/Sata/Makefile =================================================================== --- trunk/i386/modules/Sata/Makefile (revision 0) +++ trunk/i386/modules/Sata/Makefile (revision 2017) @@ -0,0 +1,13 @@ +MODULE_NAME = Sata +MODULE_DESCRIPTION = This module help Sata devices to be recognized as internal +MODULE_AUTHOR = "Cparm" +MODULE_VERSION = "1.0.0" +MODULE_COMPAT_VERSION = "1.0.0" +MODULE_START = $(MODULE_NAME)_start +MODULE_DEPENDENCIES = + +DIR = Sata + +MODULE_OBJS = Sata.o + +include ../MakeInc.dir \ No newline at end of file Index: trunk/i386/modules/Makefile =================================================================== --- trunk/i386/modules/Makefile (revision 2016) +++ trunk/i386/modules/Makefile (revision 2017) @@ -33,6 +33,10 @@ SUBDIRS += Keylayout endif +ifdef CONFIG_SATA_MODULE +SUBDIRS += sata +endif + CFLAGS= -O3 $(MORECPP) -arch i386 -g -static DEFINES= CONFIG = hd Index: trunk/CHANGES =================================================================== --- trunk/CHANGES (revision 2016) +++ trunk/CHANGES (revision 2017) @@ -1,3 +1,6 @@ +- cparm : Added a Sata module, known as YellowIconFixer in my branch, useful to fix yellow icon issue (can also fix an issue with the apple's dvd player application in moutain lion) + , for now not added in the pkg script !!! + - cparm : Ported the OS detection to the trunk, updated the default theme to v 1.1 (credit to blackosx) - Added AtiPorts option to GraphicsEnabler, so users can override the default number of ports. It proved