Skip to content

Commit

Permalink
Adds tinycore kernel and initrd for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
c4milo committed Sep 21, 2015
1 parent 8314a13 commit 40afb6e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
imgs
xhyve
cmd/xhyve/imgs/stable*
cmd/xhyve/xhyve
vendor
Binary file added cmd/xhyve/imgs/initrd.gz
Binary file not shown.
9 changes: 9 additions & 0 deletions cmd/xhyve/imgs/tinycore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
These are binaries from
http://tinycorelinux.net
with the following patch applied:

mkdir initrd
( cd initrd ; zcat ../initrd.gz | sudo cpio -idm )
sudo sed -i '/^# ttyS0$/s#^..##' initrd/etc/securetty
sudo sed -i '/^tty1:/s#tty1#ttyS0#g' initrd/etc/inittab
( cd initrd ; find | sudo cpio -o -H newc ) | gzip -c > initrd.gz
Binary file added cmd/xhyve/imgs/userboot.so
Binary file not shown.
8 changes: 8 additions & 0 deletions cmd/xhyve/imgs/userboot.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
userboot.so is the FreeBSD user-mode bootloader

So, this is a bit horrible but it works:

- userboot is compiled on FreeBSD with '-target x86_64-apple-darwin14' CFLAGS
- same for the dependencies of userboot (stand, ficl, zfs)
- you have to use the MachO linker set header (include/xhyve/support/linker_set.h)
- the resulting object files are linked on OS X with 'clang -dead_strip -shared -o userboot.so *.o *.So'
Binary file added cmd/xhyve/imgs/vmlinuz
Binary file not shown.

0 comments on commit 40afb6e

Please sign in to comment.