You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/10/05 10:46:58 UTC

[GitHub] [mynewt-mcumgr] de-nordic opened a new pull request #148: Add IMG_MGMT_FRUGAL_LIST configuration option

de-nordic opened a new pull request #148:
URL: https://github.com/apache/mynewt-mcumgr/pull/148


   The new configuration option allows to cut down status list response
   only to attributes that have true/non-zero values.
   
   Signed-off-by: Dominik Ermel <do...@nordicsemi.no>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] utzig merged pull request #148: Add IMG_MGMT_FRUGAL_LIST configuration option

Posted by GitBox <gi...@apache.org>.
utzig merged pull request #148:
URL: https://github.com/apache/mynewt-mcumgr/pull/148


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] utzig merged pull request #148: Add IMG_MGMT_FRUGAL_LIST configuration option

Posted by GitBox <gi...@apache.org>.
utzig merged pull request #148:
URL: https://github.com/apache/mynewt-mcumgr/pull/148


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] utzig commented on a change in pull request #148: Add IMG_MGMT_FRUGAL_LIST configuration option

Posted by GitBox <gi...@apache.org>.
utzig commented on a change in pull request #148:
URL: https://github.com/apache/mynewt-mcumgr/pull/148#discussion_r724238604



##########
File path: cmd/img_mgmt/include/img_mgmt/img_mgmt_config.h
##########
@@ -46,6 +47,12 @@ BUILD_ASSERT(CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER > 2, "Unsupported number of
 #undef IMG_MGMT_UPDATABLE_IMAGE_NUMBER
 #define IMG_MGMT_UPDATABLE_IMAGE_NUMBER CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER
 #endif
+/* Image status list will only contain image attributes that are true/non-zero */
+#ifndef CONFIG_IMG_MGMT_FRUGAL_LIST
+#define IMG_MGMT_FRUGAL_LIST	0

Review comment:
       There is a tab here, please fix.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] de-nordic commented on a change in pull request #148: Add IMG_MGMT_FRUGAL_LIST configuration option

Posted by GitBox <gi...@apache.org>.
de-nordic commented on a change in pull request #148:
URL: https://github.com/apache/mynewt-mcumgr/pull/148#discussion_r724291313



##########
File path: cmd/img_mgmt/include/img_mgmt/img_mgmt_config.h
##########
@@ -46,6 +47,12 @@ BUILD_ASSERT(CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER > 2, "Unsupported number of
 #undef IMG_MGMT_UPDATABLE_IMAGE_NUMBER
 #define IMG_MGMT_UPDATABLE_IMAGE_NUMBER CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER
 #endif
+/* Image status list will only contain image attributes that are true/non-zero */
+#ifndef CONFIG_IMG_MGMT_FRUGAL_LIST
+#define IMG_MGMT_FRUGAL_LIST	0

Review comment:
       Thanks, fixed. I have also moved the 
   ```
   /* Image status list will only contain image attributes that are true/non-zero */
   #define IMG_MGMT_FRUGAL_LIST	0
   ```
   to system independent section above, to make it common.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] utzig commented on a change in pull request #148: Add IMG_MGMT_FRUGAL_LIST configuration option

Posted by GitBox <gi...@apache.org>.
utzig commented on a change in pull request #148:
URL: https://github.com/apache/mynewt-mcumgr/pull/148#discussion_r724238604



##########
File path: cmd/img_mgmt/include/img_mgmt/img_mgmt_config.h
##########
@@ -46,6 +47,12 @@ BUILD_ASSERT(CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER > 2, "Unsupported number of
 #undef IMG_MGMT_UPDATABLE_IMAGE_NUMBER
 #define IMG_MGMT_UPDATABLE_IMAGE_NUMBER CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER
 #endif
+/* Image status list will only contain image attributes that are true/non-zero */
+#ifndef CONFIG_IMG_MGMT_FRUGAL_LIST
+#define IMG_MGMT_FRUGAL_LIST	0

Review comment:
       There is a tab here, please fix.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] de-nordic commented on pull request #148: Add IMG_MGMT_FRUGAL_LIST configuration option

