레이블이 Apple인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Apple인 게시물을 표시합니다. 모든 게시물 표시

2015년 11월 9일 월요일

Installing NASM,Eclipse and QEMU on Macbook Pro 2015 early

My development Environment
Macbook Pro 2015 early
OS X 10.11.1 El Capitan


I am studying to make Operating System. So I am downloading and installing programs.

It is a part of process. 

At first, Download and install Homebrew.  (It is easy tool to download and install programs)


$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

-How to install NASM
$brew install nasm
-How to install Eclipse
click download button on http://www.eclipse.org/ and
Eclipse IDE for C/C++ Developers 
-How to install Java Runtime Environment(JRE)
enter http://www.oracle.com/technetwork/java/index.html 
then, click downloads, Java Runtime Environment
-How to install QEMU
$brew install qemu 
how to launch
$qemu-system-x86_64

2015년 11월 8일 일요일

Make Cross-Compiler(2); How to Build and Install GCC on Macbook Pro 2015 early

- My Development Environment
Mac OS X 10.11.1 El Capitan
already installed Binutils
already installed Xcode

It is similar to build and install Binutils but your time can waste too much.
Please do this when you have enough time.

- Procedure

1. Download  GCC Source codes at https://gcc.gnu.org/ (click 'our mirror sites' after clicking any versions)

2. extract your files
 example)  $ cd ~/Downloads/
                 $ tar -zxvf gcc-5.2.tar.gz  (tar.gz files can extract as zxvf command.)
                 $ cd gcc-5.2   (move to ~/Downloads/gcc-5.2/)
3. downloads libraries when your computer need as this command.
 $ ./contrib/download_prerequisites

4. setup your platform and location.
$ export TARGET=x86_64-pc-linux
$ export PREFIX=/opt/cross  (<- this location is same to setup binutils)

 Confirm .bash_profile  (It is already have after doing Make Cross-Compiler(1))
 You can see
export PATH=/opt/cross/bin:$PATH
when you type  $cat ~/.bash_profile

5. build and install

$ ./configure --target=$TARGET --prefix=$PREFIX --enable-64-bit-bfd --disable-shared --disable-nls
$ make configure-host
$ make LDFLAGS="-all-static"
$ sudo make install

6. How to test gcc cross-compiler after install that.
$ /opt/cross/bin/x86_64-pc-linux-gcc -dumpspecs | grep -A1 multilib_options

result

I use too much time. cheer up! . It is really hard to me. So I leave this text.


-My Problems
C compiler cannot create executables when I type $./configure ~~~blar~~~
Solve this problem to delete installed binutils then to reinstall them in my case.
$rm -rf /opt  can removes all the binutils.  ***Use caution when you type rm command.


References
Book <64비트 멀티코어 OS 원리와 구조>

Procedure of Explanation.
http://nayuta.net/64%EB%B9%84%ED%8A%B8_%EB%A9%80%ED%8B%B0%EC%BD%94%EC%96%B4_OS_%EC%9B%90%EB%A6%AC%EC%99%80_%EA%B5%AC%EC%A1%B0/OS_X%EC%97%90%EC%84%9C_%EA%B0%9C%EB%B0%9C%ED%99%98%EA%B2%BD_%EA%B5%AC%EC%B6%95%ED%95%98%EA%B8%B0

2015년 11월 7일 토요일

Make Cross-Compiler(1); How to Build and Install GNU Binutils on Macbook pro 2015 early


-My Development Environment
 Mac OS X 10.11.1 El Capitan  on Macbook pro 2015 early
 already installed Xcode

* '$' means Teminal Command

- Procedure
Before typing on Command Line.
 Download Binutils 2.25.1.tar.gz  from http://www.gnu.org/software/binutils/
and type these
$ tar -zxvf Binutils 2.25.1.tar.gz
$ cd binutils-2.25.1


 1. Type These Commands
    $ export TARGET=x86_64-pc-linux
    $ export PREFIX=/opt/cross      <- This location(/opt/cross) can be any folders which you want.

2. Type  $ cd ~/
             $ ls -a
 and  find .bash_profile or .profile  If you don't have make .bash_profile to use Vim
($ vim .bash_profile)

3. Type   export PATH=/opt/cross/bin:$PATH

4. Save and quit
     ESC button and :wq

5. Type

  $ ./configure --target=$TARGET --prefix=$PREFIX --enable-64-bit-bfd --disable-shared --disable-nls

  $ make configure-host
  $ make LDFLAGS="-all-static"

then when your computer is no problem,  type $ sudo make install   then input password


-References

Book <64비트 멀티코어 OS 원리와 구조 -한빛미디어>
Sites
http://nayuta.net/64%EB%B9%84%ED%8A%B8_%EB%A9%80%ED%8B%B0%EC%BD%94%EC%96%B4_OS_%EC%9B%90%EB%A6%AC%EC%99%80_%EA%B5%AC%EC%A1%B0/OS_X%EC%97%90%EC%84%9C_%EA%B0%9C%EB%B0%9C%ED%99%98%EA%B2%BD_%EA%B5%AC%EC%B6%95%ED%95%98%EA%B8%B0


How to setup GCC (GNU Complier Collections) on Mac OS X and test to use Vim.

If you contact GCC firstly as this page, please don't believe everything. quest yourself about this page.

 My development environment
: Mac OS X 10.11.1 El Capitan on Macbook pro 2015 early
  Xcode 6.3.1

* I am studying the book; 64비트 멀티코어 OS 원리와 구조.  GCC installation is first procedure for it.
  It is similar to '2.1 GCC 설치' page 50 to  '2.2 크로스 컴파일러 만들기' page 69. but It is for Windows. So I need to do on Mac OS X.

1. Open Terminal
 (Ctrl+ Space)  terminal.app

2. type   $xcode-select --install     (* "$" means on terminal)
    *If you don't know you have GCC or not, type this sentence $ gcc --version

3. click Install(설치)

4. type, too. $gcc -v

completed installation GCC.


until now, how to test GCC on Vim
Vim (old version Vi) is already installed on Mac OS X.
open your terminal.

$vi File_Name       example) $vi test.c

1. Can input codes after pushing a or i or u button.

#include <stdio.h>

int main( int argc, char** argv)
{
     printf("Hello World\n");
     return 0;
}

2. push ESC.

3. when your cursor located bottom, type :w       (it means save)

[Common Test]

4. $gcc -o test.out   (It makes test.out file and It is for test)

5. $ ./test.out   

You can see  Hello world


[My case Test]
4. $gcc -m32 -o test32 test.c
    $gcc -m64 -o test64 test.c 

5. $./test32
    $./test64

If you see  Hello World,  Your GCC can apply 64bit and 32bit.






'ls' command to see files on this location.


-Reference
Book <64비트 멀티코어 OS 원리와 구조 1>

How to use Vim (in Korean)
http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Vim  

Setup Development Environment for 64비트 멀티코어 OS 원리와 구조
http://nayuta.net/64%EB%B9%84%ED%8A%B8_%EB%A9%80%ED%8B%B0%EC%BD%94%EC%96%B4_OS_%EC%9B%90%EB%A6%AC%EC%99%80_%EA%B5%AC%EC%A1%B0/OS_X%EC%97%90%EC%84%9C_%EA%B0%9C%EB%B0%9C%ED%99%98%EA%B2%BD_%EA%B5%AC%EC%B6%95%ED%95%98%EA%B8%B0


2014년 12월 23일 화요일

Linux Mint Install Process on Macbook Air 2009 mid (리눅스 민트 설치과정 맥북 에어 2009 mid)

If you had macbook and want to install Linux Mint which doesn't care Mate or Cinnamon,  It maybe be solution.
I want to Dual OS Environment which are Mac OS X and Linux Mint
  1. Make Linux mint USB boot driver to see under the site http://purpleoksu.blogspot.kr/2014/12/how-to-install-linux-mint-on-macbook.html
  2. Have to Leave 40Gb for Linux mint on 'Disk Utility' Let me be clear decrease mac partition.
  3. Reboot and push the 'Alt+Option' button, then load Linux Mint USB.
  4. Make partition like this http://jsfl.tistory.com/9
    (*It maybe my especially case. Linux mint USB of my macbook doesn't recognize present of Mac OS X, so I chose 'other else' on processing of Linux installation)


    It has 3 areas which are 'Swap area', '/ area' '/home area' / is like C drive of Windows, /home is like D drive of Windows.
     If your Mac recognize present of Mac OS X and can choose Dual OS, your selection have to Dual OS. It case is easy way.
  5.  Install Linux mint
  6.  If you have broadcom LAN  It has problem which is kernel source.
    have to install bcmwl-kernel-source (Linux STA driver)
    It is in Linux USB Driver.  

    7. execute 'Driver Manager'
8. choose bcmwl-kernel-source (*your Linux USB is inserted on your PC)

2014년 12월 17일 수요일

How To make Linux Mint Mate USB Driver on Macbook Air 2009 mid (맥북에어 2009 mid에서 민트 마테 USB 만들기 )


References
http://www.everydaylinuxuser.com/2014/07/how-to-install-linux-mint-alongside-osx.html


1. Download  Linux Mint_Mate visit http://www.linuxmint.com/download.php
   (If you want to install the other version, you can. ex) cinnamon, KDE, Xfce)
