목표 : qemu에 op-tee os를 설치한 후 테스트
필자 환경 : ubuntu 24.04.2 (라즈베리파이)
sudo apt update
sudo apt upgrade
sudo apt install -y adb acpica-tools autoconf automake bc bison build-essential ccache cpio cscope curl device-tree-compiler e2tools expect fastboot flex ftp-upload gdisk git libattr1-dev libcap-ng-dev libfdt-dev libftdi-dev libglib2.0-dev libgmp3-dev libhidapi-dev libmpc-dev libncurses5-dev libpixman-1-dev libslirp-dev libssl-dev libtool libusb-1.0-0-dev make repo mtools ninja-build python3-cryptography python3-pip python3-pyelftools python3-serial python-is-python3 rsync swig unzip uuid-dev wget xdg-utils xsltproc xterm xz-utils zlib1g-dev
mkdir -p ~/optee && cd ~/optee
git config --global user.email "1.com"
git config --global user.name "1"
repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml -b 4.5.0
repo sync -j16 --no-clone-bundle
cd build
make -j16 toolchains
make -j16
make run
make run-only
화면이 뜨면 c 입력
Normal World에서 root 입력
예제 테스트
공유 폴더 설정하는 방법
[호스트]
vi /home/code/optee/build/Makefile
QEMU_RUN_ARGS 문자열 검색 후 아래 추가 (path는 본인 경로에 맞게)
QEMU_RUN_ARGS += -fsdev local,id=fsdev0,path=/home/code,security_model=mapped,multidevs=remap -device virtio-9p-pci,fsdev=fsdev0,mount_tag=hostshare
[OP-TEE OS]
mkdir -p /mnt/host
mount -t 9p -o trans=virtio hostshare /mnt/host