Building B2G OS for Flamingo (Xperia E3)

BUILD STATUS

Long time no see. Building B2G OS proved more difficult than I expected, but the process finally terminates successfully now. Unfortunately though, the build produced is not working: it flashes fine, but then I only get a black screen at boot.

[adb catlog coming soon…]


HELP REQUEST

Unsurprisingly, in the process I nearly bricked my device. I can ./flash.sh -f so most partitions are still responding. Somehow, though, I broke the recovery partition: I don’t know precisely what’s in there, and any attempt to flash it fails:

Enricos-MBP:Desktop Enrico$ fastboot flash -w recovery recovery_flamingo.img
Erase successful, but not automatically formatting.
File system type  not supported.
Erase successful, but not automatically formatting.
File system type  not supported.
sending 'recovery' (11832 KB)...
OKAY [  0.375s]
writing 'recovery'...
FAILED (remote: partition table doesn't exist)
finished. total time: 0.379s

The phone is not lost yet, but I’d like to recover recovery (please forgive the pun). Does anyone have any idea? And why B2G’s full flash doesn’t fix that? :confounded:

Black screen means no kernel. I suspect you are building on a Mac. This is expected there is a bug about this on bugzilla still waiting for proper PR and testing before merging it.

Mozilla Discourse a écrit :


enrico_ghiorziEnrico

April 25

BUILD STATUS

Long time no see. Building B2G OS proved more difficult than I expected, but the process finally terminates successfully now. Unfortunately though, the build produced is not working: it flashes fine, but then I only get a black screen at boot.

[adb catlog coming soon…]


HELP REQUEST

Unsurprisingly, in the process I nearly bricked my device. I can ./flash.sh -f so most partitions are still responding. Somehow, thoug, I broke the recovery partition: I don't know precisely what's in there, and any attempt to flash it fails:

Enricos-MBP:Desktop Enrico$ fastboot flash -w recovery recovery_flamingo.img
Erase successful, but not automatically formatting.
File system type  not supported.
Erase successful, but not automatically formatting.
File system type  not supported.
sending 'recovery' (11832 KB)...
OKAY [  0.375s]
writing 'recovery'...
FAILED (remote: partition table doesn't exist)
finished. total time: 0.379s

The phone is not lost yet, but I'd like to recover recovery (please forgive the pun). Does anyone have any idea? And why B2G's full flash doesn't fix that? :confounded:


Visit Topic or reply to this email to respond

To stop receiving notifications for this particular topic, click here. To unsubscribe from these emails, change your user preferences

Envoyé depuis Firefox OS

No I’m building on Ubuntu 15.10, but it might be the missing kernel anyway. The only interesting thing about kernel I found on build’s log is this warning (which doesn’t break the build anyway):

The present kernel configuration has modules disabled.
Type |make config| and enable loadable module support.
Then build a kernel with module support enabled.

Any attempt to do something about it (by randomly reading stuff about configuring the kernel) breaks the build, as this wants the /kernel folder nice and clean. To be more precise, I think I successfully used defconfig on flamingo’s default config, but this alone already breaks the build and I have to undo the change.

Right, that error is harmless. Looks like my second reply got lost. The error regarding the recovery partition would suggest you do not have the Sony Open Devices bootloader which is needed to support the recovery partition. If that is true, then it is also 99% possible your bootloader is unable to boot a 5.1 Android kernel.

Please refer to Sony’s Developper website for how to update the bootloader with Emma (a windows virtual machine will be good).

I tried Emma even before I started this, when it still had the Fxp’s FxOS build. The device wasn’t recognized (I suppose as a consequence of flashing FxOS) and neither it was after I flashed an Android ROM (of dubious origin, that was a dumb mistake and that’s probably why I the recovery partition is broken). I’ll try again (and harder) later and report any update. Thanks for your help!

No, Emma does not care about B2G.

Hey @enrico_ghiorzi :slightly_smiling:
I just wanted to ask you to check this topic and add your toughs about the discussion ongoing. Thanks :wink:

I made a new build and this time it was a piece o’cake! Flashing successful (with a little help: if it’s stuck on <waiting for device> quickly disconnect the phone, shut it down, reconnect+holding bootloader key = it flashes!)

The result didn’t change much though: still just a black screen. But now I can provide logs!

This is the full log of a build (a re-build, so hopefully it’s relatively short; also, made with -j1 for better logs).

https://public.etherpad-mozilla.org/p/flamingo’s_B2G_build’s_full_log

And this is adb logcat:

https://public.etherpad-mozilla.org/p/flamingo_logcat

Just a stupid off-topic remark: don’t use an etherpad for a textfile that has not to be edited (by a group).
It takes (small) HDD place and CPU power, more than a simple text file. (Yeah, I know it’s really few, but still, a few + a few + a few…)
For instance you can use this http://pasteall.org/ to paste a simple text file (or code).

Thanks. So I cannot tell why you have a black screen. Since you can logcat, please use adb logcat -v threadtime.

Can you |adb root| wait a few seconds, then |adb shell| and try to |stop b2g| then |/system/bin/b2g.sh| ? Maybe something will be visible this way.

Here it is both the log and the shell script: http://www.pasteall.org/68784 hope it is any help. I won’t probably be available tonight for testing…

Ok, I really don’t know what is going on, your Gecko seems not to go very far. How long did you waited after |/system/bin/b2g.sh| ? What happened ?

Can you retry but instead of |/system/bin/b2g.sh|, you issue on your system (not on the deivce) a |./run-gdb.sh| ? This will start a gdb session running B2G. It should get you a prompt like “(gdb)” very soon, there issue “continue” and validate with enter. Keep all the log of the session, and if the program terminates abnormally (i.e. as soon as you see again the gdb prompt), please issue “bt” and validate. This will give us hints of where is it stopping.

The only message I got was immediately after starting, thenI waited for quite a long time (maybe 10/15min) but absolutely nothing happened.

I’ll perform the tests you asked in the next days and I’ll let you know. Though, is it possible that the build is actually fine, but my device is too compromised to flash the build correctly? Not even Emma recognises it now, and I can’t bring it back to a known working status…

Can you still install Firefox OS / CM ? To be sure your device is still working

Ok, if Emma does not love it, I would suggest fixing that first :slight_smile:

I’d love to, but I’m having an hard time… I can access the device with both fastboot and ADB so I refuse to believe it cannot be restored somehow. Though, all standard procedures failed, I don’t know what to try next.

How does it behaves in flashmode mode?

Mozilla Discourse a écrit :


enrico_ghiorziEnrico

April 30

I'd love to, but I'm having an hard time… I can access the device with both fastboot and ADB so I refuse to believe it cannot be restored somehow. Though, all standard procedures failed, I don't know what to try next.

Visit Topic or reply to this email to respond


Previous Replies

lissyx

April 30

Ok, if Emma does not love it, I would suggest fixing that first :slightly_smiling:


Visit Topic or reply to this email to respond

To stop receiving notifications for this particular topic, click here. To unsubscribe from these emails, change your user preferences

Envoyé depuis Firefox OS

The screen is always black or presents a static splashscreen, depending on which image I flashed last. adb sees the device as well as fastboot, but some operations return error messages: for example recovery is hard to flash, and I cannot format partitions.

I have all kinds of weird errors, but the main point is that it doesn’t matter what I manage to flash on it, including AOSP Android or FxOS builds, I can never properly boot to an OS or to a recovery image.

OK but that does not answer the flashmode question. Are you able to connect it in flashmode? How is it recognized?

Flashmode is not fastboot or adb.

Mozilla Discourse a écrit :


enrico_ghiorziEnrico

April 30lissyx:

How does it behaves in flashmode mode?

The screen is always black or presents a static splashscreen, depending on which image I flashed last. adb sees the device as well as fastboot, but some operations return error messages: for example recovery is hard to flash, and I cannot format partitions.

I have all kinds of weird errors, but the main point is that it doesn't matter what I manage to flash on it, including AOSP Android or FxOS builds, I can never properly boot to an OS or to a recovery image.

Visit Topic or reply to this email to respond


Previous Replies

lissyx

April 30

How does it behaves in flashmode mode?

Mozilla Discourse a écrit :

#006699; font-size:13px;;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;;color:#3b5998;;text-decoration:none;;font-weight:bold" class="moz-external-link">enrico_ghiorzi#006699; font-size:13px;;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;;text-decoration:none;;margin-left:7px;;color: #3b5998;;font-weight:normal;" class="moz-external-link">Enrico

April 30

I'd love to, but I'm having an hard time… I can access the device with both fastboot and ADB so I refuse to believe it cannot be restored somehow. Though, all standard procedures failed, I don't know what to try next.

Visit Topic or reply to this email to respond


Previous Replies

lissyx

April 30

Ok, if Emma does not love it, I would suggest fixing that first :slightly_smiling:" alt=":slightly_smiling:" width="20" height="20" class="moz-external-image">


Visit Topic or reply to this email to respond

To stop receiving notifications for this particular topic, click here. To unsubscribe from these emails, change your user preferences

Envoyé depuis Firefox OS

Visit Topic or reply to this email to respond

To stop receiving notifications for this particular topic, click here. To unsubscribe from these emails, change your user preferences

Envoyé depuis Firefox OS

Using FlashMode with Emma is documented at http://developer.sonymobile.com/services/flash-tool/use-the-flash-tool-for-xperia-devices/

Please make sure you follow those steps properly. Also, the USB VID/PID will change in Flashmode, so if you rely on a virtual machine, ensure the device is properly setup to be grabbed by the VM.