Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 61 lines (51 sloc) 3.0 kb
84adefa3 » Erlang/OTP
2009-11-20 The R13B03 release.
1 Notes about prebuilt beam files under version control
2 -----------------------------------------------------
3
4 This information applies mostly to developers, some parts only
5 to developers of the main branch i.e. Ericsson and HiPE personel.
6
7 There are two types of derived code under version control, namely:
8
9 primary bootstrap - Resides in the $ERL_TOP/bootstrap/{lib,bin} directories.
10 preloaded code - Resides in the $ERL_TOP/erts/preloaded directory.
11
12 Primary bootstrap
13 .................
14
15 The two types of version controlled code are fundamentally
16 different. The primary bootstrap is code compiled from source files in
17 the lib/{kernel,stdlib,compiler} (and header files from
18 lib/orber/include. They are checked in in the version control system
19 to make it possible to build directly from the code base tree without
20 the need for an earlier version of the compiler. When a new version of
21 OTP is released, these files are updated manually (or rather, by using
22 the $ERL_TOP/otp_build script) and checked in. The files can also be
23 updated due to changes in the compiler during the development
24 process. The primary bootstrap is always updated as a separate
25 deliberate process, never during a normal development build.
26
27 If a prebuilt open source version of erlang is used, the directory
28 bootstrap initially does not contain any beam files, the directory is
29 instead populated by copying beam files from the
30 $ERL_TOP/lib/{kernel,stdlib,compiler}/ebin directories. This
31 construction is to save space in the distribution, but the result
32 would be the same. Open source developers need not provide patches for
33 the precompiled beam files in the primary bootstrap, the bootstrap
34 update is always performed by the main developers.
35
36 Preloaded code
37 ..............
38
39 The directory $ERL_TOP/preloaded contains both src and ebin
40 subdirectories. The preloaded code is compiled into the virtual
41 machine and always present. When compiling the virtual machine, those
42 beam files need to be present and they are considered a part of the
43 virtual machine rather than a part of the kernel application. When
44 preloaded files are to be updated, the source code is built using a
45 special Makefile in the $ERL_TOP/preloaded/src directory, which
46 creates beam files in the same directory. When they seem to compile
47 successfully, they can be used in an emulator build by being copied
c9a40f46 » tuncer
2010-09-12 Clean up bootstrap targets and documentation
48 to the ebin directory. otp_build update_preloaded can be used to
49 ease the process (there are also similar targets in the
84adefa3 » Erlang/OTP
2009-11-20 The R13B03 release.
50 $ERL_TOP/preloaded/src/Makefile).
51
c9a40f46 » tuncer
2010-09-12 Clean up bootstrap targets and documentation
52 In prebuilt open source distributions, these beam files are also
84adefa3 » Erlang/OTP
2009-11-20 The R13B03 release.
53 present, but to update them one might need to change permission on the
54 $ERL_TOP/preloaded/ebin directory, then build and then manually copy
55 the beam files from the source directory to ../ebin. If patches are
56 created that involve the source files used to build preloaded code,
57 always note this specially as the preloaded/ebin directory needs
58 updating, or provide the new derived files in the patch or as complete
59 binaries.
60
c9a40f46 » tuncer
2010-09-12 Clean up bootstrap targets and documentation
61 /Patrik, OTP
Something went wrong with that request. Please try again.