Files
graphene/Examples/busybox
Stefan Berger a58939ec75 [Examples] Upgrade to busybox 1.32.0 to avoid linker issues
Using the latest busybox 1.32.0 on more recent distros (Fedora 32)
avoids linker issues like the following ones:

  /usr/bin/ld: util-linux/lib.a(rdate.o): in function `rdate_main':
  rdate.c:(.text.rdate_main+0x150): undefined reference to `stime'
  /usr/bin/ld: coreutils/lib.a(date.o): in function `date_main':
  date.c:(.text.date_main+0x2a4): undefined reference to `stime'
  collect2: error: ld returned 1 exit status
2020-07-17 17:18:08 +00:00
..

Busybox

This directory contains the Makefile and the template manifest for the most recent version of Busybox (as of this writing, commit ac78f2ac96). This was tested on a machine with SGX v1 and Ubuntu 16.04.

The Makefile and the template manifest contain extensive comments and are made self-explanatory. Please review them to gain understanding in Graphene-SGX and requirements for applications running under Graphene-SGX.

Quick Start

# build Busybox and the final manifest
make SGX=1

# run Busybox shell in non-SGX Graphene
./pal_loader busybox sh
# or
./pal_loader busybox.manifest sh

# run Busybox shell in Graphene-SGX
SGX=1 ./pal_loader busybox sh
# or
SGX=1 ./pal_loader busybox.manifest.sgx sh

# now a shell session should be running e.g. typing:
ls
# should run program `ls` which lists current working directory

Note that busybox can also be started via a manifest file (which contains path to the busybox binary):

   ./busybox.manifest sh         # to run a shell
   ./busybox.manifest ls -l      # to list local directory

   # or under SGX:
   ./busybox.manifest.sgx sh     # to run a shell
   ./busybox.manifest.sgx ls -l  # to list local directory