顯示具有 Mac 標籤的文章。 顯示所有文章
顯示具有 Mac 標籤的文章。 顯示所有文章

10/10/2010

Building Android Source Code on Snow Leopard Server

1. Install XCode with 10.4 support.

2. Follow "Get Android Source Code" page to setup the environment, install MacPorts and all required packages.

3. Follow this page to install Java 1.5 and set it as the default java compiler.

4. Link gcc to version 4.0
  • sudo rm /usr/bin/gcc
  • sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc
5. Link missing include files to 10.6 gcc
  • cd /Developer/SDKs/MacOSX10.4u.sdk/usr/include
  • sudo ln -s /Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/emmintrin.h emmintrin.h
  • sudo ln -s /Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/float.h float.h
  • sudo ln -s /Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/mm_malloc.h mm_malloc.h
  • sudo ln -s /Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/mmintrin.h mmintrin.h
  • sudo ln -s /Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/xmmintrin.h xmmintrin.h
  • sudo ln -s /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/stdarg.h stdarg.h
6. Export environment variables for gcc and g++
  • export CC=gcc-4.0
  • export CXX=g++-4.0
7. install e2fsprogs
  • sudo port install e2fsprogs
8. Build it!

9/28/2010

Snow Leopard Server: Booting Up With 32 or 64 Bit Kernel

Snow Leopard Server (SLS) has built in 32-bit and 64-bit kernel. You can choose to boot up with 32 or 64 bit kernel by using the following two methods.

Method 1:
  • Booting up your Mac and holding "6" and "4" key, the server will boot up with 64-bit kernel.
  • Booting up your Mac and holding "3" and "2" key, the server will boot up with 32-bit kernel.
Your Mac will revert to the default kernel (32-bit) next time you boot up.

Method 2:
  • The following command will change the default kernel to 64-bit.
sudo systemsetup -setkernelbootarchitecture x86_64
  • The following command will change the default kernel to 32-bit.
sudo systemsetup -setkernelbootarchitecture i386

This method will change the default boot kernel and will take effect every time when start up.