Erlang on rumprun

  • From: Neeraj Sharma <>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Thu, 3 Sep 2015 00:53:38 +0530


I have been working for a couple of weeks now (except for the week in
between) on porting Erlang on rumprun. The project did take longer than I
anticipated and not without it's share of challenges, but an awesome
support from Antti made it seem trivial now.

The port doesn't support clustering (i.e. no epmd at present), which is
still in the works, wherein I have not made up my mind on the best way
possible to integrate it on rumprun. This port is running the Erlang VM
without the wrappers (which needless to say cannot be utilized as-is due to
fork/execv). There is a trivial echoserver as a sample application to
justify the effort :)

This is still bleeding edge, though I did try to test it as much on
qemu/kvm. This port should work on xen as well, though goes untested (since
I dont have a setup handy).

Please note that it do not support SMP, because rumprun doesn't support it
at present though things might change (no commitment).

Let me give a quick workthrough for completeness, though the wiki (on
rumprun) will be updated later to reflect the latest and greatest the port
has to offer. Needless to say the rumprun-packages/erlang/ does a
decent job in the absence of the wiki update.

git clone
cd rumprun
git submodule update --init
./ hw
cd ..

echo "export PATH=$PATH:`pwd`/rumprun/app-tools" >> ~/.bashrc
echo "export PATH=$PATH:`pwd`/rumprun/app-tools" >> ~/.bash_profile
export PATH=$PATH:`pwd`/rumprun/app-tools

git clone
cd rumprun-packages
echo "RUMPRUN_TOOLCHAIN_TUPLE=x86_64-rumprun-netbsd" >
cd erlang
make > build.log 2>&1

rumpbake hw_virtio beam.hw.bin bin/beam

sudo ip tuntap add tap0 mode tap
sudo ip addr add dev tap0
sudo ip link set dev tap0 up

rumprun qemu \
-I if,vioif,'-net tap,script=no,ifname=tap0' \
-W if,inet,static, \
-e ERL_INETRC=$ERLPATH/erl_inetrc \
-b images/erlang.iso,$ERLPATH \
-b examples/app.iso,$ERLAPP_PATH \
-i beam.hw.bin \
"-- -no_epmd -root $ERLPATH/lib/erlang -progname erl -- -home $ERLHOME
-noshell -pa $ERLAPP_PATH -s echoserver start"

In another terminal telnet to and port 8080 to try it out.

Have fun hacking!


Other related posts: