[erlang-questions] Reltool anyone?

Joe Armstrong erlang@REDACTED
Sat Aug 23 20:51:30 CEST 2014

I think it might be a better idea if you explained how booting erlang works

*exactly* what happens when you do "erl -boot XYZ.boot"

examining a boot file is fun - for example, we can take a look at start.boot
(the default boot file) - to see what it does we do the following:

$ cd /usr/local/lib/erlang/bin
$ erl

1 > {ok, B} = file:read_file("start.boot").



2 > binary_to_term(B).


















Boot files are just tuples which are interpreted by the function eval_script -
(Which on my system starts in line 812 of

The *reason* they
are written as binaries and use binary_to_term to "see" them is
because when the system
is loaded the code to parse erlang terms has not yet been loaded -
this code gets loaded
by the boot loader a little bit later.

The stuff in systools and reltool basically takes the pain out of
manipulating the boot files.
Once you've understood the bootfile structure the rest is easy.

This is actually described in


But very few people seem to notice this - it might be an idea to
emphasis how easy the
start phases are. Once you hide what's really going on with tools you
can get into deep
waters if the tools stop working and you don't really understand whats
happening under the
covers ...

Anybody who really wants to understand how the system starts should
write some simple
bootscripts by-hand and see what happens when they are run :-)



On Sun, Aug 17, 2014 at 6:07 PM, Francesco Cesarini
<francesco@REDACTED> wrote:
> Hi,
> I was wrapping up the chapter on release handling for the OTP book and never
> having used it before, decided to take a look at reltool. Is anyone using
> it? I am finding it counter intuitive and struggling to see how it
> simplifies the task of creating releases.
> Feel free to reply to the list or ping me privately.
> Thanks,
> F
> --
> Founder & Technical Director
> Erlang Solutions Ltd.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list