Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions wasm-hello/build/fc.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

make distclean
UK_DEFCONFIG=$(pwd)/scripts/defconfig/fc.arm64 make defconfig
touch Makefile.uk
make prepare
if test -z "$CC"; then
make -j $(nproc)
else
make CC="$CC" -j $(nproc)
fi
11 changes: 11 additions & 0 deletions wasm-hello/build/fc.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

make distclean
UK_DEFCONFIG=$(pwd)/scripts/defconfig/fc.x86_64 make defconfig
touch Makefile.uk
make prepare
if test -z "$CC"; then
make -j $(nproc)
else
make CC="$CC" -j $(nproc)
fi
11 changes: 11 additions & 0 deletions wasm-hello/build/qemu.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

make distclean
UK_DEFCONFIG=$(pwd)/scripts/defconfig/qemu.arm64 make defconfig
touch Makefile.uk
make prepare
if test -z "$CC"; then
make -j $(nproc)
else
make CC="$CC" -j $(nproc)
fi
11 changes: 11 additions & 0 deletions wasm-hello/build/qemu.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

make distclean
UK_DEFCONFIG=$(pwd)/scripts/defconfig/qemu.x86_64 make defconfig
touch Makefile.uk
make prepare
if test -z "$CC"; then
make -j $(nproc)
else
make CC="$CC" -j $(nproc)
fi
11 changes: 11 additions & 0 deletions wasm-hello/build/xen.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

make distclean
UK_DEFCONFIG=$(pwd)/scripts/defconfig/xen.arm64 make defconfig
touch Makefile.uk
make prepare
if test -z "$CC"; then
make -j $(nproc)
else
make CC="$CC" -j $(nproc)
fi
11 changes: 11 additions & 0 deletions wasm-hello/build/xen.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

make distclean
UK_DEFCONFIG=$(pwd)/scripts/defconfig/xen.x86_64 make defconfig
touch Makefile.uk
make prepare
if test -z "$CC"; then
make -j $(nproc)
else
make CC="$CC" -j $(nproc)
fi
17 changes: 17 additions & 0 deletions wasm-hello/defconfig/fc.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CONFIG_PLAT_KVM=y
CONFIG_KVM_VMM_FIRECRACKER=y
CONFIG_ARCH_ARM_64=y
CONFIG_LIBVFSCORE=y
CONFIG_LIBVFSCORE_AUTOMOUNT_UP=y
CONFIG_LIBRAMFS=y
CONFIG_LIBUKCPIO=y
CONFIG_ARM64_ERRATUM_858921=n
CONFIG_ARM64_ERRATUM_835769=n
CONFIG_ARM64_ERRATUM_843419=n
# Uncomment for debugging.
#CONFIG_LIBUKDEBUG_PRINTD=y
#CONFIG_LIBUKDEBUG_PRINTK_INFO=y
CONFIG_LIBMUSL=y
CONFIG_LIBLWIP=y
CONFIG_LIBWAMR=y
CONFIG_LIBWAMR_MAIN_FUNCTION=y
14 changes: 14 additions & 0 deletions wasm-hello/defconfig/fc.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CONFIG_PLAT_KVM=y
CONFIG_KVM_VMM_FIRECRACKER=y
CONFIG_ARCH_X86_64=y
CONFIG_LIBVFSCORE=y
CONFIG_LIBVFSCORE_AUTOMOUNT_UP=y
CONFIG_LIBRAMFS=y
CONFIG_LIBUKCPIO=y
# Uncomment for debugging.
#CONFIG_LIBUKDEBUG_PRINTD=y
#CONFIG_LIBUKDEBUG_PRINTK_INFO=y
CONFIG_LIBMUSL=y
CONFIG_LIBLWIP=y
CONFIG_LIBWAMR=y
CONFIG_LIBWAMR_MAIN_FUNCTION=y
17 changes: 17 additions & 0 deletions wasm-hello/defconfig/qemu.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CONFIG_PLAT_KVM=y
CONFIG_KVM_VMM_QEMU=y
CONFIG_ARCH_ARM_64=y
CONFIG_LIBVFSCORE=y
CONFIG_LIBVFSCORE_AUTOMOUNT_UP=y
CONFIG_LIBRAMFS=y
CONFIG_LIBUKCPIO=y
CONFIG_ARM64_ERRATUM_858921=n
CONFIG_ARM64_ERRATUM_835769=n
CONFIG_ARM64_ERRATUM_843419=n
# Uncomment for debugging.
#CONFIG_LIBUKDEBUG_PRINTD=y
#CONFIG_LIBUKDEBUG_PRINTK_INFO=y
CONFIG_LIBMUSL=y
CONFIG_LIBLWIP=y
CONFIG_LIBWAMR=y
CONFIG_LIBWAMR_MAIN_FUNCTION=y
14 changes: 14 additions & 0 deletions wasm-hello/defconfig/qemu.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CONFIG_PLAT_KVM=y
CONFIG_KVM_VMM_QEMU=y
CONFIG_ARCH_X86_64=y
CONFIG_LIBVFSCORE=y
CONFIG_LIBVFSCORE_AUTOMOUNT_UP=y
CONFIG_LIBRAMFS=y
CONFIG_LIBUKCPIO=y
# Uncomment for debugging.
#CONFIG_LIBUKDEBUG_PRINTD=y
#CONFIG_LIBUKDEBUG_PRINTK_INFO=y
CONFIG_LIBMUSL=y
CONFIG_LIBLWIP=y
CONFIG_LIBWAMR=y
CONFIG_LIBWAMR_MAIN_FUNCTION=y
16 changes: 16 additions & 0 deletions wasm-hello/defconfig/xen.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
CONFIG_PLAT_XEN=y
CONFIG_ARCH_ARM_64=y
CONFIG_LIBVFSCORE=y
CONFIG_LIBVFSCORE_AUTOMOUNT_UP=y
CONFIG_LIBRAMFS=y
CONFIG_LIBUKCPIO=y
CONFIG_ARM64_ERRATUM_858921=n
CONFIG_ARM64_ERRATUM_835769=n
CONFIG_ARM64_ERRATUM_843419=n
# Uncomment for debugging.
#CONFIG_LIBUKDEBUG_PRINTD=y
#CONFIG_LIBUKDEBUG_PRINTK_INFO=y
CONFIG_LIBMUSL=y
CONFIG_LIBLWIP=y
CONFIG_LIBWAMR=y
CONFIG_LIBWAMR_MAIN_FUNCTION=y
13 changes: 13 additions & 0 deletions wasm-hello/defconfig/xen.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CONFIG_PLAT_XEN=y
CONFIG_ARCH_X86_64=y
CONFIG_LIBVFSCORE=y
CONFIG_LIBVFSCORE_AUTOMOUNT_UP=y
CONFIG_LIBRAMFS=y
CONFIG_LIBUKCPIO=y
# Uncomment for debugging.
#CONFIG_LIBUKDEBUG_PRINTD=y
#CONFIG_LIBUKDEBUG_PRINTK_INFO=y
CONFIG_LIBMUSL=y
CONFIG_LIBLWIP=y
CONFIG_LIBWAMR=y
CONFIG_LIBWAMR_MAIN_FUNCTION=y
16 changes: 16 additions & 0 deletions wasm-hello/run/fc.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

