Closed Bug 904517 Opened 11 years ago Closed 11 years ago

[FlatFish][FOTA]No rule to make target otapackage

Categories

(Firefox OS Graveyard :: GonkIntegration, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:koi+, firefox26 fixed)

RESOLVED FIXED
blocking-b2g koi+
Tracking Status
firefox26 --- fixed

People

(Reporter: seinlin, Assigned: seinlin)

References

Details

Attachments

(2 files, 2 obsolete files)

It is failed when OTA package is built.

./build.sh otapackage 
....
make: *** No rule to make target `otapackage'.  Stop.
Blocks: flatfish
blocking-b2g: --- → koi+
Attached file pull request - 1 (obsolete) —
Add a tool dumpkey.py which is required by otapackage.
Attachment #792031 - Flags: review?(mwu)
Attached file pull request - 2 (obsolete) —
Replace the use of dumpkey.jar with dumpkey.py.
Attachment #792032 - Flags: review?(mwu)
Comment on attachment 792031 [details]
pull request - 1

We cannot depend on things inside the B2G repo - this repo contains helpful tools but cannot have tools required for building. I recommend putting this in gonk-misc instead.
Attachment #792031 - Flags: review?(mwu) → review-
Comment on attachment 792032 [details]
pull request - 2

Canceling review while waiting for the script to be relocated.
Attachment #792032 - Flags: review?(mwu)
Attachment #792031 - Attachment is obsolete: true
Attachment #792032 - Attachment is obsolete: true
Attachment #792580 - Flags: review?(mwu)
We may also need a version of this for the gonk-jb, which uses the b2g-4.3_r2.1 branch.
Comment on attachment 792580 [details]
Replace the use of dumpkey.jar with dumpkey.py

Looks fine. Up to you whether we need to support version 2 keys. Also, you might want to find a reviewer who is more familiar with python, but the port looks fairly straightforward to me.
Attachment #792580 - Flags: review?(mwu) → review+
(In reply to Michael Wu [:mwu] from comment #7)
> Comment on attachment 792580 [details]
> Replace the use of dumpkey.jar with dumpkey.py
> 
> Looks fine. Up to you whether we need to support version 2 keys. Also, you
> might want to find a reviewer who is more familiar with python, but the port
> looks fairly straightforward to me.

As I know the dump key process is not different for version 1 and 2. The different is the output format of version 1 is "v1 {,{..},{..}}" while version 2 is "{,{..},{..}}".
Flags: needinfo?
Follow the below steps otapackage can be built succefully.

1. copy the necessary tools and files.
 cp patc-to/boot.img vendor/{manufacturer}/{devicename}/kernel
 cp path-to/recovery.fstab device/{manufacturer}/{devicename}/
 cp ./tools/update-tools/bin/signapk.jar out/host/linux-x86/framework/

2. Modify the config to include the update service.
  add "VARIANT=user" in .cofig
  add "export B2G_UPDATER=1" in .userconfig
  edit "app.update.url" in "gecko/b2g/app/b2g.js". The url should be the one which can access to update.xml for checking update.

3. patch the following files, 

--- .repo/manifests/{devicename}.xml
   <project path="external/e2fsprogs" name="platform/external/e2fsprogs"/>
+  <project path="external/genext2fs" name="platform/external/genext2fs" />
   <project path="external/expat" name="platform/external/expat

--- device/{manufacturer}/{devicename}/BoardConfig.mk

+ifneq (,$(wildcard vendor/qcom/helix/kernel))
+TARGET_PREBUILT_KERNEL := vendor/qcom/helix/kernel
+BOARD_KERNEL_BASE := 200000
+TARGET_NO_KERNEL := false
+BOARD_KERNEL_CMDLINE := androidboot.hardware=helix
+endif

--- vendor/{manufacturer}/common/releasetools.py

 def FullOTA_InstallEnd(info):
+  if not hasattr(info, 'type'):
+    return
   if info.type == 'MTD':


4. Suppose dumpkey.py is ready on https://github.com/mozilla-b2g/platform_build,
Without this we need to use dumpkey.jar from android build and need to modify build/core/Makefile accordingly.
When every thing is ready, start to build.

  ./repo sync
  ./build.sh
  ./build.sh otapackage

5. Finally, {devicename}-ota-eng.$USER.zip will be built and update.mar and update.xml can be generated.

./tools/update-tools/build-fota-mar.py -o update.mar out/target/product/{devicename}/{devicename}-ota-eng.$USER.zip
./tools/update-tools/build-update-xml.py -o update.xml -u "https://url/to/server/%(build_id)s/%(filename)s" -v 22.0 -V 22.0 update.mar
Hi Michael, "dumpkey.py" was written by Marshall. It is used and I think passing it via email is not a good idea. That's why we need it on github.

For b2g-4.3_r2.1 branch, do I need to create a different pull request?
Flags: needinfo?
Yeah - make a separate pull request for b2g-4.3_r2.1. Thanks.
Attachment #795824 - Flags: review?(mwu) → review+
Assignee: nobody → kli
Hi, Michael, I think the above information is enough to build the otapackage. I will resolve this bug. Could you accept the pull request when you get time? Thank you!
Keywords: checkin-needed
b2g-4.3_r2.1: https://github.com/mozilla-b2g/platform_build/commit/ca1df6c929f5042a8c52813c3cc23e6eb890194f
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: