File tree Expand file tree Collapse file tree 5 files changed +32
-0
lines changed
Expand file tree Collapse file tree 5 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 4949 # Install dependencies for build & test
5050 sudo apt-get update -y
5151 sudo apt-get install -y faketime protobuf-compiler libsgx-dcap-ql-dev clang-18 musl-tools gcc-multilib
52+ # ukify tool for elf2uki
53+ sudo apt install systemd-ukify
5254
5355 - name : Setup Rust toolchain
5456 run : |
@@ -132,3 +134,6 @@ jobs:
132134
133135 - name : snmalloc correntness test
134136 run : cd ./examples/mem-correctness-test && cargo run
137+
138+ - name : Run elf2uki example
139+ run : ./examples/elf2uki/convert_hello_world.sh
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ members = [
4141]
4242exclude = [
4343 " examples/backtrace_panic" ,
44+ " examples/elf2uki" ,
4445 " examples/mpsc-crypto-mining" ,
4546 " examples/tls" ,
4647 " examples/unit_tests" ,
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -euo pipefail
3+ set -x
4+
5+ source_dir=$( dirname " ${BASH_SOURCE[0]} " )
6+ app_dir=" $source_dir /hello_world"
7+
8+ pushd " $app_dir "
9+ # builds statically linked bin for `musl`
10+ cargo -q build --release
11+ popd
12+
13+ # build UKI and write it to `/dev/null`
14+ cargo -q run -p elf2uki -- \
15+ --app " $app_dir /target/x86_64-unknown-linux-musl/release/hello_world" \
16+ --cmdline " console=ttyS0 earlyprintk=serial" \
17+ --output /dev/null
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " hello_world"
3+ version = " 0.1.0"
4+ edition = " 2021"
5+
6+ [dependencies ]
Original file line number Diff line number Diff line change 1+ fn main ( ) {
2+ println ! ( "Hello, world!" ) ;
3+ }
You can’t perform that action at this time.
0 commit comments