Closed xiexiewww closed 6 years ago
This is expected. enc.elfbin contains the ELF-wrapped binary image for the enclave, which is then embedded directly into the driver from where it is loaded. That code is not included in this tree.
If 'enclave.elf' contains a suitable self-contained ELF image for the enclave, enclave.elfbin is constructed as:
arm-eabi-objcopy -O binary enclave.elf enclave.bin
arm-eabi-objcopy -I binary -O elf32-littlearm -B arm enclave.bin enclave.elfbin
There are several other assumptions about the image to be loaded baked into the driver -- see encloader.c
for all the gory details. As it exists currently, the driver is really just setup to load and run some benchmarks on a single enclave. This is just something we did for expedience -- the better thing to do would be to add driver IOCTLs for all the enclave operations, define a suitable binary format, and write a loader that used the IOCTLs to create, load and interact with it from usermode.
When we run
make -C driver
to build the driver. ,there is something wrong. xx@xx:~/Komodo$ make -C driver make: Entering directory '/home/xx/Komodo/driver' make -C /home/xx/Komodo/linux M=/home/xx/Komodo/driver modules make[1]: Entering directory '/home/xx/Komodo/linux' make[2]: No rule to make target '/home/xx/Komodo/driver/enc.elfbin', needed by '/home/xx/Komodo/driver/komodo.o'. Stop. Makefile:1522: recipe for target 'module/home/xx/Komodo/driver' failed make[1]: [module/home/xx/Komodo/driver] Error 2 make[1]: Leaving directory '/home/xx/Komodo/linux' Makefile:17: recipe for target 'default' failed make: *** [default] Error 2 make: Leaving directory '/home/xx/Komodo/driver' So,which version of kernel sources for raspberrypi should I use? who can help me? Thank you very much!