Posted by GitBox <gi...@apache.org>.
de-nordic commented on pull request #148:
URL: https://github.com/apache/mynewt-mcumgr/pull/148#issuecomment-934419932


   Yes. I have tested it with mcumgr cli for Zephyr. I will provide the console + --loglevel=debug output.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] utzig commented on pull request #148: Add IMG_MGMT_FRUGAL_LIST configuration option

Posted by GitBox <gi...@apache.org>.
utzig commented on pull request #148:
URL: https://github.com/apache/mynewt-mcumgr/pull/148#issuecomment-934415619


   > The new configuration option allows to cut down status list response only to attributes that have true/non-zero values.
   
   Nice idea, does it work with out of the box mcumgr?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] de-nordic commented on pull request #148: Add IMG_MGMT_FRUGAL_LIST configuration option

Posted by GitBox <gi...@apache.org>.
de-nordic commented on pull request #148:
URL: https://github.com/apache/mynewt-mcumgr/pull/148#issuecomment-934424653


   ```
   00000010  9f bf 64 73 6c 6f 74 00  67 76 65 72 73 69 6f 6e  |..dslot.gversion|
   00000020  65 30 2e 30 2e 30 64 68  61 73 68 58 20 d3 5d 18  |e0.0.0dhashX .].|
   00000030  c9 69 e7 8d f8 81 77 03  03 ab 04 8e 3a c2 f3 2b  |.i....w.....:..+|
   00000040  e8 60 75 9d 59 dc f4 7a  39 01 c0 fb 45 68 62 6f  |.`u.Y..z9...Ehbo|
   00000050  6f 74 61 62 6c 65 f5 69  63 6f 6e 66 69 72 6d 65  |otable.iconfirme|
   00000060  64 f5 66 61 63 74 69 76  65 f5 ff bf 64 73 6c 6f  |d.factive...dslo|
   00000070  74 01 67 76 65 72 73 69  6f 6e 65 30 2e 30 2e 30  |t.gversione0.0.0|
   00000080  64 68 61 73 68 58 20 e2  10 33 57 b5 46 6e 7c 2f  |dhashX ..3W.Fn|/|
   00000090  9a b2 3c 34 9c af 37 11  65 b3 be e1 10 87 67 19  |..<4..7.e.....g.|
   000000a0  8c e0 a2 38 71 cb 43 68  62 6f 6f 74 61 62 6c 65  |...8q.Chbootable|
   000000b0  f5 ff ff ff                                       |....|
   DEBU[2021-10-05 13:37:16.898] Received nmp rsp: &{NmpBase:{hdr:{Op:1 Flags:0 Len:172 Group:1 Seq:66 Id:0}} Rc:0 Images:[{NmpBase:{hdr:{Op:0 Flags:0 Len:0 Group:0 Seq:0 Id:0}} Image:0 Slot:0 Version:0.0.0 Hash:[211 93 24 201 105 231 141 248 129 119 3 3 171 4 142 58 194 243 43 232 96 117 157 89 220 244 122 57 1 192 251 69] Bootable:true Pending:false Confirmed:true Active:true Permanent:false} {NmpBase:{hdr:{Op:0 Flags:0 Len:0 Group:0 Seq:0 Id:0}} Image:0 Slot:1 Version:0.0.0 Hash:[226 16 51 87 181 70 110 124 47 154 178 60 52 156 175 55 17 101 179 190 225 16 135 103 25 140 224 162 56 113 203 67] Bootable:true Pending:false Confirmed:false Active:false Permanent:false}] SplitStatus:N/A}
   DEBU[2021-10-05 13:37:16.898] {remove-nmp-listener} [bll_sesn.go:392] seq=66
   Images:
    image=0 slot=0
       version: 0.0.0
       bootable: true
       flags: active confirmed
       hash: d35d18c969e78df881770303ab048e3ac2f32be860759d59dcf47a3901c0fb45
    image=0 slot=1
       version: 0.0.0
       bootable: true
       flags:
       hash: e2103357b5466e7c2f9ab23c349caf371165b3bee1108767198ce0a23871cb43
   Split status: N/A (0)
   ```
   Output of mcumgr setting the secondary slot for test:
   ```
   DEBU[2021-10-05 13:38:01.234] rx nmp response: 00000000  03 00 00 b5 00 01 42 00  bf 66 69 6d 61 67 65 73  |......B..fimages|
   00000010  9f bf 64 73 6c 6f 74 00  67 76 65 72 73 69 6f 6e  |..dslot.gversion|
   00000020  65 30 2e 30 2e 30 64 68  61 73 68 58 20 d3 5d 18  |e0.0.0dhashX .].|
   00000030  c9 69 e7 8d f8 81 77 03  03 ab 04 8e 3a c2 f3 2b  |.i....w.....:..+|
   00000040  e8 60 75 9d 59 dc f4 7a  39 01 c0 fb 45 68 62 6f  |.`u.Y..z9...Ehbo|
   00000050  6f 74 61 62 6c 65 f5 69  63 6f 6e 66 69 72 6d 65  |otable.iconfirme|
   00000060  64 f5 66 61 63 74 69 76  65 f5 ff bf 64 73 6c 6f  |d.factive...dslo|
   00000070  74 01 67 76 65 72 73 69  6f 6e 65 30 2e 30 2e 30  |t.gversione0.0.0|
   00000080  64 68 61 73 68 58 20 e2  10 33 57 b5 46 6e 7c 2f  |dhashX ..3W.Fn|/|
   00000090  9a b2 3c 34 9c af 37 11  65 b3 be e1 10 87 67 19  |..<4..7.e.....g.|
   000000a0  8c e0 a2 38 71 cb 43 68  62 6f 6f 74 61 62 6c 65  |...8q.Chbootable|
   000000b0  f5 67 70 65 6e 64 69 6e  67 f5 ff ff ff           |.gpending....|
   DEBU[2021-10-05 13:38:01.235] Received nmp rsp: &{NmpBase:{hdr:{Op:3 Flags:0 Len:181 Group:1 Seq:66 Id:0}} Rc:0 Images:[{NmpBase:{hdr:{Op:0 Flags:0 Len:0 Group:0 Seq:0 Id:0}} Image:0 Slot:0 Version:0.0.0 Hash:[211 93 24 201 105 231 141 248 129 119 3 3 171 4 142 58 194 243 43 232 96 117 157 89 220 244 122 57 1 192 251 69] Bootable:true Pending:false Confirmed:true Active:true Permanent:false} {NmpBase:{hdr:{Op:0 Flags:0 Len:0 Group:0 Seq:0 Id:0}} Image:0 Slot:1 Version:0.0.0 Hash:[226 16 51 87 181 70 110 124 47 154 178 60 52 156 175 55 17 101 179 190 225 16 135 103 25 140 224 162 56 113 203 67] Bootable:true Pending:true Confirmed:false Active:false Permanent:false}] SplitStatus:N/A}
   DEBU[2021-10-05 13:38:01.235] {remove-nmp-listener} [bll_sesn.go:392] seq=66
   Images:
    image=0 slot=0
       version: 0.0.0
       bootable: true
       flags: active confirmed
       hash: d35d18c969e78df881770303ab048e3ac2f32be860759d59dcf47a3901c0fb45
    image=0 slot=1
       version: 0.0.0
       bootable: true
       flags: pending
       hash: e2103357b5466e7c2f9ab23c349caf371165b3bee1108767198ce0a23871cb43
   Split status: N/A (0)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] de-nordic commented on a change in pull request #148: Add IMG_MGMT_FRUGAL_LIST configuration option

Posted by GitBox <gi...@apache.org>.
de-nordic commented on a change in pull request #148:
URL: https://github.com/apache/mynewt-mcumgr/pull/148#discussion_r724291313



##########
File path: cmd/img_mgmt/include/img_mgmt/img_mgmt_config.h
##########
@@ -46,6 +47,12 @@ BUILD_ASSERT(CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER > 2, "Unsupported number of
 #undef IMG_MGMT_UPDATABLE_IMAGE_NUMBER
 #define IMG_MGMT_UPDATABLE_IMAGE_NUMBER CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER
 #endif
+/* Image status list will only contain image attributes that are true/non-zero */
+#ifndef CONFIG_IMG_MGMT_FRUGAL_LIST
+#define IMG_MGMT_FRUGAL_LIST	0

Review comment:
       Thanks, fixed. I have also moved the 
   ```
   /* Image status list will only contain image attributes that are true/non-zero */
   #define IMG_MGMT_FRUGAL_LIST	0
   ```
   to system independent section above, to make it common.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org