운영체제 xv6 맥북(macOS)에 가상환경 없이 VScode에 설치하기
환경 : macOS 맥북 에어 m1
1. homebrew 설치
① homebrew 설치 유무 확인
brew -v
② 없다면 설치
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. qemu 설치
brew install qemu
환경 변수 설정하고
brew install i686-elf-gcc
3. xv6 클론하기
git clone https://github.com/mit-pdos/xv6-public
GitHub - mit-pdos/xv6-public: xv6 OS
xv6 OS. Contribute to mit-pdos/xv6-public development by creating an account on GitHub.
github.com
4. VScode에서
xv6-public폴더를 연다.
5. Makefile 수정
35번째줄 주석 해제
TOOLPREFIX = i686-elf-
54번째줄 주석 해제
QEMU = qemu-system-i386 -rtc base=localtime
61번째줄
then echo qemu-system-i386 -rtc base=localtime; exit; \
63번째줄
then echo qemu-system-x86_64 -rtc base=localtime; exit; \
79번째줄
CFLAGS = -fno-pic -static -fno-builtin -fno-strict-aliasing -O2 -Wall -MD -ggdb -m32 -fno-omit-frame-pointer
6. 터미널 실행
make
make qemu-nox
그냥 make qemu를 할 시 새로운 창이 떠진다. 그러므로 -nox를 붙이기