Hey Lazer (errr. CM),

Glad you are excited by FirefoxOS and sorry that you are having so much trouble with the build.

Firefox OS needs real love. Its core concept, that all executables run in an HTML IFrame execution environment, seems solid and, absent some pretty serious bugs, mostly functional and showing its value. However, the OS architecture, build system, and source code all have massive technical debt. The docs are unfortunately in a sorry state mostly because there is so much to cover and people like me, who is only slowly getting a clue, are contributing to them.

The biggest challenge for me is that the Firefox OS free software *project* does not exist. Right now Mozilla has all its developers working in little teams each doing great work on their piece of the puzzle. However, there is no real, effective, communicating leadership to which the core issues can be brought and who could provide a plan to resolve all the technical debt. Critically for us outsiders, the insiders do not have it as part of their work to build the community and pull us in. Individually they are each willing to help and enthusiastic but structurally this has not been stated as part of their responsibilities so the project is not forming as an effective collaboration of outsiders and Mozilla.

So given that initial view of the state of the project, I'll try to see what I can clarify for you.



On 6/6/14, 8:06 PM, LazerUnicorns Developers wrote:
Hey all,

I have to say it's really hard to get started with building FirefoxOS by
yourself. It's pretty impossible for a newbie in B2G development.

Yeah, that sucks! I'm slowly working on two things that I think might help. First, a step by step 'build Firefox OS from scratch' that explains exactly each step in the build. Firefox OS inherits from Android a build system in which:
  1) the kernel is frequently absent from the build
  2) the non-kernel build combines code for multiple outputs at once:
       * binaries for the build itself (running on the build machine),
       * binaries for the device target (the OS), and
       * various utilities and development aids (running on the build
         machine).
The latter steps usually requires different compilers and libraries.
The second is a better set of build scripts which explain what is happening. But since I have not yet succeeded in a single full build of Firefox OS, all of that is academic for now.

Here's my
feedback after around 10 hours of trying to get started - with no success
at all.

Ten hours, you're just getting started! :-) I'm ten days into my second push, this time trying to build for a tablet device. I've gone trough 3 operating systems, the Linux two both in virtual machines and native, half a dozen different compilers, and run into all sorts of issues on the way, including flaky hardware which is always such a delight.


I mean, modifying and fixing the build setup is pain. You founded a repo
for the config and setup stuff (B2G), why splitting up everything in
b2g-manifests then?

Okay, this is something we can actually figure out. The split comes from the Android build system.

The B2G repo is merely a 'working directory'. The raw B2G clone is inexcusably messy (the runtime scripts should all be in a single subfolder) but will essentially act as a directory in which all the building will happen. In reality, you could simply make an empty directory in which you want to work, then call any semi-recent *repo* executable with the right manifest parameters, and then run the building instructions by hand.

The individual manifests then determine, for each different build 'target' (i.e. device or emmulator/simulator), what source code will be downloaded and how the build will happen. So the manifests really, are the core of the B2G system, while the B2G directory is simply to get started.


After 10 hours of googling all the information together
... other developers won't invest that much time to get started on
development. Just sayin'.

I suspect that is right.




1. I had to find a gist file that was building FirefoxOS 1.2 to find out
the dependencies.

Hmm, that was one part of the documentation that I thought was actually somewhat okay.

[Oh, God, I just stumbled again on the so totally, completely misnamed 'buidlingfirefoxos.com' site! Grrr. /me slaps those people with his wettest towel.]

Why did https://developer.mozilla.org/en-US/Firefox_OS not work for you, especially the 'Build and Install' section and, notably, the
https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites#Ubuntu_13.10
section ?
Well, I don't understand the purpose of all the 'update alternatives' lines but the 'install' line seems to get most of the dependendies, no?


