Skip to content
100644 62 lines (51 sloc) 2.93 KB
84adefa The R13B03 release.
Erlang/OTP authored
1 Notes about prebuilt beam files under version control
2 -----------------------------------------------------
4 This information applies mostly to developers, some parts only
5 to developers of the main branch i.e. Ericsson and HiPE personel.
7 There are two types of derived code under version control, namely:
9 primary bootstrap - Resides in the $ERL_TOP/bootstrap/{lib,bin} directories.
10 preloaded code - Resides in the $ERL_TOP/erts/preloaded directory.
12 Primary bootstrap
13 .................
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.
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.
36 Preloaded code
37 ..............
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
c9a40f4 @tuncer Clean up bootstrap targets and documentation
tuncer authored
48 to the ebin directory. otp_build update_preloaded can be used to
49 ease the process (there are also similar targets in the
84adefa The R13B03 release.
Erlang/OTP authored
50 $ERL_TOP/preloaded/src/Makefile).
c9a40f4 @tuncer Clean up bootstrap targets and documentation
tuncer authored
52 In prebuilt open source distributions, these beam files are also
84adefa The R13B03 release.
Erlang/OTP authored
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.
c9a40f4 @tuncer Clean up bootstrap targets and documentation
tuncer authored
61 /Patrik, OTP
Something went wrong with that request. Please try again.