Apple MacBook/Configuration Files
From Gentoo Linux Wiki
< Apple MacBook(Redirected from HARDWARE Apple MacBook/Configuration Files)
Contents |
[edit] /etc/fstab
If you want gnome-volume-manager to automatically mount your OS X partition use the "noauto" option.
# /etc/fstab: static file system information. # # # <file system> <mount point> <type> <options> <dump> <pass> /dev/sda2 /mnt/OSX hfsplus ro,exec,auto,users 0 0 /dev/sda3 / reiserfs defaults 0 0 #/dev/sda4 /home ext3 defaults,errors=remount-ro 0 1 #/dev/sda4 /mnt/Shared_Disk vfat users,auto,uid=1000,gid=100,umask=007 0 0 /dev/hda /mnt/cdrom iso9660 noauto,user,ro 0 0 proc /proc proc defaults 0 0 shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 #/swapfile swap swap defaults 0 0
[edit] /etc/make.conf
A make.conf for MacBook 2nd Generation (Core 2 Duo)
# Consult make.conf example for more detail.
# Core 2 Duo, 32bit, specific
# Build Flags
# [[Safe Cflags]]
# [[TIP Safe LDFLAGS]]
CHOST="i686-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -fomit-frame-pointer -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
LDFLAGS="-Wl,-O1"
# Portage
# NICENESS sets system priority. 10 is a reasonable value.
PORTAGE_TMPDIR=/var/tmp
PORTDIR=/usr/portage
PORT_LOGDIR=/var/log/portage
PORTAGE_NICENESS=10
AUTOCLEAN="yes"
PORTDIR_OVERLAY=/usr/local/portage
#FEATURES="distlocks userpriv sandbox"
FEATURES="ccache"
CCACHE_DIR="/var/tmp/ccache/"
CCACHE_SIZE="1G"
# Hardware Specs
ACCEPT_KEYWORDS="~x86" # use "x86" for Gentoo stable.
VIDEO_CARDS="i810 vesa"
ALSA_CARDS="hda-intel"
INPUT_DEVICES="keyboard mouse synaptics evdev"
#CONFIG_MAC_EMUMOUSEBTN=y
# Your Mileage May Vary: some will want to unminus mysql and/or qt and/or kde
USE="aac acpi alsa apm ati avahi avi bluetooth cdrom cdr cjk crypt \
cups dbus dri dvd dvdr encode esd firefox flash ftp freetype \
gmail gdbm gif gimp glibc-omitfp gnome gphoto2 gpm gstreamer gtk \
gtk2 hal ieee1394 imagemagick imap java javascript jpeg kerberos \
libg++ lm_sensors mad madwifi mime mmx mono mozilla mp3 mpeg msn \
ncurses nptlonly nsplugin ogg oggvorbis opengl oss pam pdf pmu \
posix png ppds quicktime real samba spell sse sse2 svg sysfs \
theora tiff truetype unicode usb userlocales vorbis wifi \
win32codecs X xine xml xml2 xpm \
-arts -fortran -joystick -kde -motif -mysql -qt3 -qt4"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/ \
http://gentoo.osuosl.org/ \
http://gentoo.chem.wisc.edu/gentoo/"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
#SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
# Needed form some applications including Open-Office:
LINGUAS="en"
[edit] /boot/grub/grub.conf
# grub.conf # MacBook-Gentoo # Which listing to boot as default. 0 is the first, 1 the second etc. default 0 # How many seconds to wait before the default listing is booted. timeout 3 # # Splashscreen Optional #splashimage=(hd0,2)/boot/grub/splash.xpm.gz ## hiddenmenu # Hides the menu by default (press ESC to see the menu) hiddenmenu # Pretty colours #color cyan/blue white/blue ## password ['--md5'] passwd # If used in the first section of a menu file, disable all interactive editing # control (menu entry editor and command-line) and entries protected by the # command 'lock' # e.g. password topsecret # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/ # password topsecret title Vanilla Sources Kernel - 2.6.22-rc1-macbook-coreduo root (hd0,2) kernel /boot/vmlinuz-2.6.22-rc1-macbook-coreduo root=/dev/sda3 vga=792 #initrd /boot/initrd.img-(version) #quiet #savedefault #boot
[edit] Kernel .config
Because of the size of the configurations they are moved to another page:
[edit] /etc/X11/xorg.conf
Origianlly built with X -configure, added support for AIGLX (commented) so you can have Beryl/Compiz installed. Added section to trackpad function to improve it's movement.
Section "ServerLayout"
Identifier "MacBook - First Generation"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Synaptics Touchpad"
Screen "Screen 1"
# Beryl/Compiz - AIGLX built in xorg-server 7.1 and >
# Option "AIGLX" "true"
EndSection
Section "Extensions"
# Beryl/Compiz
Option "Composite" "Enable"
EndSection
Section "Files"
RgbPath "/usr/share/X11/rgb"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/misc/"
FontPath "/usr/share/fonts/Type1/"
FontPath "/usr/share/fonts/TTF/"
FontPath "/usr/share/fonts/OTF"
# Unantialiased Fonts:
# FontPath "/usr/share/fonts/100dpi/"
# FontPath "/usr/share/fonts/75dpi/"
EndSection
Section "Module"
Load "glx"
Load "extmod"
Load "xtrap"
Load "record"
Load "dbe"
Load "dri"
Load "freetype"
Load "type1"
Load "synaptics"
# Disabled for AIGLX
# Load "GLcore"
# Load "vbe"
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "InputDevice"
Identifier "Keyboard1"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
# Option "XkbOptions" "lv3:ralt_switch"
EndSection
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "SHMConfig" "true"
Option "LeftEdge" "100"
Option "RightEdge" "1120"
Option "TopEdge" "50"
Option "BottomEdge" "310"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "VertScrollDelta" "20"
Option "HorizScrollDelta" "50"
Option "MinSpeed" "0.79"
Option "MaxSpeed" "0.88"
Option "AccelFactor" "0.0015"
# Option "HorizScrollDelta" "0"
EndSection
Section "Device"
Identifier "i945GM"
Driver "i810"
VendorName "Intel Corporation"
BoardName "Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
# Beryl/Compiz
Option "DRI" "true"
Option "XAANoOffscreenPixmaps" "true"
# Xorg.0.log was spitting warnings about BusID
# BusID "PCI:0:2:0"
EndSection
Section "Monitor"
Identifier "Built-in LCD"
VendorName "APP"
ModelName "9c5f"
# Hope the values are correct. Taken from Debian Wiki. Saw no values in documentation.
HorizSync 28-64
VertRefresh 43-60
# A Modeline is a configuration line in the XFree86 configuration file
# (XF86Config) that provides information to the X server about a connected
# computer monitor or television and how to drive it at a specified display
# resolution. Modelines may no longer be necessary in XFree86 versions 4
# and higher ...
# Detect Modelines (less probing): gtf horiz_res vert_res refresh_rate
Modeline "1280x800_60.00" 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync
Modeline "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync
Modeline "800x600_60.00" 38.22 800 832 912 1024 600 601 604 622 -HSync +Vsync
Modeline "640x480_60.00" 23.86 640 656 720 800 480 481 484 497 -HSync +Vsync
EndSection
Section "Screen"
Identifier "Screen 1"
Device "i945GM"
Monitor "Built-in LCD"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 8
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "DRI"
Group 0
Mode 0666
EndSection
[edit] lilo.conf
# # Global LILO settings # boot=/dev/sda3 timeout=5 default=Linux # # Kernel specific LILO settings # image=/boot/<kernel image file> # # Uncomment the next line if your MacBook locks up # during boot with an APIC-related error message # or if you see strange keyboard problems (double-chars). # #append="noapic acpi=force irqpoll" label= Linux read-only root=/dev/sda3
[edit] wmii
Show Macbook specific Informations in the wmii bar.
/etc/wmii*/status:
#!/bin/sh
# periodically print date and load average to the bar
xwrite() {
file="$1"; shift
echo -n "$@" | wmiir write "$file"
}
wmiir remove /rbar/status 2>/dev/null && sleep 2
echo $WMII_SELCOLORS | wmiir create /rbar/status
while xwrite /rbar/status "$WMII_NORMCOLORS" $LINE #`date` `uptime | sed 's/.*://; s/,//g'`
do
position=`cat /sys/devices/platform/applesmc/position`
freq_cpu0=`cpufreq-info | grep "Taktfrequenz is" | awk '{print $4$5}' | head -n1 | sed 's/\.//'`
freq_cpu1=`cpufreq-info | grep "Taktfrequenz is" | awk '{print $4$5}' | tail -n1 | sed 's/\.//'`
temp_cpu0=`expr \`cat /sys/devices/platform/applesmc/temperature_1\` / 100`
temp_cpu1=`expr \`cat /sys/devices/platform/applesmc/temperature_2\` / 100`
temp_hdd=`expr \`cat /sys/devices/platform/applesmc/temperature_3\` / 100`
date=`date +"%A %d.%m.%y %H:%M:%S"`
load=`uptime | sed 's/.*://; s/,//g'`
nets=`/sbin/ip addr show dev eth0 | grep inet | awk '{print $2}'`
uptime=`uptime | awk '{print $3}' | sed 's/,//g'`
bat_state=`cat /proc/acpi/battery/BAT0/state | grep "ing state" | awk '{print $3}'`
bat_full=`cat /proc/acpi/battery/BAT0/info | grep "full" | awk '{print $4}'`
bat_rem=`cat /proc/acpi/battery/BAT0/state | grep "remain" | awk '{print $3}'`
#ac_adapt=`cat /proc/acpi/ac_adapter/ADP1/state | awk '{print $2}'` #see bat_state
pcm_mix=`amixer sget PCM | awk '/Left.+\[.+%\]/ {print $5}' | sed 's/\[//' | sed 's/\]//'`
front_mute=`amixer sget Front | awk '/Left.+\[.+%\]/ {print $7}'`
LINE="$position | PCM: $pcm_mix $front_mute | Bat ${bat_rem}/${bat_full} $bat_state | $nets | CPU0: ${freq_cpu0}@${temp_cpu0}°C CPU1: ${freq_cpu1}@${temp_cpu1} | HDD: ${temp_hdd}°C | $load | $date | $uptime up"
sleep 0.2
done
