tree: 539258865af530cc195f1a746b111ddf1352ab68 [path history] [tgz]
  1. BUILD.gn
  2. COMMIT-QUEUE.ini
  3. OWNERS
  4. README.md
  5. component.cc
  6. component.h
  7. daemon.cc
  8. daemon.h
  9. dbus_bindings/
  10. file_decompressor.cc
  11. file_decompressor.h
  12. file_decompressor_test.cc
  13. firmware_directory.cc
  14. firmware_directory.h
  15. firmware_directory_stub.cc
  16. firmware_directory_stub.h
  17. firmware_directory_test.cc
  18. firmware_file.cc
  19. firmware_file.h
  20. firmware_file_info.h
  21. firmware_file_test.cc
  22. firmware_manifest.proto
  23. helper_manifest.proto
  24. journal.cc
  25. journal.h
  26. journal_entry.proto
  27. journal_test.cc
  28. main.cc
  29. mock_journal.h
  30. mock_modem.h
  31. mock_modem_helper.h
  32. modem.cc
  33. modem.h
  34. modem_flasher.cc
  35. modem_flasher.h
  36. modem_flasher_test.cc
  37. modem_helper.cc
  38. modem_helper.h
  39. modem_helper_directory.cc
  40. modem_helper_directory.h
  41. modem_helper_directory_stub.h
  42. modem_tracker.cc
  43. modem_tracker.h
  44. modemfwd.conf
  45. proto_file_io.cc
  46. proto_file_io.h
  47. scoped_temp_file.cc
  48. scoped_temp_file.h
  49. test_protos/
modemfwd/README.md

Modem Firmware Daemon

This daemon abstracts out the common portions of updating modem firmware, i.e. deciding whether there is currently newer firmware available and getting the modem ready to be flashed with new firmware.

Modem-specific program API

In order to enforce a process boundary between the open-source modemfwd and potentially non-open-source modem firmware updaters, we farm out steps that require modem-specific knowledge to different programs. modemfwd will call into these programs with different flags to request different services. These flags are declared in the system API repo.

  • --get_fw_info: return version information for the currently installed firmware (see below)
  • --prepare_to_flash: put the modem into firmware download mode
  • --flash_main_fw=<file>
  • --flash_carrier_fw=<file>
  • --reboot

--get_fw_info should return the main firmware on the first line, the carrier UUID on the next line and the carrier version on the one after that:

$ modem_program --get_fw_info
11.22.33.44
big-long-carrier-uuid-string
55.66

The carrier UUID should match with one from the shill mobile operator DB.

All commands should return 0 on success and something non-zero on failure. modemfwd will look for these binaries in the directory passed as the --helper_directory argument on the command line.

Helper and firmawre directory structure

The protos defined in helper_manifest.proto and firmware_manifest.proto define manifests that should be provided in the helper and firmware directories so modemfwd can figure out what devices, carriers, etc. the contents can be used with.