It is assumed you've already setup your build environment and cloned the repositories.
The following steps allow you to build - and run - B2G on your emulator. Do NOT run them as root.
$ cd B2G
$ make sync
FIRST TIME ONLY: you should configure
$ sudo nano local.mk
and add the following line:
Now, back to the command line. First, build the configuration for QEMU:
$ make config-qemu
Next, build the gonk backend and then the system itself:
$ make gonk
NOTE: if ./emu.sh - your emulator - doesn't run at first, you'll need to make it executable:
$ chmod 777 emu.sh
Lastly, run the emulator: