✏ B2G beta (formerly Firefox OS)

How did you insert the blobs? Did you follow the adb pull command from the FirefoxOS-instructions or did you insert them using https://code.fairphone.com/projects/fp-osos/dev/fairphone-os-build-instructions.html#getting-the-binary-components? In the latter case, how do I do that? Just with exactly those commands executed in the B2G directory? Or do I have to copy them around?

Yes, I think I got that. :slightly_smiling: But where was it or maybe better: What was it? Was it that they wrote “fairphone2” in one place (as sort of a variable) and “FP2” in another and those didn’t match? I’d just like to understand. :wink:

Yeah. I’m just curious to try FirefoxOS, only as a test (for my “productive” OS I’ll probably get back to FPOSOS). :wink:

Thanks for your help!

Because you chose fairphone2 in the ./config.sh it knows the path to go and download it by it self. You will see it in the start of the ./build.sh that it first goes to download that… I even see that its checking for updates and gets the newest…

Yes exactly. Its described here: Link
And you can clearly see it in one of the Links in that Bugpost… Link

Be careful the firefox os is mutch more delightful. You cold get stuck to it… Android is a wreck.
And by the way if you read the first link at the end you can read that there is a developer who made most working already… Seams like mine is a exception, so im currious how yours will work. Please keep us updated here…
Regards, Novski

Tried building last night. It failed in the end. Don’t know exactly why. As far as I understand from the build logs, making recovery image was successful and then a few lines after “Construct recovery from boot” the build failed. Don’t know what to take out of that, though.

Cool. Unfortunately, I downloaded, extracted and ran the the blobs sh by myself and build afterwards. Could this be the reason for the build failure?

I’ve not seen this in my build log. Seems to still use blobs version 2.0.0

Well, maybe I’ll try building again after

$ rm -rf objdir-gecko
$ rm -rf out

Is that enough to wipe out the blobs I’ve manually added?

Fairphone publishes their blobs, so I think showing the script the files from the unpacked tar file would be the easiest way. But I have not tired building FFOS yet or looked at scripts. I just think it would be easier.

Wait with that. I think there is a problem with the repo in general. Im trying to find out with @erotavlas.

True. I thought i have seen that in past…

Im actually also not shure so if somebody know exactly what steps are to be repeated and what part have to be wiped out please let us know…
Regards, Novski
edit: the new bugfile

Due to this comment I thought the issue had been fixed and here seemed to be a patch. After a repo sync this patch wasn’t included though, so I manually edited those two files and tried ./build.sh -j1 which was successful. I flashed it and it rebooted, but I had major problems:

During the language and time setup the OS suddenly crashed (at least I guess so) and the screen was black. Moreover, several windows opened on my desktop (as if I had plugged in several external devices) with additional warning popups (e.g. sth. like “Android can’t be mounted”). Needed to unplug the phone from the PC for this to stop. Additionally, I needed to hold the power button longer than normal to (re?!)boot the phone (I interpret this as a hint that the phone was not yet powered off). I noticed that the back of the phone got really hot (probably the CPU) which may be related to the crash. The procedure is the same after every reboot.

Btw the Fairphone logo which pops up directly after reboot is smaller than it normally is (i.e. it does not fill the whole screen).

Recovery and fastboot mode were still accessible and I reflashed the FPOSOS successfully.

Hi,
I confirm that now building work again with the latest update. You can find latest build here https://mega.nz/#F!2UsjWBZY.

Just for fun I downloaded the scripts and had a look around. They do use the bin blobs directly already, but they still download the old bin blobs. I think they need another patch.

./device/fairphone_devices/FP2/download-blobs.sh

curl http://code.fairphone.com/downloads/FP2/blobs/fp2-sibon-2.0.0-blobs.tgz -o download-$1/fp2-sibon-2.0.0-blobs.tgz || exit -1 &&

It doesn’t matter so much at this point (if the rest gets copied) but a fix would be nice. Maybe a config file for each device would be easier to use? The scripts will be easier to maintain if URLs and the name of the files/devices are only defined once in one single file if possible.

I cannot understand your point. At the moment the building requires the proprietary blobs, but in the future with this plugin for Firefox browser https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS/B2G_installer_add-on you could compile a build that does not need the proprietary blobs since it uses directly the binary from the device.

Currently they use the old bin blobs (2.0.0) in the scripts. So they could miss files, this is fixed in (2.0.1). The files are all in there so it might work anyway, if the script is clever.

These are the same files. But it’s good to have both ways, just in case one path fails (or does not exist) yet.

Ok, now I have understood. I would like to modify the script
./device/fairphone_devices/FP2/download-blobs.sh
in order to download the latest modified file from http://code.fairphone.com/downloads/FP2/blobs/. However, it seems that the web server does not allow access to curl command with listing and timing parameter as -l or -R in order to obtain the latest modified files.
I do not know of other solutions to get latest modified files from a webserver.

I know that are the same files, but in such a way you can make a blob free build since the binary files are taken directly from the device.

1 Like

Wouldn’t work, they change the file name with each release and as you said, it’s not ftp. Ugly, but fastest way for now would be to just search & replace the file-name for now, I guess. A bit better solution would be to put the URL somewhere and just extract all the rest from there, so only one thing needs to be updated each time.

curl http://code.fairphone.com/downloads/FP2/blobs/fp2-sibon-2.0.1-blobs.tgz -o download-$1/fp2-sibon-2.0.1-blobs.tgz || exit -1 &&
    tar xvfz download-$1/fp2-sibon-2.0.1-blobs.tgz -C download-$1 || exit -1 &&
    BASH_ENV="$EXTRACT_RC" bash download-$1/fp2-sibon-2.0.1-blobs.sh || exit -1

There is a better way to do this with variable. Now in order to automate completely the script we need curl access to webserver in order to retrieve latest modified file and to extract version number.

version=2.0.1
install_blobs() {     mkdir -p download-$1 &&
    (cd download-$1 && shasum -p -c $2) ||
    rm -rf download-$1/fp2-sibon-$version-blobs.* &&
    curl http://code.fairphone.com/downloads/FP2/blobs/fp2-sibon-$version-blobs.tgz -o download-$1/fp2-sibon-$version-blobs.tgz || exit -1 &&
    tar xvfz download-$1/fp2-sibon-$version-blobs.tgz -C download-$1 || exit -1 &&
    BASH_ENV="$EXTRACT_RC" bash download-$1/fp2-sibon-$version-blobs.sh || exit -1
    # Execute the contents of any vendorsetup.sh files we can find in the vendor blobs
    for f in `test -d vendor && find -L vendor -maxdepth 4 -name 'vendorsetup.sh' 2> /dev/null`
    do
         echo "including $f"
         . $f
    done
    unset f
}
1 Like

Good, no difference for me if version or url is used. Is the rm in there still safe if the path fails? So if there is not a proper checksum in the dir, it will delete and try to download again. I prefer to combine a “cd” && “rm” just to make sure the rm fails if needed … too many variables in a rm path make me nervous. But I do not use bash.

Hi,
I have just opened a bug https://bugzilla.mozilla.org/show_bug.cgi?id=1245880 and made a pull request to change the download-blobs.sh. Unfortunately, at the moment the webserver of Fairphone 2 with proprietary blob does not allow automatic retrieving of latest blobs.
@tphysm
@novski
Can you try the latest build in order to check any improvement?

3 posts were merged into an existing topic: No more FirefoxOS?

Despite the bad news, I’ve built and flashed again, just because I’m still curious. :wink: But I still have the same problems as before. Though, I did notice that rushing through the setup by clicking “Next” all the time is possible. That way, I was able to get to the start screen before the crash happened. After the crash, I had to reboot. But as the setup had been finished this time, the phone booted directly to the start screen. So, at least, the OS is working for some seconds. :wink: Anyway, another remark: I have the feeling that it always takes the exact same amount of time for the crash to happen.

Is it possible to get some logs about the crash? I thought adb logcat is the approach for this, but as far as I understand it, adb needs to recognize the device as “online”/“active” for this. However, with the phone plugged in and in recovery mode, I get this:

$ adb devices
List of devices attached
ed44b624	offline

and then I get nothing with adb logcat after a reboot. Any hints how to obtain a log? Otherwise, I’ve no idea what else to do and I’m also a bit tired of building and flashing anymore (unless there is new progress indicating a possibly successful new attempt).

1 Like

Great, thank you! I think the easiest way to get full automation would be a symbolic link on the FP server to “fp2-sibon-latest-blobs.tgz” that always points to the latest version that matches the files needed for the current source.

@jftr: I think moving this to docker would also work. On a system that can build the FP source only ccache and autoconfig2.13 needs to be added.

Yes, but do know how do to this? I know a way, but it requires that web server show to you the list of available files and their timestamp. So you can sort them by date and retrieve the latest. I also asked on IRC in the fairphone channel on freenode and they said that the web server does not allow this.

1 Like

It’s a pretty normal Nginx server I’m not sure what kind of setup they use. I think it would be possible to do this, that’s all I can say about it. Symbolic links are even allowed in the standard setup, the easiest way would be to allow directory listing for the blob directory and the place a symlink to the latest file there.

server {
 (...)
    location /here/are/the/blobs {
                   autoindex on;
            }
}
1 Like