I modified it in order to properly build v1.4 (which I
still haven't getting managed to do). The gist is available at the
following link. I build everything on Ubuntu Trusty Thar (14.04 stable)
inside a VirtualBox VM in order to not fuck up my usual Android build
system.

Note: I'm still using the original B2G repo, but I need to fix that stuff -
so I forked it together with the b2g-manifest repo.

https://gist.github.com/martensms/a057224797238239ea99

That's right, you need to fork both in order to fix build things and dependency things.



2. Why are the Android building dependencies included for Darwin if you can
build it only on Ubuntu anyways?

Well you can get quite far with Darwin for some devices. It's often possible to build all of Gecko (Gaia always 'builds' everywhere) and get a system.img and userdata.img that can be flashed (or just barbarically written into the system/ partition on the device).

But yeah, what will get built where really needs to be made obvious because downloading all the kernel git repository and then silently deciding not to build it is, well, charitably, 'gigabytes of confusion.'


3. The manifest files are out of date. I can't get anything built due to
the missing tinyxml / tinyxml2 repositories that are not existing
(base-caf-jb.xml manifest file). So in order to fix that, I had to fork
your repositories to get it run properly. That sucks hard if you haven't
built anything at that time and you have no idea what to do as a newbie.

Ouch. Indeed. Though that sounds specific to whatever device you are working on. What device is that by the way? Ah, the next paragraph tells me.


4. The wiki entries suck. No offense, but it's pretty impossible to gather
all Compiler Setup instructions there. I own a ZTE Open C device, I had to
google 15min just to find out that its codename can be "treated as flame"

Yeah, the 'codename' game really sucks. Firefox OS inherits that from Android but so far the FirefoxOS project has not made enough effort to clear it up.

after using the Unlock tool that only runs on Windows that wasn't working
anyways. I then had to use fastboot to unlock, because I realized the
bootloader was capable of installing files via adb pushes ... no docs at
all on the wiki / MDN pages / google results?

Yeah, if your device can be stopped at fastboot, the best way to unlock seems to me to be to side load a rooted kernel.

But all Firefox OS devices should really have a world class recovery image to get us past some of these initial issues. The 'recovery' situation is yet more technical debt.




Problems and Questions:
========================


- Why are all the necessary configurations not hosted in a single (namely
the B2G) repository?

I tried to answer that above. FfOS inherits the use of 'repo' from Android which has this split: you start from an empty work dir and use some 'repo' executable to get all the source for *your* device based on a manifest. Note that 'repo' is really about helping developers contribute. 'repo' can download all the source code you need but is much more powerful than that. FfOS uses it for this first role, but 'repo' is really about being able to do 'git' like distributed versionning across multiple 'git' repositories.

- How can you build a "flame" variant properly?

This is left as an exercise to the reader. :-)

As in, I have not yet tried. Do note that the B2G build might very well not even try to build the kernel though---that tripped me up for a long time on my first builds for the 'ALCATEL' One Touch Fire (hamachi).

- How to overwrite the repository with the correct one in the manifest
file? (I have no clue of the repo manifest files)

The manifest files are trivial xml. *IF* you have a source git repository for the right project, it's trivial to substitute the different source repository by changing the git: URL.





===========
= TL;DR LOL =
===========


config.sh call fails due to repo sync errors;

Have you tried to run 'repo sync' several times? It's trying to download many Gigabytes of data so might well fail for network/server issues. Doing 'repo sync' several times won't do any harm and may be required.


here's the output (warning,
huge txt file!):

https://gist.github.com/martensms/011a7e4bd3646528ab69

Need to fix the tinyxml2 repository, how can I do that in the manifest
files?

Open the XML in an editor and you will be able to figure it out. It does, however, depend on having a correct *git repository* for the project available so you might have to set one up on GitHub if the right sources are not on git.




Cheers and many thanks so far,
CM

Sorry again for the state of affairs.

Please don't get discouraged tough because the Firefox OS Project would hugely benefit from having someone like you who knows Android contributing (or pushing) from the outside.

all the best,
  ~adrian custer

_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to