You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "michallenc (via GitHub)" <gi...@apache.org> on 2025/03/12 11:00:49 UTC
[PR] documentation/boot/nxboot: update nxboot documentation [nuttx]
michallenc opened a new pull request, #15981:
URL: https://github.com/apache/nuttx/pull/15981
## Summary
This updates nxboot documentation with the last changes in nuttx-apps repository.
## Impact
Documentation update only. This reflects https://github.com/apache/nuttx-apps/pull/3024 and should be merger after/with it.
--
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@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] documentation/boot/nxboot: update nxboot documentation [nuttx]
Posted by "nuttxpr (via GitHub)" <gi...@apache.org>.
nuttxpr commented on PR #15981:
URL: https://github.com/apache/nuttx/pull/15981#issuecomment-2717508647
[**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+13552&type=issues)
Yes, the PR appears to meet the basic NuttX requirements regarding summary and impact description. However, it is missing crucial information regarding **Testing**. The author needs to provide details about their testing environment (Build Host and Target) and, importantly, include the testing logs *before* and *after* the change to demonstrate the documentation update's correctness and impact. Simply stating that it's a documentation update isn't sufficient for proper review.
--
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@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] documentation/boot/nxboot: update nxboot documentation [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #15981:
URL: https://github.com/apache/nuttx/pull/15981
--
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@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] documentation/boot/nxboot: update nxboot documentation [nuttx]
Posted by "michallenc (via GitHub)" <gi...@apache.org>.
michallenc commented on code in PR #15981:
URL: https://github.com/apache/nuttx/pull/15981#discussion_r1991594741
##########
Documentation/applications/boot/nxboot/index.rst:
##########
@@ -29,38 +29,38 @@ wear while keeping the recovery/revert possibility.
Not confirmed image is reverted to recovery image if reboot occurs.
The bootable image consists of a header :c:struct:`nxboot_img_header`
-containing magic, size of the image excluding the header, CRC32 of the
-image excluding the header and firmware version. The header is located
-prior to the image itself and has a configurable size
-``CONFIG_NXBOOT_HEADER_SIZE``. One erase page is also reserved at the
-end of the partition (the entire partition, not the image!). This page
-has two write blocks/pages with each one holding a flag. The first page
-from the end holds image confirmation flag, the second one holds the flag
-informing this image was already updated. These flags are written by the
-bootloader and are used to detect which partition is update/recovery
-and whether the image is confirmed or not.
-
-There are two variants of bootable image. The first is the image that is
-expected to be flashed directly into the primary area via physical programmer
-as STlink or JTAG. This image does not use CRC32 for validation and does
-not contain tail with the flags described above. It has an inverted
-magic value compared to the update image. This should not be used
-for OTA update, but only for the initial upload of the software to the
-device.
-
-The update image has a valid precalculated CRC32 and standard magic value.
-The image is expected to be uploaded to the board either via programmer
-or some protocol (Ethernet, CAN, etc.) to the external flash. The primary
-flash can be used as well, but this halts the program execution during write
-operations, so it is not recommended if external flash can be used. The
-uploaded image is detected by the bootloader during the next boot and update
-occurs. The program responsible for uploading the update image to the
-partition has to erase the last erase page in this partition to ensure
-all flags are unset.
+containing magic, header version, header size, CRC32 of the image including
+some parts of the header, size of the image excluding the header, platform
+identifier, pointer to extended headers and and firmware version. The header
+is located prior to the image itself and has a configurable size
+``CONFIG_NXBOOT_HEADER_SIZE``. The CRC is calculated from the entire image
+including header except for magic, header version and header size fields.
+Extended headers are currently not supported, but the header already has
+a reserved space for a pointer to it.
+
+The image compatible with nxboot bootloader can be uploaded both directly
+to the primary area via physical programer as STlink or JTAG and to the
+update partition via some external application (over Ethernet, USB, CAN, etc.).
+The update and recovery slots can be located in the the primary flash as
+well, but this halts the program execution during write operations, so it is
+not recommended if external flash can be used. The uploaded image is detected
+by the bootloader during the next boot and update occurs.
+
+Bootloader has an internal magic that is used to detect updated images. Once
+update occurs, the image is copied from update to primary partition with
+the internal magic and the first erase page of the update slot is erased.
+The image with internal magic is considered valid only if its recovery exists,
Review Comment:
Changed
--
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@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] documentation/boot/nxboot: update nxboot documentation [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #15981:
URL: https://github.com/apache/nuttx/pull/15981#discussion_r1991504954
##########
Documentation/applications/boot/nxboot/index.rst:
##########
@@ -29,38 +29,38 @@ wear while keeping the recovery/revert possibility.
Not confirmed image is reverted to recovery image if reboot occurs.
The bootable image consists of a header :c:struct:`nxboot_img_header`
-containing magic, size of the image excluding the header, CRC32 of the
-image excluding the header and firmware version. The header is located
-prior to the image itself and has a configurable size
-``CONFIG_NXBOOT_HEADER_SIZE``. One erase page is also reserved at the
-end of the partition (the entire partition, not the image!). This page
-has two write blocks/pages with each one holding a flag. The first page
-from the end holds image confirmation flag, the second one holds the flag
-informing this image was already updated. These flags are written by the
-bootloader and are used to detect which partition is update/recovery
-and whether the image is confirmed or not.
-
-There are two variants of bootable image. The first is the image that is
-expected to be flashed directly into the primary area via physical programmer
-as STlink or JTAG. This image does not use CRC32 for validation and does
-not contain tail with the flags described above. It has an inverted
-magic value compared to the update image. This should not be used
-for OTA update, but only for the initial upload of the software to the
-device.
-
-The update image has a valid precalculated CRC32 and standard magic value.
-The image is expected to be uploaded to the board either via programmer
-or some protocol (Ethernet, CAN, etc.) to the external flash. The primary
-flash can be used as well, but this halts the program execution during write
-operations, so it is not recommended if external flash can be used. The
-uploaded image is detected by the bootloader during the next boot and update
-occurs. The program responsible for uploading the update image to the
-partition has to erase the last erase page in this partition to ensure
-all flags are unset.
+containing magic, header version, header size, CRC32 of the image including
+some parts of the header, size of the image excluding the header, platform
+identifier, pointer to extended headers and and firmware version. The header
+is located prior to the image itself and has a configurable size
+``CONFIG_NXBOOT_HEADER_SIZE``. The CRC is calculated from the entire image
+including header except for magic, header version and header size fields.
+Extended headers are currently not supported, but the header already has
+a reserved space for a pointer to it.
+
+The image compatible with nxboot bootloader can be uploaded both directly
+to the primary area via physical programer as STlink or JTAG and to the
+update partition via some external application (over Ethernet, USB, CAN, etc.).
+The update and recovery slots can be located in the the primary flash as
+well, but this halts the program execution during write operations, so it is
+not recommended if external flash can be used. The uploaded image is detected
+by the bootloader during the next boot and update occurs.
+
+Bootloader has an internal magic that is used to detect updated images. Once
Review Comment:
```suggestion
Bootloader has an internal magic value that is used to detect updated images. Once
##########
Documentation/applications/boot/nxboot/index.rst:
##########
@@ -29,38 +29,38 @@ wear while keeping the recovery/revert possibility.
Not confirmed image is reverted to recovery image if reboot occurs.
The bootable image consists of a header :c:struct:`nxboot_img_header`
-containing magic, size of the image excluding the header, CRC32 of the
-image excluding the header and firmware version. The header is located
-prior to the image itself and has a configurable size
-``CONFIG_NXBOOT_HEADER_SIZE``. One erase page is also reserved at the
-end of the partition (the entire partition, not the image!). This page
-has two write blocks/pages with each one holding a flag. The first page
-from the end holds image confirmation flag, the second one holds the flag
-informing this image was already updated. These flags are written by the
-bootloader and are used to detect which partition is update/recovery
-and whether the image is confirmed or not.
-
-There are two variants of bootable image. The first is the image that is
-expected to be flashed directly into the primary area via physical programmer
-as STlink or JTAG. This image does not use CRC32 for validation and does
-not contain tail with the flags described above. It has an inverted
-magic value compared to the update image. This should not be used
-for OTA update, but only for the initial upload of the software to the
-device.
-
-The update image has a valid precalculated CRC32 and standard magic value.
-The image is expected to be uploaded to the board either via programmer
-or some protocol (Ethernet, CAN, etc.) to the external flash. The primary
-flash can be used as well, but this halts the program execution during write
-operations, so it is not recommended if external flash can be used. The
-uploaded image is detected by the bootloader during the next boot and update
-occurs. The program responsible for uploading the update image to the
-partition has to erase the last erase page in this partition to ensure
-all flags are unset.
+containing magic, header version, header size, CRC32 of the image including
+some parts of the header, size of the image excluding the header, platform
+identifier, pointer to extended headers and and firmware version. The header
+is located prior to the image itself and has a configurable size
+``CONFIG_NXBOOT_HEADER_SIZE``. The CRC is calculated from the entire image
+including header except for magic, header version and header size fields.
+Extended headers are currently not supported, but the header already has
+a reserved space for a pointer to it.
+
+The image compatible with nxboot bootloader can be uploaded both directly
+to the primary area via physical programer as STlink or JTAG and to the
+update partition via some external application (over Ethernet, USB, CAN, etc.).
+The update and recovery slots can be located in the the primary flash as
+well, but this halts the program execution during write operations, so it is
+not recommended if external flash can be used. The uploaded image is detected
+by the bootloader during the next boot and update occurs.
+
+Bootloader has an internal magic that is used to detect updated images. Once
+update occurs, the image is copied from update to primary partition with
+the internal magic and the first erase page of the update slot is erased.
+The image with internal magic is considered valid only if its recovery exists,
Review Comment:
```suggestion
The image with internal magic value is considered valid only if its recovery exists,
--
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@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org