2.  Open terminal and write under the sentence

hdiutil convert -format UDRW -o /Users/OKSU/Desktop/linuxmint.img /Users/OKSU/Desktop/linuxmint-17.1-mate-64bit.iso
Input (front directory is  img file name, back directory is Linux mint image location.
*'/Users/OKSU'  equal '~')
3.changed image name will be '.img.dmg '. Delete  '.dmg'
4. Terminal command diskutil list   , It finds   /dev/????  of USB   ???
Example)
Oksuui-MacBook-Air:~ OKSU$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Mac                     116.4 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1  <- * There is USB in my case.
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *7.7 GB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1

   2:                  Apple_HFS Mint                    7.4 GB     disk1s2
5.  USB unmount in Terminal  (Sleep)
 diskutil unmountDisk /dev/disk[number]
6. Upload Image Files in Terminal 
sudo dd if=~/desktop/ubuntu.img of=/dev/disk[number] bs=1m 
need much times (1~10 mins)  ,then pop up message, click 'unmount'
7. Linux mint can't control apple partition, so you have to leave empty spaces to install Linux mint. I recommend 40GB
8. reboot and push the ALT+OPTION button, then load USB 

2014년 12월 15일 월요일

Install Clear Mountain Lion on Macbook Air 2009 Mid (마운틴 라이언 클린설치 on Macbook Air 2009 Mid)

I wanted to install Ubuntu 12.05 on Macbook Air 2009 Mid.
At first, I divided Partitions which are from one to two, then install Ubuntu, but It is wrong method,  (*If you install Ubuntu on your macbook, you have to leave some memories not partitions. You can decrease your main partition, It's all.)
 So Ubuntu was installed in little memory except 2 partitions. It was first problem.
 I couldn't boot OS X. So I retired and gived up. I heard that I can write OS X boot USB on only OS X, It's not. I can write OS X boot USB with 'TransMac' on Windows.
(*Mac drive is HFTS+, So Windows can't read originally. So I used transmac.)
 I wrote snow leopard, Mavericks and Yosemite but It didn't work because My mac is Macbook Air 2009 Mid. It doesn't know Snow leopard and Yosemite in my opinion.
I wrote mountain lion. It didn't finish while my macbook can read mountain lion.
 Final error was 'xar_verify failed' because of wrong dmg file.

Let me be clear,
 there were 2 problems.
1. What I divided partition
2. What I wrote wrong dmg file.

 www.opentutorials.org 생활코딩을 참고하여, 우분투를 설치한다는 것이 맥의 파티션을 나눠서 두번째 파티션을 빈 공간만 남겨놔야하는데, 꽉 채워 파티션을 만들어 논 것 때문에 문제가 되었다. 남은 아주 미세한 용량에 우분투가 설치되고 부팅을 제대로 인식을 못하는 것이였다. 물론 우분투로 부팅이 되고 맥으로 부팅할 수 없었는데 SSD가 어떻게 꼬였는지 엉망이 되었다. 우분투 또한 무슨 문제인지 팬속도가 최대로 돌아가고 과열이 일어나 다운을 먹더니 갑자기 동작또한 안되었다. 맨처음 우분투가 설치되었을 때는 우분투가 모든 하드를 먹으며 설치가 된줄 알고 맥북 맥 OS 날라갔으니, 그냥 우분투 북으로 써야겠다. 라고 생각했었다. 괜찮았을지도..
 어쨌든, 다시 맥 OS X 를 구워 볼까 했는데, 좀 찾아보니 맥 은 HFTS+ 의 포맷방식? 을 사용해서 맥에서만 구울 수 있는 줄 알고, 대략 2~3주 간을 포기한채로 새 맥북 살 때까지는 포기하자.. 라는 마음이였다. 그러나 Transmac이라는 소중한 윈도우의 프로그램을 알고, (Transmac은 윈도우 상에서 dmg파일을 맥에서 부팅가능한 파일로 구울수 있게 해주는 프로그램) 맥 OS X 설치를 하려 했다. 그런데 dmg 파일 자체가 구하기가 맥에서 앱스토어를 통해 다운받아야 되서 구하기가 정말 어려웠다. 토렌트
 처음 내 맥북은 macbook Air 2009 mid 였기에 그래도 하드디스크는 안쓰는 SSD다 (거기다 영자 자판 간지) snow leopard 를 먼저 구워서 부팅했으나  부팅시에 물음표 폴더 뜸.
그다음으로 Yosemite를 구워 봤으나, 인식을 못해서 똑같이 물음표 폴더, 세번 째로 마운틴 라이언을 구웠으나 인식은 되었으나, 마지막 설치 즈음에 '추가 구성요소를 다운로드 할 수 없습니다.' 설치로그 확인하니 'xar_verify failed' 쿨럭. 답도 없단다.  영어 커뮤니티 구글링 중에 램을 바꿔보고 하드가 깨졌다고 그러고 해결이 안되는 사람이 많은 듯 동병상련 중에 마운틴 라이언 dmg파일을 다시 용량이 많은 것으로 다시 구해보니 다행히 설치가 완벽하게 되었다. 다 설치 후 마운틴 라이언을 계속 쓸 수 는 없으니, 요세미티도 무료이고, 요세미티 및 Xcode, Evernote 등 완벽히 설치 해 두었다. 4주만에 맥라이프 복귀하니 뿌듯하며, 엔하위키 미러 설명 중 집도 지어놓았고, 가구도 배치 해놨으니 몸만오시면됩니다. 라는 게 떠오르며, 맥의 소중함을 느꼈다. 그러나 윈도우와 우분투로 갈아탈려고 했다니 맨처음에 (문제 근본 원인) 이렇게 맥라이프로 다시 복귀 하였다. 위의 영문은 문법이 개판일지도..;; 글로벌 사람들에게도 같은 문제가 있다면, 해결책을 주고 싶었다.

 


2014년 12월 10일 수요일

Cocoa, Xcode 관련 커뮤니티

사용자 삽입 이미지
Apple Develope Connection
url: http://www.apple.co.kr/developer/
애플에서 운영하는 맥개발 지원 공식사이트 입니다.  맥개발과 관련하여 필수적인 사이트이며, 레퍼런스, 메뉴얼, 샘플소스, 관련사이트 등 개발에 관련된 전반적인 지원을 받으실 수 있습니다.


사용자 삽입 이미지
Mac OS X 개발자 포럼
url: http://www.osxdev.org
맥 OSX에서 개발에 관한 대표적인 한국 포럼입니다. 위키에서 많은 자료와 번역 자료를 찾을 수 있습니다.



사용자 삽입 이미지
KMUG (한국 매킨토시 사용자 그룹)
url: http://www.kmug.co.kr
맥사용자 사이트이며 개발에 관한 내용은 커뮤니티/공부하자 밑에 코코아/카본 개발실에서 코코아 개발과 관련된 글, 질문/답변을 보실 수 있습니다. 


사용자 삽입 이미지
OS X Page 
url: http://osx.hyperjeff.net
OS X 개발에 관한 심도 있는 자료들을 볼 수 있습니다. 특히 각종 어플리케이션과 소스를 다운로드 받으실 수 있습니다. 적극 추천하는 사이트 입니다. 


사용자 삽입 이미지
iDevGames
url: http://www.idevgames.com
맥 게임개발 커뮤니티 입니다. 맥에서 게임제작과 관련하여 다양한 분류의 자료와 포스트들이 있습니다. 



사용자 삽입 이미지
CS193E
url: http://www.stanford.edu/class/cs193e/
코코아 개발 강좌 사이트 입니다. 메뉴얼, 튜토리알, 강좌, 샘플등을 다운로드 할 수 있습니다.



사용자 삽입 이미지
Cocoabuilder
url: http://www.cocoabuilder.com코코아 개발과 관련된 질문과 답변을 할 수 있는 포럼 사이트 입니다.




사용자 삽입 이미지
CocoaDev
url: http://www.cocoadev.com
코코아 개발과 관련된 Wiki 사이트이며,  커뮤니티와 링크 등 다양한 자료가 있습니다.



사용자 삽입 이미지
CocoaLab
url: http://www.cocoalab.com
Become an Xcoder란 문서로 유명한 코코아와 관련된 위키, 소스, 샘플 등의 자료가 있습니다. 코코아를 처음 시작하시는 분은  Become an Xcoder란 문서를 적극 추천 합니다.


사용자 삽입 이미지
Cocoa dev Central
url: http://www.cocoadevcentral.com
쉽게 따라할 수 있는 코코아 개발 튜토리알 사이트 입니다. 기타 OSX 개발과 관련된 유명 블로그들의 포스트와 링크가 있습니다. 



잘 정리해놓았는데, Chrome OS 즐겨찾기를 해놓았으나, 그래도 담아왔다.

--------------------------------
1차 출처
http://www.cocoadev.co.kr/category