Quickstart
This quickstart guide uses the same steps stated at Yocto Project Quick Build with additional steps to get an erlang runtime up and running on the target device.
Clone meta-erlang and checkout branch scarthgap:
git clone --branch scarthgap https://github.com/meta-erlang/meta-erlang.git
Clone poky and checkout branch scarthgap:
git clone --branch scarthgap git://git.yoctoproject.org/poky
Clone meta-openembedded and checkout branch scarthgap:
git clone --branch scarthgap https://github.com/openembedded/meta-openembedded.git
Move to poky directory:
cd poky
Initialize the build environment:
source oe-init-build-env ../build
Add meta-oe and meta-erlang to conf/layer.conf:
bitbake-layers add-layer ../meta-openembedded/meta-oe
bitbake-layers add-layer ../meta-erlang
Add erlang
package to IMAGE_INSTALL
in conf/local.conf
echo 'IMAGE_INSTALL:append = " erlang"' >> conf/local.conf
Build the core-image-minimal:
bitbake core-image-minimal
Run the qemu:
runqemu qemux86-64
A new window will open. Login as root and call erl:
# erl
Erlang/OTP 25 [erts-13.2.2.5] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns]
Eshell V13.2.2.5 (abort with ^G)
1> erlang:system_info(cpu_topology).
[{processor,[{core,{logical,0}},
{core,{logical,1}},
{core,{logical,2}},
{core,{logical,3}}]}]
The other sections of this guide shows additional steps to create your own erlang application and run inside a custom image.