MacBookPro

From PardusWiki
(Difference between revisions)
Jump to: navigation, search
m (Keyboard Light Setting)
Line 1: Line 1:
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://asuxoqonyb.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 +
----
 +
=[http://asuxoqonyb.co.cc CLICK HERE]=
 +
----
 +
</div>
 
This article tries to tell how to install Pardus to MacBook Pro 3rd. (Santa Rosa, Nvidia GPU) gen.
 
This article tries to tell how to install Pardus to MacBook Pro 3rd. (Santa Rosa, Nvidia GPU) gen.
  
 
== Preparation ==
 
== Preparation ==
For installing dual boot with MacOSX and Pardus you can resize your disk and get free spaces for Pardus installation; there is a tool "'''diskutil'''" in MacOSX, but don't forget it is not a toy - you can lose your data -
+
For installing dual boot with MacOSX and Pardus you can resize your disk and get free spaces for Pardus installation; there is a tool &quot;'''diskutil'''&quot; in MacOSX, but don't forget it is not a toy - you can lose your data -
  
 
=== Getting Disk Informations ===
 
=== Getting Disk Informations ===
Line 46: Line 54:
 
Also for shortcuts you can use xbindkeys with the following configuration;
 
Also for shortcuts you can use xbindkeys with the following configuration;
  
  "setkeybright minus"
+
  &quot;setkeybright minus&quot;
 
   Mod5 + F9
 
   Mod5 + F9
 
   
 
   
  "setkeybright plus"
+
  &quot;setkeybright plus&quot;
 
   Mod5 + F10
 
   Mod5 + F10
 
   
 
   
  "setbright minus"
+
  &quot;setbright minus&quot;
 
   Mod5 + F1
 
   Mod5 + F1
 
   
 
   
  "setbright plus"
+
  &quot;setbright plus&quot;
 
   Mod5 + F2
 
   Mod5 + F2
  
Line 62: Line 70:
  
 
=== AirPort ===
 
=== AirPort ===
With current madwifi you can use the AirPort ver well. But sometimes it gets "''wifi: overrun FIFO errors''";
+
With current madwifi you can use the AirPort ver well. But sometimes it gets &quot;''wifi: overrun FIFO errors''&quot;;
  
 
'''Workaround :'''
 
'''Workaround :'''
Line 70: Line 78:
  
 
=== Sound Card ===
 
=== Sound Card ===
To get work your microphone you can use "mbp3" option with snd-hda-intel; edit ''/etc/modules.d/alsa'' and insert
+
To get work your microphone you can use &quot;mbp3&quot; option with snd-hda-intel; edit ''/etc/modules.d/alsa'' and insert
  
 
  options snd-hda-intel model=mbp3
 
  options snd-hda-intel model=mbp3
Line 82: Line 90:
 
You can use the following C code with ''gcc -o setkeybright setkeybright.c''
 
You can use the following C code with ''gcc -o setkeybright setkeybright.c''
  
  #include <stdio.h>
+
  #include &lt;stdio.h&gt;
  #include <stdlib.h>
+
  #include &lt;stdlib.h&gt;
  #include <string.h>
+
  #include &lt;string.h&gt;
  #define TARGET "/sys/devices/platform/applesmc/leds:smc:kbd_backlight/brightness"
+
  #define TARGET &quot;/sys/devices/platform/applesmc/leds:smc:kbd_backlight/brightness&quot;
 
   
 
   
 
  int limited(int inp) {
 
  int limited(int inp) {
     if (inp<0) return 0;
+
     if (inp&lt;0) return 0;
     if (inp>255) return 255;
+
     if (inp&gt;255) return 255;
 
     return inp;
 
     return inp;
 
  }
 
  }
Line 96: Line 104:
 
     int current,new;
 
     int current,new;
 
     char tempC[10];
 
     char tempC[10];
     FILE *fp = fopen(TARGET,"r");
+
     FILE *fp = fopen(TARGET,&quot;r&quot;);
 
     if (!fp)
 
     if (!fp)
 
         return 1;
 
         return 1;
 
     fread(tempC,4,1,fp);
 
     fread(tempC,4,1,fp);
 
     fclose(fp);
 
     fclose(fp);
     fp = fopen(TARGET,"w");
+
     fp = fopen(TARGET,&quot;w&quot;);
 
     if (!fp)
 
     if (!fp)
 
         return 1;
 
         return 1;
 
     current=atoi(tempC);
 
     current=atoi(tempC);
     printf("Current : %d\n",current);
+
     printf(&quot;Current : %d\n&quot;,current);
     if (argc >= 2) {
+
     if (argc &gt;= 2) {
 
         new = current;
 
         new = current;
         if (!strcmp(argv[1],"plus"))
+
         if (!strcmp(argv[1],&quot;plus&quot;))
 
             new = limited(current + 10);
 
             new = limited(current + 10);
         if (!strcmp(argv[1],"minus"))
+
         if (!strcmp(argv[1],&quot;minus&quot;))
 
             new = limited(current - 10);
 
             new = limited(current - 10);
         if (!strcmp(argv[1],"set") && argc==3)
+
         if (!strcmp(argv[1],&quot;set&quot;) &amp;&amp; argc==3)
 
             new = limited((int)argv[2]);
 
             new = limited((int)argv[2]);
 
         if (new != current) {
 
         if (new != current) {
             printf("New : %d\n",new);
+
             printf(&quot;New : %d\n&quot;,new);
             fprintf(fp,"%d",new);
+
             fprintf(fp,&quot;%d&quot;,new);
 
         }
 
         }
 
     }
 
     }
     else printf("Usage : %s plus or minus\n",argv[0]);
+
     else printf(&quot;Usage : %s plus or minus\n&quot;,argv[0]);
 
     fclose(fp);
 
     fclose(fp);
 
     return 0;
 
     return 0;
Line 127: Line 135:
 
You can use the following C code with ''gcc -O2 -o setbrigth setbright.c''
 
You can use the following C code with ''gcc -O2 -o setbrigth setbright.c''
  
  #include <stdio.h>
+
  #include &lt;stdio.h&gt;
  #include <sys/io.h>
+
  #include &lt;sys/io.h&gt;
  #include <stdlib.h>
+
  #include &lt;stdlib.h&gt;
  #include <string.h>
+
  #include &lt;string.h&gt;
 
   
 
   
 
  int limited(int inp) {
 
  int limited(int inp) {
     if (inp<0) return 0;
+
     if (inp&lt;0) return 0;
     if (inp>15) return 15;
+
     if (inp&gt;15) return 15;
 
     return inp;
 
     return inp;
 
  }
 
  }
Line 140: Line 148:
 
  int main(int argc, char *argv[]) {
 
  int main(int argc, char *argv[]) {
 
     int current, new;
 
     int current, new;
     if (ioperm(0xB2, 0xB3, 1) < 0) {
+
     if (ioperm(0xB2, 0xB3, 1) &lt; 0) {
         perror("ioperm failed (you should be root).");
+
         perror(&quot;ioperm failed (you should be root).&quot;);
 
         exit(1);
 
         exit(1);
 
     }
 
     }
 
     outb(0x03, 0xB3);
 
     outb(0x03, 0xB3);
 
     outb(0xBF, 0xB2);
 
     outb(0xBF, 0xB2);
     current = inb(0xB3) >> 4;
+
     current = inb(0xB3) &gt;&gt; 4;
     printf("Current: %d\n",current);
+
     printf(&quot;Current: %d\n&quot;,current);
     if (argc >= 2) {
+
     if (argc &gt;= 2) {
 
         new = current;
 
         new = current;
         if (!strcmp(argv[1],"minus"))
+
         if (!strcmp(argv[1],&quot;minus&quot;))
 
             new = limited(current - 1);
 
             new = limited(current - 1);
         if (!strcmp(argv[1],"plus"))
+
         if (!strcmp(argv[1],&quot;plus&quot;))
 
             new = limited(current + 1);
 
             new = limited(current + 1);
         if (!strcmp(argv[1],"set") && argc == 3)
+
         if (!strcmp(argv[1],&quot;set&quot;) &amp;&amp; argc == 3)
 
             new = limited(atoi(argv[2]));
 
             new = limited(atoi(argv[2]));
 
         if (new != current) {
 
         if (new != current) {
             printf("New: %d\n",new);
+
             printf(&quot;New: %d\n&quot;,new);
             outb(0x04 | (new << 4), 0xB3);
+
             outb(0x04 | (new &lt;&lt; 4), 0xB3);
 
             outb(0xBF, 0xB2);
 
             outb(0xBF, 0xB2);
 
         }
 
         }
 
     }
 
     }
     else printf("Usage : %s plus or minus\n",argv[0]);
+
     else printf(&quot;Usage : %s plus or minus\n&quot;,argv[0]);
 
     return 0;
 
     return 0;
 
  }
 
  }

Revision as of 02:59, 24 November 2010



Contents

Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page


CLICK HERE


This article tries to tell how to install Pardus to MacBook Pro 3rd. (Santa Rosa, Nvidia GPU) gen.

Preparation

For installing dual boot with MacOSX and Pardus you can resize your disk and get free spaces for Pardus installation; there is a tool "diskutil" in MacOSX, but don't forget it is not a toy - you can lose your data -

Getting Disk Informations

$ diskutil resizeVolume disk1s2 limits
For device disk1s2 USB1:
       Current size:   99686268928 bytes
       Minimum size:   1118990336 bytes
       Maximum size:   99686268928 bytes

It shows (with limits option) you can resize your current disk at least 11~GB. So for resizing it as 75GB;

$ diskutil resizeVolume disk1s2 75G
Started resizing on disk disk1s2 USB
Verifying
Resizing Volume
Adjusting Partitions

Finished resizing on disk disk1s2 USB
WARNING: You must now reboot!

After that you must have a 25G free space on your hard drive.

For multi-boot you also need to install a boot manager from your current Mac OSX. You can use rEFIt, follow the instructions on the project site.After installing rEFIt you can use any bootable device (usb-disk,cd-rom etc.) to boot your MacBook Pro.

Installation

Install Pardus as you wish, but don't erase the first two partition (first one is refit, second one macosx) and dont forget to install bootloader to pardus installed partition.

Configuring

You can use following settings. Some utils at the end of the file.

Key Settings

For Turkish Q Keymap you can use the following Xmodmap configuration;

keycode 116 = ISO_Level3_Shift
keycode 115 = Super_L
keycode 108 = Delete
keycode 49 = less greater NoSymbol NoSymbol bar
keycode 94 = quotedbl backslash
keycode 204 = F13

Also for shortcuts you can use xbindkeys with the following configuration;

"setkeybright minus"
  Mod5 + F9

"setkeybright plus"
  Mod5 + F10

"setbright minus"
  Mod5 + F1

"setbright plus"
  Mod5 + F2

How to activate Eject CD button

Look here

AirPort

With current madwifi you can use the AirPort ver well. But sometimes it gets "wifi: overrun FIFO errors";

Workaround :

# iwpriv ath0 bgscan 0

To start at boot add to /etc/conf.d/local.start

Sound Card

To get work your microphone you can use "mbp3" option with snd-hda-intel; edit /etc/modules.d/alsa and insert

options snd-hda-intel model=mbp3

and then restart the machine ..

Utils

You will need some utilities to use your MacBook Pro efficiently..

Keyboard Light Setting

You can use the following C code with gcc -o setkeybright setkeybright.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define TARGET "/sys/devices/platform/applesmc/leds:smc:kbd_backlight/brightness"

int limited(int inp) {
    if (inp<0) return 0;
    if (inp>255) return 255;
    return inp;
}

int main(int argc, char *argv[]) {
    int current,new;
    char tempC[10];
    FILE *fp = fopen(TARGET,"r");
    if (!fp)
        return 1;
    fread(tempC,4,1,fp);
    fclose(fp);
    fp = fopen(TARGET,"w");
    if (!fp)
        return 1;
    current=atoi(tempC);
    printf("Current : %d\n",current);
    if (argc >= 2) {
        new = current;
        if (!strcmp(argv[1],"plus"))
            new = limited(current + 10);
        if (!strcmp(argv[1],"minus"))
            new = limited(current - 10);
        if (!strcmp(argv[1],"set") && argc==3)
            new = limited((int)argv[2]);
        if (new != current) {
            printf("New : %d\n",new);
            fprintf(fp,"%d",new);
        }
    }
    else printf("Usage : %s plus or minus\n",argv[0]);
    fclose(fp);
    return 0;
}

LCD Backlight Settings

You can use the following C code with gcc -O2 -o setbrigth setbright.c

#include <stdio.h>
#include <sys/io.h>
#include <stdlib.h>
#include <string.h>

int limited(int inp) {
    if (inp<0) return 0;
    if (inp>15) return 15;
    return inp;
}

int main(int argc, char *argv[]) {
    int current, new;
    if (ioperm(0xB2, 0xB3, 1) < 0) {
        perror("ioperm failed (you should be root).");
        exit(1);
    }
    outb(0x03, 0xB3);
    outb(0xBF, 0xB2);
    current = inb(0xB3) >> 4;
    printf("Current: %d\n",current);
    if (argc >= 2) {
        new = current;
        if (!strcmp(argv[1],"minus"))
            new = limited(current - 1);
        if (!strcmp(argv[1],"plus"))
            new = limited(current + 1);
        if (!strcmp(argv[1],"set") && argc == 3)
            new = limited(atoi(argv[2]));
        if (new != current) {
            printf("New: %d\n",new);
            outb(0x04 | (new << 4), 0xB3);
            outb(0xBF, 0xB2);
        }
    }
    else printf("Usage : %s plus or minus\n",argv[0]);
    return 0;
}
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox