Home
Flame's Rhythm Mac OS

Flame's Rhythm Mac OS

May 24 2021

Flame's Rhythm Mac OS

This article provides instructions on how to build B2G OS for Flame devices using a Mac OS X system as your build platform.

  1. Flame 2020.2(and onward) supports macOS 10.15.1(and onward). All previous Flame versions are not supported on 10.15.1(and onward), and no Flame version is supported on macOS 10.15 (straight - no extension release). Please hit the Accept as Solution button if this post fully solves your issue or answers your question.
  2. Note: The recommended filesystem on Mac OS X is HFS+, but you can use another filesystem. In addition to implementing POSIX file system semantics, such filesystem must support both hard and symbolic links, 64 bit file sizes and offsets, direct I/O, and timetamps with at least 1 second precision.
  3. A Happy Mac is the normal bootup (startup) icon of an Apple Macintosh computer running older versions of the Mac operating system.It was designed by Susan Kare in the 1980s, drawing inspiration from the design of the Compact Macintosh series and from the Batman character Two-Face.
Note: This guide assumes that you have the popular Homebrew package manager installed. If you do not, you should either install it or an equivalent package manager and learn how it works.

Preparing the build environment

There are some build system bugs that prevent building on Mac OS X under certain circumstances. Those circumstances are: Bug 1039223 - Build for flame fails complaining of missing dt.img; Bug 1027682 - FlameBuild Failed to build on Mac OS X 10.9, elf.h file not found; Use your favorite text editor to create a file named.userconfig in the.

The first step is to install build prerequisites as usual. Then install binutils, so that the objdump command is available for debug builds:

Create a disk image using the case-sensitive, journaled HFS+ file system and mount the image using the following commands.

Note: Because the image has been created as a 'sparse' image, only disk blocks that are actually used take up physical space on your physical media. This means that a 40 gigabyte image, such as the one above, will not actually take up 40 gigabytes of space. Instead, it will gradually get larger as you write more and more data to it.

Clone the B2G repository

Of course, before you can start your first build, you need to clone the B2G repository. It's important to note that this doesn't fetch everything. It simply pulls down the build system and setup utilities. Most of the actual code is in Mozilla's main Mercurial repository; those files will be retrieved later in the setup process.

To clone the repository, use git:

After that's done (which should only take a minute with a fast connection), cd into the B2G directory:

Configuring B2G for flame

Once you've retrieved the core B2G build system, you need to configure it for the device on which you plan to install it; in this case, that's 'flame'. Run the following command from within the B2G directory:

It's at this point that the majority of the code will be downloaded. This is around 15 GB of source code, so it will take a long time, even if you have a fast Internet connection. Even with high-performance broadband, this can take an hour or so.

Note: Seriously, this will take a very long time if you're on a slow Internet connection. Keep that in mind (as well as any per-megabyte fees you may have to pay on your connection) before doing this step.

Back up important device files

Before beginning the install process, it's important to make a backup of certain key files on the device. These will be needed if you ever need to re-flash the device.

At this point, connect your Flame if it isn't already connected; the configure process will need to access it. Use the adb devices command to check to see if it's connected:

This will list any Android or B2G compatible devices that are connected. If yours isn't listed, something's not connected properly.

Once the device is confirmed to be connected, you can make the backup using the following commands:

To note, if you are building for the first time, you will want to be on the latest version of the flame base image; see https://developer.mozilla.org/en-US/B2G_OS/Phone_guide/Flame/Updating_your_Flame#Full_flash_to_the_latest_base_image for more details.

Working around a Mac OS X build problem

There's a problem that can happen when building on Mac OS X. This is a solution devised by the Mozilla community; it has been tested on Mac OS X 10.9.4 'Mavericks.'

Non-existent mkfs.vfat

You need to install a port of dosfstools so you can use the image.

Then edit the formula brew will use to build the dosfstools software:

Now you're ready to install it:

Start your first build

Changing configuration to work around bugs

There are some build system bugs that prevent building on Mac OS X under certain circumstances. Those circumstances are:

  • Bug 1039223 - Build for flame fails complaining of missing dt.img
  • Bug 1027682 - [Flame][Build] Failed to build on Mac OS X 10.9, elf.h file not found

Use your favorite text editor to create a file named .userconfig in the B2G directory. The following content should to into the .userconfig file:

Now you're finally ready to build! Just kick it off the way you do for any B2G OS build:

This article provides instructions on how to build B2G OS for Flame devices using a Mac OS X system as your build platform.

Note: This guide assumes that you have the popular Homebrew package manager installed. If you do not, you should either install it or an equivalent package manager and learn how it works.

Preparing the build environment

The first step is to install build prerequisites as usual. Then install binutils, so that the objdump command is available for debug builds:

Create a disk image using the case-sensitive, journaled HFS+ file system and mount the image using the following commands.

Note: Because the image has been created as a 'sparse' image, only disk blocks that are actually used take up physical space on your physical media. This means that a 40 gigabyte image, such as the one above, will not actually take up 40 gigabytes of space. Instead, it will gradually get larger as you write more and more data to it.

Clone the B2G repository

Of course, before you can start your first build, you need to clone the B2G repository. It's important to note that this doesn't fetch everything. It simply pulls down the build system and setup utilities. Most of the actual code is in Mozilla's main Mercurial repository; those files will be retrieved later in the setup process.

Catalina

To clone the repository, use git:

After that's done (which should only take a minute with a fast connection), cd into the B2G directory:

Configuring B2G for flame

Flame's Rhythm Mac Os Catalina

Once you've retrieved the core B2G build system, you need to configure it for the device on which you plan to install it; in this case, that's 'flame'. Run the following command from within the B2G directory:

It's at this point that the majority of the code will be downloaded. This is around 15 GB of source code, so it will take a long time, even if you have a fast Internet connection. Even with high-performance broadband, this can take an hour or so.

Note: Seriously, this will take a very long time if you're on a slow Internet connection. Keep that in mind (as well as any per-megabyte fees you may have to pay on your connection) before doing this step.

Back up important device files

Before beginning the install process, it's important to make a backup of certain key files on the device. These will be needed if you ever need to re-flash the device.

At this point, connect your Flame if it isn't already connected; the configure process will need to access it. Use the adb devices command to check to see if it's connected:

This will list any Android or B2G compatible devices that are connected. If yours isn't listed, something's not connected properly.

Once the device is confirmed to be connected, you can make the backup using the following commands:

To note, if you are building for the first time, you will want to be on the latest version of the flame base image; see https://developer.mozilla.org/en-US/B2G_OS/Phone_guide/Flame/Updating_your_Flame#Full_flash_to_the_latest_base_image for more details.

Working around a Mac OS X build problem

There's a problem that can happen when building on Mac OS X. This is a solution devised by the Mozilla community; it has been tested on Mac OS X 10.9.4 'Mavericks.'

Non-existent mkfs.vfat

You need to install a port of dosfstools so you can use the image.

Then edit the formula brew will use to build the dosfstools software:

Now you're ready to install it:

Start your first build

Changing configuration to work around bugs

There are some build system bugs that prevent building on Mac OS X under certain circumstances. Those circumstances are:

  • Bug 1039223 - Build for flame fails complaining of missing dt.img
  • Bug 1027682 - [Flame][Build] Failed to build on Mac OS X 10.9, elf.h file not found

Flame's Rhythm Mac Os Download

Use your favorite text editor to create a file named .userconfig in the B2G directory. The following content should to into the .userconfig file:

Flame's Rhythm Mac Os Pro

Now you're finally ready to build! Just kick it off the way you do for any B2G OS build:

Flame's Rhythm Mac OS

Leave a Reply

Cancel reply