[aries-l] Update script to download vendor blobs automatically during build

RESOLVED FIXED in FxOS-S4 (07Aug)

Status

Firefox OS
GonkIntegration
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: seinlin, Assigned: gerard)

Tracking

unspecified
FxOS-S4 (07Aug)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

3 years ago
Accordingly to bug 1163550 comment 91, developers will be noticed to download the blobs from vendor site manually. If the download can be done automatically, it would be perfect.
(Reporter)

Comment 1

3 years ago
Alexandre, could you have a look to this bug? Thanks!
Flags: needinfo?(lissyx+mozillians)
(Assignee)

Updated

3 years ago
Assignee: nobody → lissyx+mozillians
Flags: needinfo?(lissyx+mozillians)
(Assignee)

Comment 2

3 years ago
Created attachment 8635249 [details] [review]
Shinano platform PR
Attachment #8635249 - Flags: review?(mwu)
Attachment #8635249 - Flags: feedback?(adam)
(Assignee)

Comment 3

3 years ago
Created attachment 8635250 [details] [review]
Leo device PR
Attachment #8635250 - Flags: review?(mwu)
Attachment #8635250 - Flags: feedback?(adam)
(Assignee)

Comment 4

3 years ago
Created attachment 8635255 [details] [review]
Aries device PR
Attachment #8635255 - Flags: review?(mwu)
Attachment #8635255 - Flags: feedback?(adam)
(Assignee)

Comment 5

3 years ago
Adam, I need your help to cross check this is working well. Thanks :)
Flags: needinfo?(adam)

Comment 6

3 years ago
Hmm, can you add a check to make sure w3m is installed? curl/wget can usually be assumed, but I don't think w3m can be assumed.
(Assignee)

Comment 7

3 years ago
(In reply to Michael Wu [:mwu] from comment #6)
> Hmm, can you add a check to make sure w3m is installed? curl/wget can
> usually be assumed, but I don't think w3m can be assumed.

Done. I have also changed the triggering a logic a little bit since a clean tree was failing completely because of make-dependency .mk files not here (thanks adam). We should now be safe.
Flags: needinfo?(mwu)

Comment 8

3 years ago
Is there a specific reason you're using blobs.mk to trigger the running of the blobs downloader? The blob downloader is usually automatically triggered by build.sh as long as it's named download-blobs.sh and placed in the device directory.
Flags: needinfo?(mwu)
(Assignee)

Comment 9

3 years ago
(In reply to Michael Wu [:mwu] from comment #8)
> Is there a specific reason you're using blobs.mk to trigger the running of
> the blobs downloader? The blob downloader is usually automatically triggered
> by build.sh as long as it's named download-blobs.sh and placed in the device
> directory.

Yeah. For now, build.sh will execute either download-blobs.sh or extract-files.sh to my understanding. But given Sony has not been granted the right to redistribute modem firmware in the ZIP file, we still need extract-files to grab those.

I'm not very happy of the blobs.mk hacks, neither is Adam or you, so I'll look forward to a better fix. That being said, configure_device() relies on load-config.sh which is ran by setup.sh to read .config for having the value of DEVICE variable.

Given the way blobs are packaged, there is a $(call ...) dependency on device's .mk ( $(PRODUCT_NAME)-vendor.mk ) which will make the lunch step fail. So we won't even execute the configure_device() function in build.sh.

That's why early port was checking the .mk in each device mk file, and why I have mutualized it at blobs.mk level.

That being said, I have just spoken with Alin who agrees that we fix upstream replacing the call inherit-product with a inherit-product-if-exists like those at https://github.com/mozilla-b2g/device-sony-aries/blob/master/aosp_d5803.mk#L23

This way we should have lunch not failing on missing blobs and we can move the download-sony-blobs.sh back into extract-files.sh.

Michael, is there any reason for exclusively running either download-blobs.sh OR extract-files.sh ? If no, we could run both by making them just symlink on the device/sony/shinano/ files on each tree.
Flags: needinfo?(mwu)
(Assignee)

Comment 10

3 years ago
I've updated the PRs with:
 - moving back to calling download-sony-blobs.sh from extract-files.sh
 - changing inherit-product to inherit-product-if-exists on aosp_*.mk files: I'll do PR upstream for this before landing my changes
(Assignee)

Updated

3 years ago
Blocks: 1175254, 1183298

Comment 11

3 years ago
We've never had a device where running both would make sense till now. Doing a download in extract-files.sh seems like a reasonable compromise though.
Flags: needinfo?(mwu)

Comment 12

3 years ago
Comment on attachment 8635249 [details] [review]
Shinano platform PR

Looks good. There's just one nit that I put on the PR.
Attachment #8635249 - Flags: review?(mwu) → review+

Updated

3 years ago
Attachment #8635250 - Flags: review?(mwu) → review+

Updated

3 years ago
Attachment #8635255 - Flags: review?(mwu) → review+
(Assignee)

Comment 13

3 years ago
(In reply to Michael Wu [:mwu] from comment #12)
> Comment on attachment 8635249 [details] [review]
> Shinano platform PR
> 
> Looks good. There's just one nit that I put on the PR.

That's fixed! Thanks!
(Assignee)

Updated

3 years ago
Attachment #8635249 - Flags: feedback?(adam)
(Assignee)

Updated

3 years ago
Attachment #8635250 - Flags: feedback?(adam)
(Assignee)

Updated

3 years ago
Attachment #8635255 - Flags: feedback?(adam)
Flags: needinfo?(adam)
(Assignee)

Updated

3 years ago
Depends on: 1188060
Target Milestone: --- → FxOS-S4 (07Aug)
You need to log in before you can comment on or make changes to this bug.