Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ota] Remove two outdated/redundant methods #16019

Merged

Conversation

Damian-Nordic
Copy link
Contributor

Problem

  • OTARequestor::SetRequestorCanConsent method is not needed since an application already has a different way to inject RequestorCanConsent attribute value. That is, OTARequestorDriver::CanConsent method. We don't need two alternative sources of this information.
  • OTAImageProcessorInterface::SetOTAImageProcessorParams is used on some platforms, only, and against the original intent since the downloaded file name no longer needs to be set by the app (the downloaded file designator is obtained in QueryImageResponse).

Change overview

Remove the unnecessary methods and refactor the code accordingly.
Added dedicated SetOTAImageFile setters for platforms that allow to configure the output file name (where the downloaded image should be saved).

Testing

Ran OTA between Linux OTA requestor and provider.

The function was initially used to set name of image file
to be downloaded, but most platforms don't use that and
some platforms use the file name as the output file name,
that is, the file name where the downloaded image should
be saved.

Remove the method from the common interface and add
SetOTAImageFile setters in platforms that need to have
the output file name set.
@github-actions
Copy link

github-actions bot commented Mar 9, 2022

PR #16019: Size comparison from b146c95 to 1499991

Increases above 0.2%:

platform target config section b146c95 1499991 change % change
linux ota-requestor-app debug .data.rel.ro 59368 59512 144 0.2
Increases (1 build for linux)
platform target config section b146c95 1499991 change % change
linux ota-requestor-app debug (read only) 1911265 1911529 264 0.0
(read/write) 117832 117960 128 0.1
.data.rel.ro 59368 59512 144 0.2
Decreases (6 builds for cyw30739, efr32, k32w, linux, nrfconnect)
platform target config section b146c95 1499991 change % change
cyw30739 ota-requestor cyw930739m2evb_01 (read/write) 569826 569758 -68 -0.0
.app_xip_area 466184 466132 -52 -0.0
.bss 86012 85996 -16 -0.0
efr32 lighting-app BRD4161A (read only) 922184 922104 -80 -0.0
(read/write) 128888 128880 -8 -0.0
.bss 126808 126800 -8 -0.0
.text 922176 922096 -80 -0.0
BRD4161A+rpc (read only) 951004 950908 -96 -0.0
(read/write) 144844 144836 -8 -0.0
.bss 142584 142576 -8 -0.0
.text 950996 950900 -96 -0.0
k32w light k32w061+release (read/write) 695864 695788 -76 -0.0
.bss 77744 77736 -8 -0.0
.text 610356 610288 -68 -0.0
linux ota-requestor-app debug .bss 51552 51520 -32 -0.1
.text 1605954 1605858 -96 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1152959 1152891 -68 -0.0
bss 146848 146832 -16 -0.0
rodata 144392 144388 -4 -0.0
text 786464 786400 -64 -0.0
Full report (26 builds for cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, telink)
platform target config section b146c95 1499991 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 602114 602114 0 0.0
.app_xip_area 506632 506632 0 0.0
.bss 78172 78172 0 0.0
.data 652 652 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 560014 560014 0 0.0
.app_xip_area 466068 466068 0 0.0
.bss 76676 76676 0 0.0
.data 616 616 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 569826 569758 -68 -0.0
.app_xip_area 466184 466132 -52 -0.0
.bss 86012 85996 -16 -0.0
.data 592 592 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 922184 922104 -80 -0.0
(read/write) 128888 128880 -8 -0.0
.bss 126808 126800 -8 -0.0
.data 2080 2080 0 0.0
.text 922176 922096 -80 -0.0
BRD4161A+rpc (read only) 951004 950908 -96 -0.0
(read/write) 144844 144836 -8 -0.0
.bss 142584 142576 -8 -0.0
.data 2260 2260 0 0.0
.text 950996 950900 -96 -0.0
window-app BRD4161A (read only) 854428 854428 0 0.0
(read/write) 126852 126852 0 0.0
.bss 124936 124936 0 0.0
.data 1916 1916 0 0.0
.text 854420 854420 0 0.0
esp32 all-clusters-app c3devkit (read only) 958612 958612 0 0.0
(read/write) 1393770 1393770 0 0.0
.dram0.bss 63576 63576 0 0.0
.dram0.data 14220 14220 0 0.0
.flash.rodata 197056 197056 0 0.0
.flash.text 958612 958612 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1013671 1013671 0 0.0
(read/write) 461028 461028 0 0.0
.dram0.bss 69096 69096 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 226032 226032 0 0.0
.flash.text 1008287 1008287 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 695864 695788 -76 -0.0
.bss 77744 77736 -8 -0.0
.data 1964 1964 0 0.0
.text 610356 610288 -68 -0.0
lock k32w061+release (read/write) 696876 696876 0 0.0
.bss 77704 77704 0 0.0
.data 1964 1964 0 0.0
.text 611408 611408 0 0.0
linux all-clusters-app debug (read only) 2432673 2432673 0 0.0
(read/write) 145872 145872 0 0.0
.bss 60352 60352 0 0.0
.data 1360 1360 0 0.0
.data.rel.ro 78424 78424 0 0.0
.dynamic 592 592 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 205701 205701 0 0.0
.text 2063986 2063986 0 0.0
bridge-app debug+rpc (read only) 1737301 1737301 0 0.0
(read/write) 92784 92784 0 0.0
.bss 47624 47624 0 0.0
.data 2016 2016 0 0.0
.data.rel.ro 38064 38064 0 0.0
.dynamic 592 592 0 0.0
.got 3928 3928 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 141932 141932 0 0.0
.text 1479397 1479397 0 0.0
chip-tool debug (read only) 9936965 9936965 0 0.0
(read/write) 356152 356152 0 0.0
.bss 25640 25640 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 323336 323336 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 514420 514420 0 0.0
.text 8644661 8644661 0 0.0
chip-tool-ipv6only arm64 (read only) 9585516 9585516 0 0.0
(read/write) 472945 472945 0 0.0
.bss 43953 43953 0 0.0
.data 1200 1200 0 0.0
.data.rel.ro 369312 369312 0 0.0
.dynamic 560 560 0 0.0
.got 54680 54680 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 490436 490436 0 0.0
.text 8050948 8050948 0 0.0
door-lock-app debug (read only) 1951601 1951601 0 0.0
(read/write) 119296 119296 0 0.0
.bss 50656 50656 0 0.0
.data 1056 1056 0 0.0
.data.rel.ro 62184 62184 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 173820 173820 0 0.0
.text 1629138 1629138 0 0.0
lighting-app debug+rpc (read only) 2083881 2083881 0 0.0
(read/write) 124616 124616 0 0.0
.bss 51456 51456 0 0.0
.data 1536 1536 0 0.0
.data.rel.ro 66104 66104 0 0.0
.dynamic 608 608 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 165980 165980 0 0.0
.text 1762242 1762242 0 0.0
ota-provider-app debug (read only) 1884457 1884457 0 0.0
(read/write) 114896 114896 0 0.0
.bss 50464 50464 0 0.0
.data 1320 1320 0 0.0
.data.rel.ro 57464 57464 0 0.0
.dynamic 608 608 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 159059 159059 0 0.0
.text 1574674 1574674 0 0.0
ota-requestor-app debug (read only) 1911265 1911529 264 0.0
(read/write) 117832 117960 128 0.1
.bss 51552 51520 -32 -0.1
.data 1480 1480 0 0.0
.data.rel.ro 59368 59512 144 0.2
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 154796 154796 0 0.0
.text 1605954 1605858 -96 -0.0
shell debug (read only) 2398817 2398817 0 0.0
(read/write) 150088 150088 0 0.0
.bss 70472 70472 0 0.0
.data 864 864 0 0.0
.data.rel.ro 73064 73064 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 205618 205618 0 0.0
.text 2036626 2036626 0 0.0
thermostat-no-ble arm64 (read only) 2180300 2180300 0 0.0
(read/write) 148833 148833 0 0.0
.bss 65409 65409 0 0.0
.data 1048 1048 0 0.0
.data.rel.ro 75160 75160 0 0.0
.dynamic 560 560 0 0.0
.got 4240 4240 0 0.0
.init 24 24 0 0.0
.init_array 352 352 0 0.0
.rodata 133196 133196 0 0.0
.text 1828512 1828512 0 0.0
tv-app debug (read only) 2624697 2624697 0 0.0
(read/write) 251000 251000 0 0.0
.bss 168160 168160 0 0.0
.data 3168 3168 0 0.0
.data.rel.ro 73624 73624 0 0.0
.dynamic 592 592 0 0.0
.got 4544 4544 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 199645 199645 0 0.0
.text 2250962 2250962 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1152959 1152891 -68 -0.0
bss 146848 146832 -16 -0.0
rodata 144392 144388 -4 -0.0
text 786464 786400 -64 -0.0
p6 all-clusters-app default (read/write) 2495712 2495712 0 0.0
.bss 119640 119640 0 0.0
.data 2680 2680 0 0.0
.text 1453976 1453976 0 0.0
light-app default (read/write) 2399096 2399096 0 0.0
.bss 113104 113104 0 0.0
.data 2536 2536 0 0.0
.text 1357360 1357360 0 0.0
lock-app default (read/write) 2362528 2362528 0 0.0
.bss 112848 112848 0 0.0
.data 2496 2496 0 0.0
.text 1320792 1320792 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 889646 889646 0 0.0
bss 86968 86968 0 0.0
noinit 37160 37160 0 0.0
text 628950 628950 0 0.0

@Damian-Nordic Damian-Nordic merged commit 04b02c2 into project-chip:master Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants