Chameleon

Chameleon Commit Details

Date:2012-07-20 03:56:52 (7 years 2 months ago)
Author:ErmaC
Commit:2024
Parents: 2023
Message:Merge from main trunk: - SATA module. (credits to cparm)
Changes:
A/branches/ErmaC/Trunk/i386/modules/Sata/Cconfig
A/branches/ErmaC/Trunk/i386/modules/Sata/Sata.c
A/branches/ErmaC/Trunk/i386/modules/Sata/Makefile
A/branches/ErmaC/Trunk/i386/modules/Sata
A/branches/ErmaC/Trunk/i386/modules/Sata/include
M/branches/ErmaC/Trunk/CHANGES
M/branches/ErmaC/Trunk/i386/modules/Cconfig
M/branches/ErmaC/Trunk/i386/modules/Makefile

File differences

branches/ErmaC/Trunk/i386/modules/Cconfig
77
88
99
10
1011
1112
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
branches/ErmaC/Trunk/i386/modules/Sata/Cconfig
1
2
3
4
5
6
7
8
9
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.
branches/ErmaC/Trunk/i386/modules/Sata/Sata.c
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
/*
* Copyright (c) 2011,2012 cparm <armelcadetpetit@gmail.com>. 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);
}
branches/ErmaC/Trunk/i386/modules/Sata/Makefile
1
2
3
4
5
6
7
8
9
10
11
12
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
branches/ErmaC/Trunk/i386/modules/Makefile
3333
3434
3535
36
37
38
39
3640
3741
3842
SUBDIRS += Keylayout
endif
ifdef CONFIG_SATA_MODULE
SUBDIRS += sata
endif
CFLAGS= -O3 $(MORECPP) -arch i386 -g -static
DEFINES=
CONFIG = hd
branches/ErmaC/Trunk/CHANGES
1
2
13
24
35
- 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 nvidia plist helper (less time to spend on the device id more time to code :-) )
- Added Recovery Icon for Default Theme (TODO) (credits to blackosx).
- Merge Intel Graphics 4000 device IDs from Chimera (Commit 1999).

Archive Download the corresponding diff file

Revision: 2024