bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Move bluetoothd's PDU code into separate library

RESOLVED FIXED in FxOS-S9 (16Oct)

Status

Firefox OS
General
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: tzimmermann, Assigned: tzimmermann)

Tracking

unspecified
FxOS-S9 (16Oct)
All
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Bluetoothd contains code for processing PDUs. We should move this code into a shared library and reuse it for other system services.
Created attachment 8649572 [details]
Github repository

This library packs and unpacks PDUs in a B2G system service. The PDUs are used for communication between Gecko and the service's process.

Shawn, this code has previously been in bluetoothd, but it will be useful for other system services. We can later also convert bluetoothd to use this library.

Michael, I'd like to add this library to b2g under https://github.com/mozilla-b2g/platform_system_libpdu. It will be useful for new system services (e.g., bug 1194721). The master branch only contains licensing information, the code is in this bug's branch. I'll create a pull request once there's a repository on mozilla-b2g.

Thanks to both of you.
Attachment #8649572 - Flags: review?(shuang)
Attachment #8649572 - Flags: review?(mwu)
Blocks: 1196221
No longer blocks: 1194721
Comment on attachment 8649572 [details]
Github repository

Updated Github tree

  - set LOCAL_MODULE_CLASS for libpdu
  - improved ICS compatibility
The reason I add comment for 'LOCAL_MODULE_CLASS':
1. There are many shared libraries put LOCAL_MODULE_CLASS in Android.mk, like bluez/android/Android.mk
2.  http://androidxref.com/5.1.1_r6/xref/build/core/definitions.mk#439
    http://androidxref.com/5.1.1_r6/xref/build/core/definitions.mk#485
It looks like it can affect the path to install intermediates files, force to install files into /system/lib.
3. It might be meaningful for prebuilt library, so that you don't need to specify LOCAL_MODULE_PATH literally.

include $(CLEAR_VARS)
LOCAL_MODULE := libsomething
LOCAL_SRC_FILES := lib/$(jni_shared_libraries_abi)/$(LOCAL_MODULE).so
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_TAGS := optional
include $(BUILD_PREBUILT)
Thanks a lot.
Comment on attachment 8649572 [details]
Github repository

Updated Github tree:

  - fixed comments
Attachment #8649572 - Flags: review?(shuang) → review+
Comment on attachment 8649572 [details]
Github repository

Updated Github tree

  - renamed cleanup_ to destroy_
  - added size macros for PDUs

I pushed those two small changes as result of the review in bug 1196046.
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #6)
> Comment on attachment 8649572 [details]
> Github repository
> 
> Updated Github tree
> 
>   - renamed cleanup_ to destroy_
>   - added size macros for PDUs
> 
> I pushed those two small changes as result of the review in bug 1196046.

Sorry, bug 1196221.
Created attachment 8664277 [details] [review]
Github pull request

Equivalent to the previous Github tree, r=shuang.
Attachment #8649572 - Attachment is obsolete: true
Attachment #8649572 - Flags: review?(mwu)
Attachment #8664277 - Flags: review+
Depends on: 1208990
Keywords: checkin-needed
https://github.com/mozilla-b2g/platform_system_libpdu/commit/ac4e539dbd73522c466ebffba53edea61702082f
Keywords: checkin-needed
Target Milestone: --- → FxOS-S9 (16Oct)

Updated

3 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Blocks: 1257872
You need to log in before you can comment on or make changes to this bug.