Created
November 2, 2013 07:18
-
-
Save peo3/7276454 to your computer and use it in GitHub Desktop.
Add hello.so app to OSv. How to compile and run: make; /scripts/run.py -e 'hello.so'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/bootfs.manifest b/bootfs.manifest | |
index c04c161..b3e6479 100644 | |
--- a/bootfs.manifest | |
+++ b/bootfs.manifest | |
@@ -76,4 +76,5 @@ | |
/libzfs.so: libzfs.so | |
/zfs.so: zfs.so | |
/tools/mkfs.so: tools/mkfs/mkfs.so | |
+/hello.so: hello.so | |
diff --git a/build.mk b/build.mk | |
index a6ca63a..e3d897d 100644 | |
--- a/build.mk | |
+++ b/build.mk | |
@@ -603,7 +603,7 @@ $(jni): INCLUDES += -I /usr/lib/jvm/java/include -I /usr/lib/jvm/java/include/li | |
bootfs.bin: scripts/mkbootfs.py bootfs.manifest $(tests) $(tools) \ | |
tests/testrunner.so java/java.so java/runjava.jar \ | |
- zpool.so zfs.so | |
+ zpool.so zfs.so hello.so | |
$(call quiet, $(src)/scripts/mkbootfs.py -o $@ -d [email protected] -m $(src)/bootfs.manifest \ | |
-D jdkbase=$(jdkbase) -D gccbase=$(gccbase) -D \ | |
glibcbase=$(glibcbase) -D miscbase=$(miscbase), MKBOOTFS $@) | |
diff --git a/hello.c b/hello.c | |
new file mode 100644 | |
index 0000000..0f3792c | |
--- /dev/null | |
+++ b/hello.c | |
@@ -0,0 +1,6 @@ | |
+#include <stdio.h> | |
+ | |
+int main(void) | |
+{ | |
+ printf("Hello world\n"); | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment