Skip to content

Commit 3c92130

Browse files
quic-sgamizquic-cvanscha
authored andcommitted
docs: update package documentation to strip elfs
Update build.md to specify that the boot image needs to be generated using the stripped version of the Resource Manager and C Runtime output binaries. Signed-off-by: Stephany Gamiz <quic_sgamiz@quicinc.com>
1 parent 7ecf251 commit 3c92130

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/build.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ To clean the build, run `scons -c all=true`, or use configuration parameters to
8585

8686
Once you have built the Gunyah Hypervisor, Resource Manager and C Runtime, a boot image can be prepared.
8787

88+
To reduce the size of the boot image, the generated binaries of Resource Manager and C Runtime need to be stripped with the following commands:
89+
```bash
90+
$LLVM/bin/llvm-strip -o <path-to-resource-manager-src>/build/resource-manager.strip <path-to-resource-manager-src>/build/resource-manager
91+
$LLVM/bin/llvm-strip -o <path-to-c-runtime-src>/build/runtime.strip <path-to-c-runtime-src>/build/runtime
92+
```
93+
8894
The individual executables generated by building [Gunyah Hypervisor](https://github.com/quic/gunyah-hypervisor), [Resource Manager](https://github.com/quic/gunyah-resource-manager), and [Gunyah C Runtime](https://github.com/quic/gunyah-c-runtime) need to be integrated into a single `hypvm.elf` boot image.
8995

9096
You will need the [pyelftools](https://github.com/eliben/pyelftools) Python module, available from its upstream project:
@@ -97,8 +103,8 @@ To generate `hypvm.elf` boot image run these steps (substituting `<path>`s for e
97103
```bash
98104
cd <path-to-gunyah-hypervisor-src>
99105
PYTHONPATH=<path-to-pyelftools>/pyelftools tools/elf/package_apps.py \
100-
-a <path-to-resource-manager-src>/build/resource-manager \
101-
-r <path-to-c-runtime-src>/build/runtime \
106+
-a <path-to-resource-manager-src>/build/resource-manager.strip \
107+
-r <path-to-c-runtime-src>/build/runtime.strip \
102108
<path-to-gunyah-hypervisor-src>/build/qemu/gunyah-rm-qemu/production/hyp.elf \
103109
-o <path-to-destination>/hypvm.elf
104110
```

0 commit comments

Comments
 (0)