Closed17

ゼロからのOS自作入門 Ubuntu on Mac [第2章] error 000E: File/directory not found in workspace

kanekoukanekou

第二章の 「EDKⅡ入門とメモリマップ」のedkのbuildでエラー

$ build
Build environment: Linux-5.11.0-34-generic-x86_64-with-glibc2.29
Build start time: 15:33:10, Sep.13 2021

WORKSPACE        = /home/mikan/edk2
EDK_TOOLS_PATH   = /home/mikan/edk2/BaseTools
CONF_PATH        = /home/mikan/edk2/Conf
PYTHON_COMMAND   = /usr/bin/python3.8


build.py...
 : error 000E: File/directory not found in workspace
		/home/mikan/edk2/MikanLoaderPkg/MikanLoaderPkg.dsc (Please give file in absolute path or relative to WORKSPACE)

- Failed -
Build end time: 15:33:10, Sep.13 2021
Build total time: 00:00:00
kanekoukanekou

enviroment

  • MacBook Pro (13-inch, 2019, Four Thunderbolt 3 ports)
  • Processer 2.4 GHz Quad-Core Intel Core i5
  • Memory 16 GB 2133 MHz LPDDR3
  • Graphics Intel Iris Plus Graphics 655 1536 MB
  • macOS Big Sur Version 11.2.3 (2021/09/13 時点)
kanekoukanekou

targetに指定したpathがおかしいか,シンボリックリンクがおかしいか

kanekoukanekou

~/edk2ls -lしてみた.
正しそう

mikan@mikan-VirtualBox:~/edk2$ ls -l
:
lrwxrwxrwx  1 mikan mikan    28  99 21:01 MikanLoaderPkg -> '$HOME/mikanos/MikanLoaderPkg'
kanekoukanekou

target.txtのACTIVE_PLATFORMの設定がおかしいのかな

ACTIVE_PLATFORM       = MikanLoaderPkg/MikanLoaderPkg.dsc
kanekoukanekou

もう一回シンボリックリンクを貼ってみる

mikan@mikan-VirtualBox:~/edk2$ unlink MikanLoaderPkg 
mikan@mikan-VirtualBox:~/edk2$ ln -s \$HOME/mikanos/MikanLoaderPkg ./
kanekoukanekou

あーわかった.$HOMEの前に逆スラッシュが勝手に入り,文字として認識されてしまってた.

kanekoukanekou

このように指定することで,buildまでいけた

mikan@mikan-VirtualBox:~/edk2$ ln -s ../mikanos/MikanLoaderPkg ./
mikan@mikan-VirtualBox:~/edk2$ build
:
- Done -
Build end time: 15:48:42, Sep.13 2021
Build total time: 00:00:14
kanekoukanekou

やっぱりシンボリックリンクの貼り方が悪かったりするのかな

lrwxrwxrwx  1 mikan mikan        25  913 15:48 MikanLoaderPkg -> ../mikanos/MikanLoaderPkg
kanekoukanekou

相対パスではなく,絶対パスで指定してみるか

kanekoukanekou
$ ln -s ~/mikanos/MikanLoaderPkg ./
$ build
Build environment: Linux-5.11.0-34-generic-x86_64-with-glibc2.29
Build start time: 16:07:18, Sep.13 2021

WORKSPACE        = /home/mikan/edk2
EDK_TOOLS_PATH   = /home/mikan/edk2/BaseTools
CONF_PATH        = /home/mikan/edk2/Conf
PYTHON_COMMAND   = /usr/bin/python3.8


Architecture(s)  = X64
Build target     = DEBUG
Toolchain        = CLANG38

Active Platform          = /home/mikan/edk2/MikanLoaderPkg/MikanLoaderPkg.dsc

Processing meta-data . done!
Building ... /home/mikan/edk2/MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MdePkg/Library/UefiLib/UefiLib.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MdePkg/Library/BaseLib/BaseLib.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf [X64]
make: Nothing to be done for 'tbuild'.
Building ... /home/mikan/edk2/MikanLoaderPkg/Loader.inf [X64]
make: Nothing to be done for 'tbuild'.

- Done -
Build end time: 16:07:20, Sep.13 2021
Build total time: 00:00:01
kanekoukanekou

buildした時のmake: Nothing to be done for 'tbuild'.が気になるな...

このスクラップは2021/12/19にクローズされました