Closed
Bug 1136425
Opened 11 years ago
Closed 11 years ago
compile failure: can't compile full FOTA
Categories
(Firefox OS Graveyard :: GonkIntegration, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: nhirata, Unassigned)
Details
1. setup repo
2. run ./build.sh gecko-update-fota
Actual:
Generating FOTA update package
mkdir -p `dirname out/target/product/flame/fota/partial/update.zip` || true
Unable to locate an executable at "/Volumes/Projects/B2G_Flame_kk_master/build/fake-jdk-tools/bin/java" (-1)
Error: Process returned error code 2: /usr/bin/java -Xmx2048m -jar /Volumes/Projects/B2G_Flame_kk_master/tools/update-tools/bin/signapk.jar -w /Volumes/Projects/B2G_Flame_kk_master/build/target/product/security/testkey.x509.pem /Volumes/Projects/B2G_Flame_kk_master/build/target/product/security/testkey.pk8 /var/folders/kb/th4wrwpn5mj_4dbs6r8y_s580000gn/T/tmpRvUmfJ out/target/product/flame/fota/partial/update.zip
| Reporter | ||
Comment 1•11 years ago
|
||
$ which java
/usr/bin/java
After running:
nhirata-19333:B2G_Flame_kk_master nhirata$ /usr/bin/java -Xmx2048m -jar /Volumes/Projects/B2G_Flame_kk_master/tools/update-tools/bin/signapk.jar -w /Volumes/Projects/B2G_Flame_kk_master/build/target/product/security/testkey.x509.pem /Volumes/Projects/B2G_Flame_kk_master/build/target/product/security/testkey.pk8 /var/folders/kb/th4wrwpn5mj_4dbs6r8y_s580000gn/T/tmpRvUmfJ out/target/product/flame/fota/partial/update.zip
It seemed to have made the update.zip file; though it seems small :
-rw-r--r-- 1 nhirata staff 24404974 Feb 24 15:09 update.zip
| Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(lissyx+mozillians)
| Reporter | ||
Comment 2•11 years ago
|
||
Found the reason why: the fake-jdk-tools has java in it's directory, not the subdirectory of bin.
/Volumes/Projects/B2G_Flame_kk_master/build/fake-jdk-tools/java
| Reporter | ||
Comment 3•11 years ago
|
||
After I cheesed it by creating a folder and chmod +x on the java files, I still ran into :
Error: Couldn't find /Volumes/Projects/B2G_Flame_kk_master/objdir-gecko/dist/host/bin/mar
make: *** [out/target/product/flame/fota-flame-update.mar] Error 1
| Reporter | ||
Comment 4•11 years ago
|
||
Side note : It did make a partial FOTA update.zip file; trying to flash it with :
./build-flash-fota.py --file=/Volumes/Projects/B2G_Flame_kk_master/out/target/product/flame/fota/partial/update.zip
usage: build-flash-fota.py [options]
lead to :
build-flash-fota.py: error: No readelf binary in ANDROID_TOOLCHAIN
If there was a mar file I should proabaly use :
python tools/update-tools/test-update.py
out/target/product/flame/fota-flame-update.mar ( from https://bugzilla.mozilla.org/show_bug.cgi?id=1095380 )
Also to note you can apparantly side load using recovery mode and the adb option :
To reproduce, |./build.sh gecko-update-fota| and then sideload with |adb sideload out/target/product/flame/fota/partial/update.zip|
From https://bugzilla.mozilla.org/show_bug.cgi?id=1067005#c18
| Reporter | ||
Comment 5•11 years ago
|
||
To note this is a continuation of bug 1042789. The mar file isn't found so the full FOTA doesn't compile correctly on the Mac OS X platform. Changing title to match.
Side Note:
I found that I had failed to sideload due to not creating a base build and flashing the device with that base build before trying to side load the FOTA update.zip file.
The FOTA sideload worked just fine for me; so we probably need to adjust the FOTA update package to point to /Volumes/Projects/B2G_Flame_kk_master/build/fake-jdk-tools/ directory for the Mac OS X platform by default.
Summary: Mac OS X failure to create FOTA update.zip → Mac OS X compile failure: can't compile full FOTA
Comment 7•11 years ago
|
||
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #5)
> To note this is a continuation of bug 1042789. The mar file isn't found so
> the full FOTA doesn't compile correctly on the Mac OS X platform. Changing
> title to match.
Nothing I can help with.
>
> Side Note:
> I found that I had failed to sideload due to not creating a base build and
> flashing the device with that base build before trying to side load the FOTA
> update.zip file.
>
> The FOTA sideload worked just fine for me; so we probably need to adjust the
> FOTA update package to point to
> /Volumes/Projects/B2G_Flame_kk_master/build/fake-jdk-tools/ directory for
> the Mac OS X platform by default.
Probably dhylands knows better for this part
Flags: needinfo?(lissyx+mozillians) → needinfo?(dhylands)
Comment 8•11 years ago
|
||
I'm only slightly familiar with the tools. I believe that Marshall Culpepper wrote them.
I know that the update.zip needs to be signed in order to be used by the recovery ROM, but that may not be related to the issue here.
Flags: needinfo?(dhylands)
| Reporter | ||
Comment 9•11 years ago
|
||
Hey Marshall? Could you help redirect the pathing for the Mac OS platform? ( see comment 2 )
Flags: needinfo?(marshall)
Comment 10•11 years ago
|
||
Hey Naoki.
I just updated B2G, and ran ./build.sh gecko-update-fota-full and ran into this issue too (though I didn't see it with gecko-update-fota?)
IIRC, an _actual_ java executable is required here to sign the update.zip (this what signapk.jar does). If we forward along to the fake JDK, the signing process will be skipped. Is that what you want to do?
Flags: needinfo?(marshall)
| Reporter | ||
Comment 11•11 years ago
|
||
Could we have a flag to set one or the other?
Currently, I'm not concerned about the signing process, I need to test a final result of bluetooth FOTA patches. Having said that, we probably should test to make sure that the signing process works.
| Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(marshall)
| Reporter | ||
Comment 12•11 years ago
|
||
The following also shows on the linux platform when running ./build.sh gecko-update-fota-full
Error: Couldn't find /Volumes/Projects/B2G_Flame_kk_master/objdir-gecko/dist/host/bin/mar
make: *** [out/target/product/flame/fota-flame-update.mar] Error 1
Summary: Mac OS X compile failure: can't compile full FOTA → compile failure: can't compile full FOTA
Comment 13•11 years ago
|
||
IIRC the mar program is only built if you do userdebug or user builds.
The updater is also only built for userdebug or user builds. So if you built an update using an eng build, then once you updated to it, it wouldn't update any further since the version you updated o wouldn't have the updater enabled.
I think that you can add the following to your .userconfig:
export B2G_UPDATE=1
to get the updater enabled in an eng build.
I seem to recall that I may have copied objdir-gecko/modules/libmar/tool/mar into my path so that I have it available all the time.
Comment 14•11 years ago
|
||
(In reply to Dave Hylands [:dhylands] from comment #13)
> I think that you can add the following to your .userconfig:
>
> export B2G_UPDATE=1
It's B2G_UPDATER=1 actually; I'm updating the documentation at https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Firefox_OS_update_packages with this information. I've had it in my .userconfig for what feels like forever and I forgot that this isn't mentioned anywhere in the documentation.
Comment 15•11 years ago
|
||
Chris, I've updated these docs with additional information on the B2G_UPDATER flag, can you please check them and see if the additions are in the right places and the language is proper English:
https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Firefox_OS_update_packages
https://developer.mozilla.org/en-US/Firefox_OS/Customization_with_the_.userconfig_file
Flags: needinfo?(cmills)
| Reporter | ||
Comment 16•11 years ago
|
||
Update works now. Thanks for updating the docs!
Leaving this open for Chris to verify the docs, and if it's ok, then we can close this bug as fixed ( in terms of documentation that was needed )
| Reporter | ||
Comment 17•11 years ago
|
||
Clearing NIs for Gregor and Marshall.
Flags: needinfo?(marshall)
Flags: needinfo?(anygregor)
Comment 18•11 years ago
|
||
(In reply to Gabriele Svelto [:gsvelto] from comment #15)
> Chris, I've updated these docs with additional information on the
> B2G_UPDATER flag, can you please check them and see if the additions are in
> the right places and the language is proper English:
>
> https://developer.mozilla.org/en-US/Firefox_OS/
> Building_and_installing_Firefox_OS/Firefox_OS_update_packages
>
> https://developer.mozilla.org/en-US/Firefox_OS/Customization_with_the_.
> userconfig_file
Sorry for the delay in checking these. The wording looks fine (after a couple of minor edits), so I'm signing off these docs now.
Flags: needinfo?(cmills)
Comment 19•11 years ago
|
||
(In reply to Chris Mills (Mozilla, MDN editor) [:cmills] from comment #18)
> Sorry for the delay in checking these. The wording looks fine (after a
> couple of minor edits), so I'm signing off these docs now.
NP, thanks for the help. Feel free to close the bug yourself when you're done.
You need to log in
before you can comment on or make changes to this bug.
Description
•