Skip to content

Instantly share code, notes, and snippets.

@peo3
Created November 2, 2013 07:18
Show Gist options
  • Select an option

  • Save peo3/7276454 to your computer and use it in GitHub Desktop.

Select an option

Save peo3/7276454 to your computer and use it in GitHub Desktop.

Revisions

  1. peo3 created this gist Nov 2, 2013.
    35 changes: 35 additions & 0 deletions hello.patch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    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 $@.d -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");
    +}