if test ! -f "workdir/build/wasm-hello_fc-arm64"; then
echo "No kernel file workdir/build/wasm-hello_fc-arm64." 1>&2
echo "Did you run ./build.fc.arm64 ?" 1>&2
exit 1
fi

# Pack filesystem as an initial ramdisk CPIO file.
rm -f initrd.cpio
../repos/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/

rm -f firecracker.socket
firecracker-aarch64 \
--api-sock firecracker.socket \
--config-file fc.arm64.json
16 changes: 16 additions & 0 deletions wasm-hello/run/fc.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

if test ! -f "workdir/build/wasm-hello_fc-x86_64"; then
echo "No kernel file workdir/build/wasm-hello_fc-x86_64." 1>&2
echo "Did you run ./build.fc.x86_64 ?" 1>&2
exit 1
fi

# Pack filesystem as an initial ramdisk CPIO file.
rm -f initrd.cpio
../repos/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/

rm -f firecracker.socket
firecracker-x86_64 \
--api-sock firecracker.socket \
--config-file fc.x86_64.json
20 changes: 20 additions & 0 deletions wasm-hello/run/qemu.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

if test ! -f "workdir/build/wasm-hello_qemu-arm64"; then
echo "No kernel file workdir/build/wasm-hello_qemu-arm64." 1>&2
echo "Did you run ./build.qemu.arm64 ?" 1>&2
exit 1
fi

# Pack filesystem as an initial ramdisk CPIO file.
rm -f initrd.cpio
../repos/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/

qemu-system-aarch64 \
-nographic \
-machine virt \
-m 8 \
-cpu max \
-kernel workdir/build/wasm-hello_qemu-arm64 \
-append "wasm-hello_qemu-x86_64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /main.wasm" \
-initrd ./initrd.cpio
19 changes: 19 additions & 0 deletions wasm-hello/run/qemu.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

if test ! -f "workdir/build/wasm-hello_qemu-x86_64"; then
echo "No kernel file workdir/build/wasm-hello_qemu-x86_64." 1>&2
echo "Did you run ./build.qemu.x86_64 ?" 1>&2
exit 1
fi

# Pack filesystem as an initial ramdisk CPIO file.
rm -f initrd.cpio
../repos/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/

qemu-system-x86_64 \
-nographic \
-m 8 \
-cpu max \
-kernel workdir/build/wasm-hello_qemu-x86_64 \
-append "wasm-hello_qemu-x86_64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /main.wasm" \
-initrd ./initrd.cpio
13 changes: 13 additions & 0 deletions wasm-hello/run/xen.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

if test ! -f "workdir/build/wasm-hello_xen-arm64"; then
echo "No kernel file workdir/build/wasm-hello_xen-arm64." 1>&2
echo "Did you run ./build.xen.arm64 ?" 1>&2
exit 1
fi

# Pack filesystem as an initial ramdisk CPIO file.
rm -f initrd.cpio
../repos/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/

sudo xl create -c xen.arm64.cfg
13 changes: 13 additions & 0 deletions wasm-hello/run/xen.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

if test ! -f "workdir/build/wasm-hello_xen-x86_64"; then
echo "No kernel file workdir/build/wasm-hello_xen-x86_64." 1>&2
echo "Did you run ./build.xen.x86_64 ?" 1>&2
exit 1
fi

# Pack filesystem as an initial ramdisk CPIO file.
rm -f initrd.cpio
../repos/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/

sudo xl create -c xen.x86_64.cfg